W3C home > Mailing lists > Public > www-svg@w3.org > February 2015

Re: Numerical Limits in SVG coordinates?

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 6 Feb 2015 09:31:33 +1100
To: "Smailus, Thomas O" <Thomas.O.Smailus@boeing.com>
Cc: Amelia Bellamy-Royds <amelia.bellamy.royds@gmail.com>, Rik Cabanier <cabanier@gmail.com>, www-svg <www-svg@w3.org>
Message-ID: <20150205223133.GH15104@wok.mcc.id.au>
Smailus, Thomas O:
> Which brings me back to my original question – should we put some
> numerical precision guidance in the standard, that says something like
> “conforming viewers implement floating point as at least 32 bit
> precision in both mantissa and exponent, and integers with at least 32
> bit precision” or maybe IEEE 754 64 bit precision or ‘something’
> so that SVG creators have an expectation to target?

We already have this section:

  https://svgwg.org/svg2-draft/types.html#Precision

which is kind of hand wavey, but I would interprete to mean
“attributes/properties must at least accept the full range of IEEE 754
single precision finite numbers, and calculations for rendering etc.
must also be done with single precision”.

This of course makes software based on Cairo compiled in fixed point
mode non-conforming.

Requiring IEEE 754 double precision would definitely make Firefox non-
conforming, and I don’t think we could easily change.  Our graphics
library (that wraps Cairo, D2D, CoreGraphics etc.) uses single precision
values, and I think that decision was made because single precision is
used in GPU hardware, where more and more of the graphics processing is
happening.

-- 
Cameron McCormack ≝ http://mcc.id.au/
Received on Thursday, 5 February 2015 22:32:05 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:39 UTC