DoubleFormatter
object DoubleFormatter
Turns a double into a set of digits and an exponent, the same code Jackson and OpenJDK use.
References:
Giulietti, "The Schubfach way to render doubles"
IEEE Computer Society, "IEEE Standard for Floating-Point Arithmetic"
Bouvier and Zimmermann, "Division-Free Binary-to-Decimal Conversion"
Divisions are avoided throughout, which helps architectures where they are slow. Section 10 of reference 1 covers that.