I actually hadn't fully understood that the "Ctrl+" zoom in desktop browsers shrinks the viewport rather than doing an actual zoom (unlike pinch-to-zoom on a touch device) until I had put the media queries in place — whoops.
----
As an aside, you or another might be interested: you can configure Firefox to do a "pinch-zoom" style zoom when you do "Ctrl+scrollwheel" on the mouse:
Short version: set "mousewheel.with_control.action = 5" in about:config.
Longer discussion: https://www.tenforums.com/browsers-email/204202-firefox-enab...
That way, you can always zoom with confidence that a site won't rejigger its layout as a result.
(but obviously I'll update my rules to make the default behavior better, too)
- Google's double-conversion [1], which is best known for introducing the Grisu family of new float-to-decimal algorithms but also has a much less documented float-to-decimal algorithm via successive approximations AFAIK.
- The Eisel-Lemire algorithm [2], which is a Grisu3-like algorithm and returns either correct digits or a much rare fallback signal and currently in the standard libraries of Go and Rust.
- I believe Microsoft's own C Runtime (msvcrt, later ucrt) also has a completely separate code which algorithm is roughly similar to one of above.
These implementations also clearly demonstrate that such conversion only needs a bigint support of the bounded size (~3 KB) and can be done in much smaller code than dtoa.
[1] https://github.com/google/double-conversion
[1] https://lemire.me/blog/2020/03/10/fast-float-parsing-in-prac...
I did a blog post about it: https://www.fixscript.org/blog/math-library (includes interactive demos)
Any opinions?
In other words-- what percentage of outstanding publicly-accessible data sets require an implementation of strod which can allocate memory on the heap?
Even this article, which talks about millions of digits, could be parsed just fine with a strod that's limited to 64 characters.