How to Stop Floating Point Money Bugs
0.1 + 0.2 is not 0.3 in JavaScript.
How to Stop Floating Point Money Bugs
0.1 + 0.2 is not 0.3 in JavaScript.
Zmij: Faster floating point double-to-string conversion
https://vitaut.net/posts/2025/faster-dtoa/
#HackerNews #Zmij #FloatingPoint #Conversion #FasterDtoa #Programming #TechNews
0.1 + 0.2 = 0.30000000000000004?!
JavaScript math is broken! Adding 0.1 + 0.2 creates a number that will shock you. This is why financial apps fail! Watch the chaos!
#javascript #javascripttricks #codingtips #programmingtutorial #floatingpoint #javascriptquiz #codingchallenge #javascriptshorts #javascriptbugs #mathprecision #javascriptwtf #numberprecision
found+fixed a #bug : part of one track was using single precision float instead of double in one critical segment; it worked ok at 48kHz sample rate but at 96kHz it reached #FloatingPoint precision limits leading to a counter failing to increment past a certain point, meaning the track end condition was never reached...
Explainer: Numbers
https://fed.brid.gy/r/https://eclecticlight.co/2025/12/06/explainer-numbers/
This is still the best thing ever: https://i.kym-cdn.com/photos/images/newsfeed/002/128/164/13b.png #FloatingPoint #Meme #ProgrammerHumor — #microblogging #MicroToot: 137 characters
i just found https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ by @randomascii and i am amazed.
thank you for this great post!
#APLQuest 2013-07: Write a function that selects the floating point (non-integer) numbers from a numeric vector (see https://apl.quest/2013/7/ to test your solution and view ours).
did some minor hacking on #Fraktaler3 today for the first time in months.
- fixed it so it works with toml11 v4 (run "make") as well as v3 (run "make TOML11=3")
- removed "quit when done" checkbox from android and web builds, where it doesn't make sense
- fix: correct status is now shown when pressing ESC after the rendering is complete
- added double precision version of floatexp (separate floating point mantissa and integer exponent, for wider dynamic range necessary for very deep zooms); the extra precision of doubleexpover single precision floatexp turns out to be necessary sometimes (more often with higher power formulas and higher iteration counts)
- fixed the mildly bitrotted quadruple precision float128 support, now works again enabled (run "make") and disabled (run "make FLOAT128="). hopefully it won't be necessary to use it for more than checking that double precision image are plausible, because it's very slow.
Nên sử dụng số thập phân thay cho số浮 điểm trong ngôn ngữ lập trình cấp cao. Số浮 điểm nhanh nhưng có hạn chế, trong khi phần cứng hiện đại đã giải quyết vấn đề hiệu suất. Sử dụng số thập phân chính xác có thể tiết kiệm thời gian và công sức cho lập trình viên. #LậpTrình #NgônNgữLậpTrình #SốThậpPhân #SốFloat #HiệuSuất #LậpTrìnhCấpCao #Programming #FloatingPoint #ArbitraryPrecisionArithmetic
Nên thay đổi số mặc định trong ngôn ngữ lập trình cấp cao: không nên sử dụng số thực mà nên sử dụng số thập phân chính xác. u điểm của số thực là nhanh, nhưng hạn chế lớn là không chính xác. #LậpTrình #NgônNgữLậpTrình #SốThực #SốThậpPhân #Programming #FloatingPoint #Arithmetic
watch me improve my approximate revelry. watch me double the precision of my gloating point.
What kind of mishegus is this?
"There are ARM processors that have mixed-endian floating-point representation for double-precision numbers: each of the two 32-bit words is stored as little-endian, but the most significant word is stored first."
Thank you for looking it up and for the pointer.
Yes, Henry Baker has done many good deeds.
There's a nice little puzzle about this format in the MIT HAKMEM.
I ask not to publish a solution, even if obvious, so it can be used to try AI.
(AI couldn't solve it about a year ago; I haven't tried it since.)
Find a non-zero number whose two internal representations as (1) a machine integer and (2) a floating-point value have the same bits.
Continued.
IEEE754 moment.
Finally got FloatExp numbers to work. A FloatExp datatype is a real-valued struct, which contain a floating point number and an extra integer, which holds the exponent.
Then, a real number {mantissa, exponent} can be represented using mantissa×2^exponent.
Using this method, numbers far beyond the range of single and double precision floating point numbers can be represented.
This image is computed using a 32+32 bit floatexp (32 bit mantissa and 32 bit exponent). Plain 32 bit floats are not enough. Of course, perturbation and linear acceleration is also used.
#Devlog #Fractal #Mandelbrot #DeepZoom #FloatingPoint #FloatExp
🎈 Oh joy, another groundbreaking exposé on the thrilling world of floating-point representation! 🙄 If you've ever found yourself desperate for a #bedtime #story about bit patterns and base conversions, this is your cure for insomnia. 🤦♂️ Thanks, Bartosz, for making #math feel even less exciting than it already is! 📉
https://float.exposed/ #floatingpoint #humor #technews #HackerNews #ngated
🏃🏻♀️ Why Is Japan Still Investing In Custom Floating Point Accelerators?
#hardware #japan #electronics #microelectronics #microchip #math #floatingpoint
🚫 Oh look, an article that's as accessible as a locked treasure chest in a pit of lava 🌋🔒. Japan's floating point fascination must be so secret, even the internet can't peek without getting a "403 Forbidden" slap! 😂
https://www.nextplatform.com/2025/09/04/why-is-japan-still-investing-in-custom-floating-point-accelerators/ #HackerNews #Japan #FloatingPoint #InternetAccess #Forbidden #403Error #HackerNews #ngated