www.digitalmars.com         C & C++   DMDScript  

c++ - powl problem

reply "David Grimes" <dgrimes friberg.us> writes:
#include <math.h>
#include <stdio.h>

int main(){
 printf("(-1544)^(5.35273e-4924) = %Lg\n", powl(-1544.0l, 5.35273e-4924l));

 return 0;
}

The output of the above code compiled with DMC v8.38n is:
(-1544)^(5.35273e-4924) = 1

David
Jan 04 2004
parent Keith Fuller <Keith_member pathlink.com> writes:
Visual Basic returns the same result.

In article <bt8smu$pc6$1 digitaldaemon.com>, David Grimes says...
#include <math.h>
#include <stdio.h>

int main(){
 printf("(-1544)^(5.35273e-4924) = %Lg\n", powl(-1544.0l, 5.35273e-4924l));

 return 0;
}

The output of the above code compiled with DMC v8.38n is:
(-1544)^(5.35273e-4924) = 1

David

Jan 05 2004