Skip to main content
Solved

From string type to double type and reduce the decimals

  • May 29, 2020
  • 2 replies
  • 121 views

Hi,

I have an attribute (string type) with values such as 37908.907836. If I use an AtributeRounder, I can reduce it to 37908.907. That's ok. But if I convert the string type to double type, the decimals comes again...

 

I have tried to convert first and to apply the AttributeRounder later but it doesn't work. Any suggestion?

 

Thanks!

Best answer by david_r

This is unfortunately the way floating point numbers work in computers, see https://floating-point-gui.de/

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

david_r
Celebrity
  • 8392 replies
  • Best Answer
  • May 29, 2020

This is unfortunately the way floating point numbers work in computers, see https://floating-point-gui.de/


Oh! I didn't know that! Thanks a lot for the answer!