Numbers
Integers and floats to rule the world!
🔢 Number Types
Type
Size (bits)
Range
Usage
🎯 Type Promotion & Type Contagion
// Integer operations stay as integers
result = 10 + 5 // Integer: 15
// Mixing integer and decimal promotes to decimal
result = 10 + 5.5 // Double: 15.5
// Large numbers automatically become BigDecimal/BigInteger
result = 111111111111111111111111111 + 222222222222222222222222222
// BigInteger: 333333333333333333333333333
// Decimal operations use BigDecimal for precision
result = 0.1 + 0.2 // BigDecimal: 0.3 (not 0.30000000000000004!)
// Mixed operations promote to the highest precision type
intVal = 10
doubleVal = 5.5
bigDecVal = 100.123456789
result = intVal + doubleVal + bigDecVal // BigDecimal⚡ High Precision Math
💰 PrecisionEvaluate for Complex Expressions
🧮 Basic Arithmetic
🏷️ The numeric Type
numeric Type📚 Mathematical Built-In Functions (BIFs)
🔢 Basic Math Operations
Function
Purpose
Example
📐 Trigonometric Functions
Function
Purpose
Example
📊 Exponential & Logarithmic
Function
Purpose
Example
🎲 Random Number Generation
Function
Purpose
Example
🔧 Number Manipulation
Function
Purpose
Example
🔨 Bitwise Operations
Function
Purpose
Example
🎯 High Precision
Function
Purpose
Example
⚙️ Member Functions
Java Number Methods
🔄 Casting/Parsing
✅ Is it a number?
🔁 Looping with Numbers
🔗 Related Documentation
Last updated
Was this helpful?
