HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
22.0: Major Changes In The HDK

Table of Contents

SYS_Math changes

Houdini 22 uses a new math library based on the CORE-MATH project. The results of each function are now correctly-rounded, meaning they're as accurate as possible given the storage constraints of IEEE 754 floating-point numbers. The returned values therefore may not be equivalent to results from earlier versions of Houdini.

The structure of SYS_Math, has changed as well. In previous versions of Houdini, calls to functions such as SYSsin would be an inlined call to the system's math library, meaning that the SYS library never included exported symbols for these functions. With the addition of the new math library, the functions are now exposed in the SYS library, which exposes this new math library to the user.

Additional math functions have also been added. Some functions have an Unsafe suffix. When these are present, it signifies that the underlying function has been determined to misbehave in some way. For example, the log function is only defined for x > 0, returning NaNs for x <= 1. This function is therefore declared as SYSlogUnsafe. SYSlog is the "safe" function, where it is defined for all real numbers. Some functions may have "safe" in their name such as SYSsafepow, in which case that function is the safe variant, and SYSpow is the unsafe version - this is an unfortunate historical remnant. The behaviours and domains of all of these functions can be found in the documentation for SYS_Math.h.