.0000000000000002 automatically added to my values

   1944   2   0
User Avatar
Member
1 posts
Joined: Oct. 2020
Offline
Hello!

I was wondering why when I enter a value (let's say 3.2) in a parameter, it automatically changes it to 3.2000000000000002.
If I enter 3.0, it works. But as soon as add a number after the “dot” it adds .0000000000000002.
My OCD cannot handle it.

Right now, it's doing it with on a box sizeY.

Is it a bug? Thanks

Attachments:
Houdini.jpg (28.8 KB)

User Avatar
Member
7803 posts
Joined: Sept. 2011
Offline
It's not added, that's just the closest number to the value that exists. There's no such number as 3.2 in floating point. Floating point can't represent all decimal numbers exactly.

some background:
https://en.wikipedia.org/wiki/IEEE_754 [en.wikipedia.org]
https://en.wikipedia.org/wiki/Floating-point_arithmetic [en.wikipedia.org]
User Avatar
Member
433 posts
Joined: April 2018
Offline
Just left click on the word “Size” and it will toggle back to normal human numbers.
Subscribe to my Patreon for the best CG tips, tricks and tutorials! https://patreon.com/bhgc [patreon.com]

Twitter: https://twitter.com/brianhanke [twitter.com]
Behance: https://www.behance.net/brianhanke/projects [www.behance.net]
  • Quick Links