Re:Announcing TypeScript 2.0
by keithnz on Thursday September 22, 2016 @06:04PM
(#12560719)
when you work with floats, never expect anything to exactly equal a value, ie, it should be banned to use <float> === <constant> . That is universal across languages, for exact representations often languages provide another type. But floating point is popular because CPUs can natively work with them.
[ Parent
| on HN ]
For financial work, you want to use a fixed precision or binary coded decimal library, such as java's BigDecimal.
You knew that, but I'm just spelling it out for others.
Re:Announcing TypeScript 2.0
by qwertyuiop924 on Friday September 23, 2016 @05:54AM
(#12563428)
...Or you could use Scheme, where we have precise numbers (fractions)