I love this kind of stuff, there is so much going on under the hood.
-
RE: https://mastodon.social/@vitaut/115753735835555651
I love this kind of stuff, there is so much going on under the hood. If you do a calculation and ask a computer to print out the result, this involves actual work and algorithms to get what you expect. The computer can't just emit the number because it never uses "human" digits during calculations. @vitaut writes a library that does this conversion at lightning speed AND correctly.
-
RE: https://mastodon.social/@vitaut/115753735835555651
I love this kind of stuff, there is so much going on under the hood. If you do a calculation and ask a computer to print out the result, this involves actual work and algorithms to get what you expect. The computer can't just emit the number because it never uses "human" digits during calculations. @vitaut writes a library that does this conversion at lightning speed AND correctly.
@vitaut if this stuff fascinates you as well, I can recommend this post https://vitaut.net/posts/2025/smallest-dtoa/ on the modern "Schubfach" algorithm to convert floating point numbers to ASCII.
-
@vitaut if this stuff fascinates you as well, I can recommend this post https://vitaut.net/posts/2025/smallest-dtoa/ on the modern "Schubfach" algorithm to convert floating point numbers to ASCII.
-
@vitaut I just spent some quality time figuring out how the ZX Spectrum did all this. "Mostly not that well". https://breatharian.eu/sw/float/index_en.html
-
@vitaut I just spent some quality time figuring out how the ZX Spectrum did all this. "Mostly not that well". https://breatharian.eu/sw/float/index_en.html
@bert_hubert Interesting! I always thought they don’t have any FP support.
-
@bert_hubert Interesting! I always thought they don’t have any FP support.
@vitaut Clive Sinclair had a history with physical calculators based on chips that really shouldn’t have room for floating point. The downside was that it wasn’t all that precise.
-
undefined oblomov@sociale.network shared this topic
-
@vitaut Clive Sinclair had a history with physical calculators based on chips that really shouldn’t have room for floating point. The downside was that it wasn’t all that precise.
@bert_hubert @vitaut also it should be kept in mind that the ZX Spectrum was released before the IEEE-754 standard, and the standard itself was developed *because* the were a lot of incompatible and some honestly frankly horrid systems around, not just Sinclair's stuff.