[rrd-developers] DBL_MIN (was: FOUND IT! )

Stanislav Sinyagin ssinyagin at yahoo.com
Thu May 1 14:54:21 MEST 2003

Hi all, 

--- Stanislav Sinyagin <ssinyagin at yahoo.com> wrote:
> By the way, this was a good example of (valid) RRD data that could block 
> the grapher. Perhaps those near-limit numbers with too low exponents 
> need better treatment:
> let's say alpha is the smallest positive double that is not null, 
> and H is the graph height, or some other characteristic number, 
> then the numbers between 
> 0+(alpha*H) and 0-(alpha*H) should be treated as zero.

speaking more precisely, that value wasn't valid: 
it was: 
  (gdb) p im->maxval 
  $2 = 2.4999999999986337e-312
  (gdb) p (im->maxval - im->minval)
  $3 = 5.00000000001703e-313

while in limits.h it's said:
#define DBL_MIN         2.2250738585072014E-308 /* min decimal value of a */
                                                /* "double" */

With these values, even fabs() returned wrong value, and I couldn't 
compare them with (DBL_MIN*im->ysize).

Still, I think it would be interesting to valiidate the input data 
against DBL_MIN (and DBL_MAX?), and check minval and maxval against 
(DBL_MIN*im->ysize) when computing the grid positions. 


Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the rrd-developers mailing list