4 ms·
that js implements the floating point standard is not js' fault. but that parse("1something unreasonable", 2) == 1 is just wrong. it should generate an exceptio
by ibotty 14y ago
that js implements the floating point standard is not js' fault. but that parse("1something unreasonable", 2) == 1 is just wrong. it should generate an exception.
- esbwhat 14y agothis wouldn't actually solve the problem for base 36, though.
- brohee 14y agoActually it would break on the space character.
- ibotty 14y agothat's why i included a space character :D.
- batista 14y agoIf the string only had base 36 digits (ie not a space as above), then it wouldn't be a problem, it would a perfectly fine conversion from base36 string to base10 number.