Hi,

At Thu, 22 Apr 2004 02:48:18 +0900,
Gavin Kistner wrote in [ruby-talk:97891]:
> (The issue is not the lack of float precision...that's gotta give out 
> at some point. The issue is the "5" vs. "5.0" discrepancy.)

Seems the issue about the boundary between "e" and "f".


Index: numeric.c =================================================================== RCS file: /cvs/ruby/src/ruby/numeric.c,v retrieving revision 1.106 diff -u -2 -p -r1.106 numeric.c --- numeric.c 14 Apr 2004 04:06:25 -0000 1.106 +++ numeric.c 21 Apr 2004 18:54:14 -0000 @@ -517,5 +517,5 @@ flo_to_s(flt) else fmt = "%.16e"; } - else if ((d1 = modf(value, &d2)) == 0) { + else if (fabs(modf(avalue, &d2)) <= 1.0e-15) { fmt = "%.1f"; }
-- Nobu Nakada