Skip to main content
Question

Extra decimals

  • July 10, 2018
  • 3 replies
  • 24 views

Forum|alt.badge.img

Hi

I wonder why FME sometimes add more decimals.

For example:

 

If I import the number 652314.30, FME sometimes convert it to 652314.300000004

Does anyone know why?

I see this problem quite often and I solve it with the string formatter.

/Fredrik

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.

3 replies

david_r
Celebrity
  • 8392 replies
  • July 10, 2018

This is a very common complaint when doing floating point arithmetic outside of Excel etc which tends to mask the underlying issue, which isn't related to FME but to how floating point numbers are stored and manipulated by the computer.

This is a good resource that explains in simple terms what's happening: https://floating-point-gui.de/


Forum|alt.badge.img

Hi!

 

I have this problem all the time. Is there a way to limit the number of decimals for a given value using the amount of decimals it has when it is read?

david_r
Celebrity
  • 8392 replies
  • April 30, 2020

Hi!

 

I have this problem all the time. Is there a way to limit the number of decimals for a given value using the amount of decimals it has when it is read?

Did you try the AttributeRounder?