the attached patch increases the precision of the FloatingLiteral rewrite significantly. With the patch sometimes the output is no longer "pretty". However it is always precise. Before the change I had serious trouble with rounding errors.
I hope the proposed approach is considered better than the old one. Of course it might be possible to make it sometimes much prettier while not loosing too much precision but I'm not sure how exactly (what is the definition of "loosing too much precision") and whether it is worth the effort.
precise_rewrite.patch (657 Bytes)