[rrd-users] CDEF,RPN, no decimal constant possible?

Steve Shipway s.shipway at auckland.ac.nz
Thu Jul 10 23:48:16 CEST 2014

> rrd use really the formula "DeLog_L,LOG,4,*"
> The fractional part is lost.

You didn't say which version of RRDTool you're using; I'm assuming 1.4.x

The RPN parsing happens in rrd_rpncalc.c in function rpn_parse() (called by

This explicitly sets locale to be "C"; then it tries to use sscanf with
"%lf" which should correctly read in a decimal, regardless of your current
locale using commas as a decimal separator or not.

I know I've successfully used decimals in a CDEF previously, and as far as I
can tell, the COMPUTE DS uses the same parsing function.  Which version of
RRDTool are you using?  Possibly it is an older one (I think COMPUTE
appeared in v1.2 back in 2001, but not sure about decimals in RPN)


Steve Shipway
s.shipway at auckland.ac.nz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5909 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-users/attachments/20140710/8b2cb018/attachment.bin 

More information about the rrd-users mailing list