After month of development I have today commited refactored text<->double conversion routines (FormatDouble, ScanDouble...)
New routines should(*) guarantee that
- ScanDouble(FormatDouble(x)) == x for all finite doubles
- FormatG(x, 17) returns the same text as printf("%.17g", x) for all doubles
New routines are in the same speed class as ryu, wich seems to be current performance standard (conversion in both directions is around 20ns on modern CPU). (well, I believe my algorithm would be actually faster than ryu if it was doing the same thing, but U++ provides a lot of options which slow it down a bit to basically "ryu equivalent speed").
(*) Well, the theory behind is a bit complicated and I am still ironing details, but from practical point of view I have tested it so far with 300 billions of random double numbers and continue to do so...