Fedor
Fedor

Reputation: 1444

Floating decimal point type in Haxe

Is there floating decimal point type in Haxe (similar to decimal.Decimal in Python, i.e. http://en.wikipedia.org/wiki/IEEE_854-1987)? For the application I have float is not an option due to possible precision problems.

Upvotes: 3

Views: 299

Answers (1)

Gama11
Gama11

Reputation: 34128

I don't think anything like that exists in the standard library, apart from target-specific externs such as java.math.BigDecimal. So if you want a cross-platform solution, you would need a third-party library.

One that comes to mind is thx.Decimal from the thx.core library. Having a look at the associated test cases may be helpful since there's not much documentation.

Upvotes: 1

Related Questions