The Ryū algorithm is a fast and accurate way to print floating-point numbers, using some clever bit magic and lookup tables.
At this time we implement only the 64-bit version of the algorithm, but in the future a 32-bit version could be implemented as well. But for now, when printing F32s we will first convert to F64.
Prior to this commit, we were relying on snprintf to print floating point numbers, which is slower and not as portable (it's not working on Windows without linking additional libraries).
The Ryū algorithm is a fast and accurate way to print floating-point numbers, using some clever bit magic and lookup tables.
At this time we implement only the 64-bit version of the algorithm, but in the future a 32-bit version could be implemented as well. But for now, when printing
F32
s we will first convert toF64
.Prior to this commit, we were relying on
snprintf
to print floating point numbers, which is slower and not as portable (it's not working on Windows without linking additional libraries).