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 bug

↑ ↓ ← "David Grimes" <dgrimes friberg.us> writes:
#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> writes:
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