Skip to content
Discussion options

You must be logged in to vote

Hi, this is an issue we've struggled with for a while. You can see other instances in some of our other modules, for example here's a snippet from the pregnancy module:

At this point the only 2 options are to either ignore the unsightly extra digits (they shouldn't impact the results in a meaningful way) or to change the value to a number that works better. (Eg, in this case, 0.04 or 0.042 should display as expected, though depending on your module those may be too different from the desired value.)

For a little explanation of what's going on, this is one of the limitations of floating point numbers in computers. See: https://0.30000000000000004.com/
It is something we could fix in the m…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Gilgeam
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants