BigDecimal

manhattan taxi drivers don't accept ieee754.Arthur Whitney

BigDecimal is a primitive type that represents arbitrary large floating point numbers in base 10.

A BigDecimal can be constructed by calling the BigDecimal() function or by adding m after the number literal, for example, 100.5m.

typeof of a big decimal value returns "bigdecimal".

BigDecimal supports arithmetic and comparison operators.

Syntax

BigDecimal

Properties

Prototype Properties

Examples

1.5m
1.5
typeof 1.5m
"bigdecimal"
BigDecimal(1.5)
1.5
BigDecimal("1.5")
1.5