Skip to content

David Votrubec | Notes about programming

Tag Archives: precission

Javascript math. LOL

How much is 77.9 – 70? Usually it is 7.9. Right? But not so in Javascript. In Javascript it is 7.900000000000006. Funny as hell 🙂 You can “fix” this by calling .toFixed() on the result number, but it does not fix the cause. As far as I know you can’t fix it, it is part of […]

Posted byDavid VotrubecSeptember 4, 2012February 18, 2013Posted injQueryTags: Javascript, number, precissionLeave a comment on Javascript math. LOL
David Votrubec | Notes about programming, Proudly powered by WordPress.