Hi,
I remember getting some results a while ago that I was planning on asking. Basically sometimes I was typing integers into numeric fields and was getting tiny fractions like .0000004 or something.
I don't remember the exact values, but is this common? I ask this because I am wondering if H12's moving everything to doubles will fix this issue?
Thanks all
Houdini precision
5287 5 0- magneto
- Member
- 131 posts
- Joined: Oct. 2011
- Offline
- orr
- Member
- 98 posts
- Joined: Jan. 2008
- Offline
- silvina
- Staff
- 181 posts
- Joined: July 2005
- Offline
- axebeak
- Member
- 51 posts
- Joined: Oct. 2006
- Offline
Are you sure those numbers were integers?
This happens with floating-point values when the field is in “expression” mode (see the pic). (Edit: Sorry, didn't see this was already explained while I was typing my response.)
I don't think it has anything to do with internal precision though, some numbers are just not representable exactly in binary form, either floats or doubles.
For example, try the following in Python Shell (Python uses doubles):
print ‘%(#).17f’ % {“#”:1.0/10}
print ‘%(#).17f’ % {“#”:0.7}
This happens with floating-point values when the field is in “expression” mode (see the pic). (Edit: Sorry, didn't see this was already explained while I was typing my response.)
I don't think it has anything to do with internal precision though, some numbers are just not representable exactly in binary form, either floats or doubles.
For example, try the following in Python Shell (Python uses doubles):
print ‘%(#).17f’ % {“#”:1.0/10}
print ‘%(#).17f’ % {“#”:0.7}
Edited by - Dec. 5, 2011 14:56:29
- symek
- Member
- 1390 posts
- Joined: July 2005
- Offline
- magneto
- Member
- 131 posts
- Joined: Oct. 2011
- Offline
-
- Quick Links