Archives
D Programming
DD.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++ - Warning 24: number is not representable
#include <stdio.h> #include <math.h> int main(){ long double a = powl(2, 2000); printf("%Lg = 2^2000 = %Lg\n", (long double) (1.14813e+602), a); return 0; } Why printf doesn't accept directly the value 1.14813e+602? Steve Aug 26 2003
Steve Hall wrote:Why printf doesn't accept directly the value 1.14813e+602? Aug 26 2003
Try putting an 'L' suffix on the number. "Steve Hall" <sthall lorrexinc.com> wrote in message news:bigqng$eo0$1 digitaldaemon.com...#include <stdio.h> #include <math.h> int main(){ long double a = powl(2, 2000); printf("%Lg = 2^2000 = %Lg\n", (long double) (1.14813e+602), a); return 0; } Why printf doesn't accept directly the value 1.14813e+602? Steve Aug 26 2003
|