Nasty bug in modp_dtoa #141

Open
opened 2026-01-29 20:38:22 +00:00 by claunia · 0 comments
Owner

Originally created by @jeroen on GitHub (Sep 21, 2016).

I got bitten by a this long standing bug in modp_dtoa{,2,3}: https://github.com/client9/stringencoders/issues/40. I was able to reproduce it with brotli as well.

The following values should rond to 1.0 but instead return 0.1

modp_dtoa(0.95, str, 1); 
modp_dtoa(0.9999995, str, 6); 

Unfortunately upstream does not seem to be maintained anymore.

Originally created by @jeroen on GitHub (Sep 21, 2016). I got bitten by a this long standing bug in `modp_dtoa{,2,3}`: https://github.com/client9/stringencoders/issues/40. I was able to reproduce it with brotli as well. The following values should rond to `1.0` but instead return `0.1` ``` c modp_dtoa(0.95, str, 1); modp_dtoa(0.9999995, str, 6); ``` Unfortunately upstream does not seem to be maintained anymore.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#141