That's arguably a problem in almost every language that follows the IEEE 754 standard. It doesn't make much sense to pin that problem solely on Javascript.
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.
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)
Re:Announcing TypeScript 2.0
by qwertyuiop924 on Thursday September 22, 2016 @05:42PM
(#12560579)
JS does that... And so does C, and just about every other language out there.
Well, here's one way around that, at least on the server:
https://github.com/roboprog/nashorn_play/blob/master/script/...
Unfortunately that's something TypeScript doesn't tackle, but you can use external libraries for floats, where you work on floats as... strings.