jonp Posted June 21, 2012 Share Posted June 21, 2012 I have some questions concerning float precision in H12... If I plan on doing extreme changes of scale and position with objects, are OBJ transforms, VOP SOPs, object merges and SOP transform nodes all 64bit precision safe now? Which nodes are still NOT double float ready? If manipulating points, do I need to cast P into 64bit? Am I able to specify units smaller than 1e-5 and larger than 100,000 in the interface, or allow myself to do so? Cheers, Jon Quote Link to comment Share on other sites More sharing options...
magneto Posted June 21, 2012 Share Posted June 21, 2012 I think VEX is still single precision. Correct me if I am wrong 1 Quote Link to comment Share on other sites More sharing options...
edward Posted June 23, 2012 Share Posted June 23, 2012 If I plan on doing extreme changes of scale and position with objects, are OBJ transforms, VOP SOPs, object merges and SOP transform nodes all 64bit precision safe now? Which nodes are still NOT double float ready? Object transforms have always been in double position, but not parameters/channels. In H12, all parameters/channels are in double precision. CHOPs also changed from single to double precision in H12. Most SOPs are still not double precision ready although there is support for double precision attributes in the new geometry library. I think that the most safe way is if you're only running through a File SOP and your own HDK SOP nodes. VEX is still single precision. Am I able to specify units smaller than 1e-5 and larger than 100,000 in the interface, or allow myself to do so? Yes, you should be able to, esp. with the parameter in "expression mode". For UI purposes, the precision is truncated when viewing them in "value mode". Quote Link to comment Share on other sites More sharing options...
jonp Posted September 4, 2012 Author Share Posted September 4, 2012 Object transforms have always been in double position, but not parameters/channels. In H12, all parameters/channels are in double precision. CHOPs also changed from single to double precision in H12. Most SOPs are still not double precision ready although there is support for double precision attributes in the new geometry library. I think that the most safe way is if you're only running through a File SOP and your own HDK SOP nodes. VEX is still single precision. Yes, you should be able to, esp. with the parameter in "expression mode". For UI purposes, the precision is truncated when viewing them in "value mode". Thanks for the info. I'd forgotten to check on this and was about to post a follow-up question that you've already answered above. While it would be nice if VEX could be ported to support 64bit datatypes so we could do VOP SOP operations in 64bit land, it sounds like it would be a harder problem given all of the optimization that has gone into it, so I'm not holding my breath. Quote Link to comment Share on other sites More sharing options...
magneto Posted September 5, 2012 Share Posted September 5, 2012 Edward, can you please tell me the reasons SOPs are not double precision ready? I am not criticizing, just curious about the programming issues I would appreciate a similar insight about VEX's double precision issue too. Quote Link to comment Share on other sites More sharing options...
edward Posted September 5, 2012 Share Posted September 5, 2012 There are too many reasons to list. Just some of them off the top of my head: - There is a *lot* of SOP code. A search and replace may not work as data structures may rely on the size of double precision variables (4 bytes bs 8 bytes). - Backwards compatibility. If an algorithm uses double instead of single precision, the result can be different, sometimes in dramatic ways. Even if we say that it's ok to break compatibility, regression tests need to be examined and maintained to ensure correctness. As for VEX, it also heavily uses single precision SIMD CPU instructions for performance. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted September 5, 2012 Share Posted September 5, 2012 Thanks Edward, I love reading these kinds of details Quote Link to comment Share on other sites More sharing options...
georgemacin Posted January 17, 2017 Share Posted January 17, 2017 The decimal keyword denotes a 128-bit data type. Compared to floating-point types, the decimal type has a greater precision and a smaller range, which makes it suitable for financial and monetary calculations. Precision is the main difference where double is a double precision (64 bit) floating point data type and decimal is a 128-bit floating point data type. Double - 64 bit (15-16 digits) Decimal - 128 bit (28-29 significant digits) So Decimals have much higher precision and are usually used within monetary (financial) applications that require a high degree of accuracy. But in performance wise Decimals are slower than double and float types. Double Types are probably the most normally used data type for real values, except handling money. In general, the double type is going to offer at least as great precision and definitely greater speed for arbitrary real numbers. More about...Double vs Decimal George 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.