Hi Timo, > On Thu, Mar 06, 2008 at 01:44:30AM +0100, Timo Stripf wrote: > > Hello, > > > > i've implemented a nan-safe add operator (ADDNAN) into rrd. I used it > > to add several incomplete graphs. > > > > NaN + NaN => NaN > > x + NaN => x > > NaN + y => y > > x + y => x + y > [...] > Quite often 'NaN' does not mean 'nothing'. In many cases substituting > the average of the two neighbours (not direct neighbours per se) would > make more sense. > > At the very least I think this feature deserves more documentation than > just a line or two.
How about doing this explicitly: x=a,UN,0,a,IF,b,UN,0,b,IF,+ then the effort for doing it has some relationship to the 'danger' of the operation. or if you insist to make this simpler, how about implementing a NANTOZERO operator ? x=a,NANTOZERO,b,NANTOZERO,+ cheers tobi -- Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten http://it.oetiker.ch [EMAIL PROTECTED] ++41 62 213 9902 _______________________________________________ rrd-developers mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
