On 11-Sep-2014 10:23, Nathan Hurst wrote:
Ok, that's another vote for using double precision everywhere. That gets us 14-15 digits, which should be enough for anybody.
Adding more digits to the numerical representation does not in itself provide numerical stability, it just makes it easier to sweep the problem under the carpet of "looking at a smallish number of digits".
Conversely, at least with respect to this units question, numerical stability, which for the purposes of this conversation means when a diff of two SVG's shows no changes, can be achieved if the lengths and coordinates inside the document are never changed, instead only one transform (or its equivalent) at the top level is. Then an end user could flip endlessly between different document units and never corrupt the numerical representations in the drawing. The only change that would show up, if no other changes were made, would be the values for that one transform.
This assumes that the code did this:
"we are currently using mm, user wants inches, REPLACE document unit transform with the pixels to inch transform"
If instead it did:
"we are currently using mm, user wants inches, MULTIPLY document transform by mm to inches conversion"
then the single unit transform itself might not be numerically stable. (It could be if all of the units scaling factors have terminating binary representations with precision to spare, and the same is true for all combinations of their products.)
Regards,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech