mruby/mruby — pull request #2532 by chasonr (2014-08-14 03:39:30+00:00)
Title: Remove some roundoff from mrb_flo_to_str

The floating point number 3.125 converts to string as "3.12499999999999", even though it can be exactly represented in binary.

This change removes a source of roundoff error from mrb_flo_to_str. Once the decimal point has been generated, instead of using pow(10.0, m) to extract the next digit, it multiplies n by 10 with each pass. 3.125 now converts as "3.125".