Closed Feoramund closed 5 days ago
This resolves my issues. Thank you so much! You're such a great contributor to this project!
For reference, this program:
v: f64 = 1
b := strings.builder_make()
strings.write_f64(&b, v, 'f')
vs := strings.to_string(b)
vv, _ := strconv.parse_f64(vs)
fmt.println(vv)
outputs 1.976262583364986e-308
without these changes.
With these changes it outputs just 1
.
Similarly, with v: f64 = 1.2
it outputs 1.1102230246251565
without these changes. But with these changes it outputs a perfect 1.2
.
✨✨✨✨
This should fix issues where
N00 / (pow+2)
results in a different number thanN / pow
.@karl-zylinski Would you be able to try this out and let me know if it resolves your issue with floating point precision loss from #3847?