in reply to Getting rounded off values from database.

My question is this. Does the first row print all 16 digits to the right of the decimal point? Then the others print 0, 1, or 2 digits to the right of the decimal point?

e.g. is the output something like this?:

1/1/2005 12/31/2999 11.3700000000000016 1/1/2005 12/31/2999 7.54 1/1/2005 12/31/2999 12.07 1/1/2005 12/31/2999 3 1/1/2005 12/31/2999 3.8 1/1/2005 12/31/2999 12.99
..because if it is then I suspect that what you want to do is print 16 digits to the right of the decimal point regardless of whether they are significant or not. In which case do something like this for your printing line:
printf( DISCOUNT "%s\t%s\t%.16f\n" $mdstartdate,$mdenddate,$mddiscountrate );

Replies are listed 'Best First'.
Re^2: Getting rounded off values from database.
by Nesh (Beadle) on Jul 06, 2005 at 23:26 UTC
    No,the output looks like this:
    BA 01-JAN-05 31-DEC-99 11.37 BO 01-JAN-05 31-DEC-99 7.54 EQ 01-JAN-05 31-DEC-99 12.07 FI 01-JAN-05 31-DEC-99 3 MO 01-JAN-05 31-DEC-99 3.8 SP 01-JAN-05 31-DEC-99 12.99