Subject: Re: handling very small doubles
To: None <leo@dachau.marco.de>
From: Phil Nelson <phil@cs.wwu.edu>
List: port-pc532
Date: 09/15/1998 08:23:15
It doesn't have to be very small doubles.  Check out

---->~
steelhead[87]$ cat double.c
#include <stdio.h>
#define DBL_VAL         2.2250738585072014E-30
#define SDBL_VAL        "2.2250738585072014E-30"
void main () {
  double x;
  sscanf (SDBL_VAL, "%g", &x);
  printf ("%g %g %d %d %d\n",
          DBL_VAL, x, DBL_VAL > x, DBL_VAL == x, DBL_VAL < x);
}

---->~
steelhead[88]$ gcc double.c

---->~
steelhead[89]$ a.out
2.22507e-30 6.80216e-313 1 0 0


-- 
Phil Nelson                    NetBSD: http://www.netbsd.org
e-mail: phil@cs.wwu.edu        !gifs: http://www.gnu.org/philosophy/gif.html
http://www.cs.wwu.edu/~phil