www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - powl problem

↑ ↓ ← "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
↑ ↓ → 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