3 ms·
> Your language isn't broken, it's doing floating point math. Yes, your language is broken if you have no way out of floating point math. JavaScript, for examp
by mcculley 10y ago
> Your language isn't broken, it's doing floating point math.
Yes, your language is broken if you have no way out of floating point math. JavaScript, for example, is fundamentally broken.
- jacobolus 10y agoThere are a huge pile of libraries for doing bignum, rational, fixed point, decimal, complex, vector, polynomial, symbolic, etc. math in Javascript. If you want you can even write one for 7-adic arithmetic, Eisenstein integers, numbers expressed in the golden ratio base, or points on the surface of a torus. There’s no language that can build in all possible number systems, and it’s not really the place of a language to try. It would be nice if JavaScript made a better type distinction between integers and floats though.
- mcculley 10y agoYes, every Turing complete language can build integers and other types of numbers atop floating point numbers if necessary. That doesn't make it any less broken.