RE: Numerical Limits in SVG coordinates?

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?

For SVG to be a viable replacement for engineering work with CGM, it needs to provide fundamental engineering capabilities – which includes a predictable and large enough resolution in its numerical values.

Thomas
--
Thomas Smailus, Ph.D.  P.E.
Boeing Information Technology
thomas.o.smailus@boeing.com

From: Amelia Bellamy-Royds [mailto:amelia.bellamy.royds@gmail.com]
Sent: Monday, February 02, 2015 17:42
To: Rik Cabanier; www-svg
Subject: Re: Numerical Limits in SVG coordinates?

Ooops!  That's what I get for whipping up an answer without actually testing anything...  Thanks for checking Rik.

I didn't look closely to see how small the deltas were compared to the magnitude in the shape coordinates.   I looked at the viewBox, and thought the overall coordinate system dimensions to absolute value was still reasonable enough that the lower-precision digits wouldn't be significant.  I didn't factor in the transform on the shape.

For Thomas, this clearly wasn't the answer you wanted to hear, but a normalization process is definitely going to be necessary.  You'll need to figure out a way to store the information about that conversion process (and the original coordinates) in metadata, and access it when necessary to align multiple drawings.

ABR

On 2 February 2015 at 18:12, Rik Cabanier <cabanier@gmail.com<mailto:cabanier@gmail.com>> wrote:

Actually not :-)
Single precision floats have 6 to 9 digits of precision [1] depending how you convert, so Thomas' example might be losing details even on conforming readers.
I saved his example to a fiddle and only IE is able to display it: http://jsfiddle.net/d31nv0sy/1/

Chrome, Safari and Firefox all show a blank page.

Received on Thursday, 5 February 2015 22:15:48 UTC