Message 1 of 22
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to exactly convert a number in a string to a number so that it has the same rounding.
An example that doesn't work for me.
(cvunit 35.5 "KG" "OZ")
1252.23
(rtos (cvunit 35.5 "KG" "OZ") 2 3)
"1252.226"
Now how do I convert the string from this "1252.226" calculation to a real number?
Such action
(atof (rtos (cvunit 35.5 "KG" "OZ") 2 3))
returns 1252.23, not 1252.226!
Solved! Go to Solution.