Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh converts a floating-point number to string with too much precision



2019-12-21 10:43:43 +0100, Roman Perepelitsa:
[...]
> There is no simple algorithm that achieves this. I recall reading long
> papers a few years back that were describing various inventions in
> this field. They were pretty scary.

https://github.com/openjdk/jdk/blob/f4af0eadb6eaf9d9614431110ab7fc9c1588966d/src/java.base/share/classes/jdk/internal/math/FloatingDecimal.java#L424
is not exactly trivial. I enjoyed reading the comments even if I
have not clue what the the code is doing.

-- 
Stephane



Messages sorted by: Reverse Date, Date, Thread, Author