XML editor doesn't preserve entered numbers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
In Inkscape 0.92.2 (5c3e80d, 2017-08-06), the XML editor doesn't preserve the numbers I enter, even when they have few enough digits to be exactly representable.
As an example, create a circle and edit it using the XML editor. For the radius, enter "9.3". Then press Ctrl+Enter to commit this value. The value is autocorrected to 9.3000002. This is unexpected since when I enter "9.3" in the text field, I expect that the closest representable float/double value is actually stored in memory. And when converting that value back into a string, the shortest decimal representation should be chosen for that number.
Since typical C libraries don't implement this feature (neither does Python, but Java does), have a look at https:/
confirmed on Windows 10, Inkscape 0.92.2 (5c3e80d, 2017-08-06)
<offtopic>
however, it is probably not fair to blame this on the XML editor, since there are a variety of other types of operations going on in the background, such as converting from document-units to px, and possibly back again, and scaling according to the size of the viewbox.
</offtopic>