Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=635511
--- Comment #16 from Tom "spot" Callaway <tcallawa(a)redhat.com> 2010-11-17
14:43:04 EST ---
Once I'd fixed up the test code (and built/installed a local 1.7.2 package), I
compiled it like this:
gcc -m64 -I/usr/include/irrlicht fast_atof.cpp -o fast_atof-172 -lIrrlicht
-lstdc++ -lm
(I haven't yet separated IrrXML from Irrlicht yet.)
The results in Comment 15 are from an example run on my Fedora 14 x86_64
laptop.
Then, I applied your patch to fast_atof.cpp, rebuilt and reinstalled, then
built a new copy of the test code. The results show that the new code is not
performing accurate calculations on some tests:
String '340282346638528859811704183484516925440.000000'
New fast 15581490439004356608.0000000000000000000000000000000000000000
Old fast 0.0000000000000000000000000000000000000000
atof
340282346638528859811704183484516925440.0000000000000000000000000000000000000000
String '3.402823466e+38F'
New fast
340282306073709652508363335590014353408.0000000000000000000000000000000000000000
Old fast 3.4028234481811523437500000000000000000000
atof
340282346638528859811704183484516925440.0000000000000000000000000000000000000000
String '3402823466e+29F'
New fast
340282346638528859811704183484516925440.0000000000000000000000000000000000000000
Old fast 3402823424.0000000000000000000000000000000000000000
atof
340282346638528859811704183484516925440.0000000000000000000000000000000000000000
String '-340282346638528859811704183484516925440.000000'
New fast -15581490439004356608.0000000000000000000000000000000000000000
Old fast -0.0000000000000000000000000000000000000000
atof
-340282346638528859811704183484516925440.0000000000000000000000000000000000000000
String '-3.402823466e+38F'
New fast
-340282306073709652508363335590014353408.0000000000000000000000000000000000000000
Old fast -3.4028234481811523437500000000000000000000
atof
-340282346638528859811704183484516925440.0000000000000000000000000000000000000000
String '-3402823466e+29F'
New fast
-340282346638528859811704183484516925440.0000000000000000000000000000000000000000
Old fast -3402823424.0000000000000000000000000000000000000000
atof
-340282346638528859811704183484516925440.0000000000000000000000000000000000000000
String '34028234663852885981170418348451692544.000000'
New fast 15581490439004356608.0000000000000000000000000000000000000000
Old fast 0.0000000000000000000000000000000000000000
atof
34028234663852885981170418348451692544.0000000000000000000000000000000000000000
String '3.402823466e+37F'
New fast
34028229593250485068252812361638871040.0000000000000000000000000000000000000000
Old fast 3.4028234481811523437500000000000000000000
atof
34028234663852885981170418348451692544.0000000000000000000000000000000000000000
String '3402823466e+28F'
New fast
34028234663852885981170418348451692544.0000000000000000000000000000000000000000
Old fast 3402823424.0000000000000000000000000000000000000000
atof
34028234663852885981170418348451692544.0000000000000000000000000000000000000000
String '-34028234663852885981170418348451692544.000000'
New fast -15581490439004356608.0000000000000000000000000000000000000000
Old fast -0.0000000000000000000000000000000000000000
atof
-34028234663852885981170418348451692544.0000000000000000000000000000000000000000
String '-3.402823466e+37F'
New fast
-34028229593250485068252812361638871040.0000000000000000000000000000000000000000
Old fast -3.4028234481811523437500000000000000000000
atof
-34028234663852885981170418348451692544.0000000000000000000000000000000000000000
String '-3402823466e+28F'
New fast
-34028234663852885981170418348451692544.0000000000000000000000000000000000000000
Old fast -3402823424.0000000000000000000000000000000000000000
atof
-34028234663852885981170418348451692544.0000000000000000000000000000000000000000
String '.00234567'
New fast 0.0023449999280273914337158203125000000000
Old fast 0.0023456700146198272705078125000000000000
atof 0.0023456700146198272705078125000000000000
*** ERROR - less accurate than old method ***
String '-.00234567'
New fast -0.0023449999280273914337158203125000000000
Old fast -0.0023456700146198272705078125000000000000
atof -0.0023456700146198272705078125000000000000
*** ERROR - less accurate than old method ***
String '0.00234567'
New fast 0.0023449999280273914337158203125000000000
Old fast 0.0023456700146198272705078125000000000000
atof 0.0023456700146198272705078125000000000000
*** ERROR - less accurate than old method ***
String '-0.00234567'
New fast -0.0023449999280273914337158203125000000000
Old fast -0.0023456700146198272705078125000000000000
atof -0.0023456700146198272705078125000000000000
*** ERROR - less accurate than old method ***
String '1.175494351e-38F'
New fast 0.0000000000000000000000000000000000000118
Old fast 0.0000000000000000000000000000000000000118
atof 0.0000000000000000000000000000000000000118
*** ERROR - less accurate than old method ***
String '1175494351e-47F'
New fast 0.0000000000000000000000000000000000000118
Old fast 1175494400.0000000000000000000000000000000000000000
atof 0.0000000000000000000000000000000000000118
String '1.175494351e-37F'
New fast 0.0000000000000000000000000000000000001175
Old fast 0.0000000000000000000000000000000000001175
atof 0.0000000000000000000000000000000000001175
*** ERROR - less accurate than old method ***
String '1.175494351e-36F'
New fast 0.0000000000000000000000000000000000011755
Old fast 0.0000000000000000000000000000000000011755
atof 0.0000000000000000000000000000000000011755
*** ERROR - less accurate than old method ***
String '-1.175494351e-36F'
New fast -0.0000000000000000000000000000000000011755
Old fast -0.0000000000000000000000000000000000011755
atof -0.0000000000000000000000000000000000011755
*** ERROR - less accurate than old method ***
String '123456.789'
New fast 123456.7890625000000000000000000000000000000000
Old fast 123456.7890625000000000000000000000000000000000
atof 123456.7890625000000000000000000000000000000000
String '-123456.789'
New fast -123456.7890625000000000000000000000000000000000
Old fast -123456.7890625000000000000000000000000000000000
atof -123456.7890625000000000000000000000000000000000
String '0000123456.789'
New fast 123456.7890625000000000000000000000000000000000
Old fast 123456.7890625000000000000000000000000000000000
atof 123456.7890625000000000000000000000000000000000
String '-0000123456.789'
New fast -123456.7890625000000000000000000000000000000000
Old fast -123456.7890625000000000000000000000000000000000
atof -123456.7890625000000000000000000000000000000000
Calculation is not accurate, so the speed is irrelevant
--
Configure bugmail:
https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.