[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Floating point problems



> What's wrong with the following program?
> 
> main() {
>         double x = 1.0;
>         x *= 1e-310;
> }
> 

This is a denormal. From float.h:

   /* Minimum normalised double */
#undef DBL_MIN
#define DBL_MIN 2.2250738585072014e-308

cu,

Jo
-- 
-----------------------------------------
Johannes Hausmann
Carl von Ossietzky Universitaet Oldenburg
FB Physik -- AG Komplexe Systeme

EMail : joe@neuro.uni-oldenburg.de
-----------------------------------------



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []