c++ - powl bug
- "David Grimes" <dgrimes friberg.us> Nov 03 2003
- Keith Fuller <Keith_member pathlink.com> Nov 03 2003
#include <math.h>
#include <stdio.h>
int main(){
printf("(1.45445e-500)^0.707316 = %Lg", powl(1.45445e-500l, 0.707316l));
return 0;
}
The output from the above code (compiled with DMC v8.37) is:
(1.45445e-500)^0.707316 = 0
David
Nov 03 2003
I get the same result in Visual Basic. VB is also wrong. Or maybe not. In article <bo5efg$n6e$1 digitaldaemon.com>, David Grimes says...#include <math.h> #include <stdio.h> int main(){ printf("(1.45445e-500)^0.707316 = %Lg", powl(1.45445e-500l, 0.707316l)); return 0; } The output from the above code (compiled with DMC v8.37) is: (1.45445e-500)^0.707316 = 0 David
Nov 03 2003








Keith Fuller <Keith_member pathlink.com>