New module to perform decimal floating point arithmetic for charts.
authorJohn Darrington <john@darrington.wattle.id.au>
Tue, 6 Jan 2015 06:25:21 +0000 (07:25 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 16 Jan 2015 10:04:03 +0000 (11:04 +0100)
This change adds a small module to perform floating point arithmetic
with a decimal base, and uses it to calculate the graticule marks for
charts.

Rationale:  Graticule marks want to be displayed in decimal.  However
not all decimal values can be represented in a double precision
floating point binary.  This approach pushes the precision loss from
the value of the mark, to the position on the chart - we don't
particularly care if a tick mark is a fraction of a pixel out of place,
but we do care if 4.0 is displayed as 3.9999999999

Reviewed-by: Ben Pfaff

No differences found