-
Bug
-
Resolution: Unresolved
-
Low
-
Code Generation Tools
-
CODEGEN-62
-
SDSCM00008652
-
-
Description:
The algorithm used for pow [exp(log(x),y)] is correct but sometimes leads to a precision error for some inputs, due to rounding bugs in floating-point handling.
==========================================================
Additional Fields:
StepsToReproduce:
All of these results are exactly representable (powers of two)
% cl2000 -v28 SDSsq34243.c -z -llnk2800.cmd -lrts2800.lib
% load2000 -v28 a.out
pow(2,12) == 45800000 == 4.096000e+03
pow(2,13) == 45fffff8 == 8.191996e+03
pow(2,14) == 46800000 == 1.638400e+04
pow(2,15) == 46fffff8 == 3.276798e+04
pow(2,16) == 47800000 == 6.553600e+04
pow(2,17) == 48000004 == 1.310721e+05
pow(2,18) == 48800000 == 2.621440e+05
pow(2,19) == 49000004 == 5.242882e+05
pow(2,20) == 49800000 == 1.048576e+06
pow(2,21) == 4a000004 == 2.097153e+06
pow(2,22) == 4a800000 == 4.194304e+06
pow(2,23) == 4b000004 == 8.388612e+06
pow(2,24) == 4b800000 == 1.67772
FoundInBuildVersion:
IntegratedBuildState:
IntegratedBuildType:
IntegrationBuildType:
IntegrationBuildVersion:
IntegrationEngineer:
IntegrationEngineerName:
Phase Found In:
Environment:
Host:
Solaris 7
Target :
Custom List :
Custom Data:
DAYS OF EFFORT : 10
CCB Data: