Implementation from: https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/blob/main/src/include/OSL/dual.h#L1283 https://github.com/OpenImageIO/oiio/blob/master/src/include/OpenImageIO/fmath.h#L1605 Reviewed By: fclem Maniphest Tasks: T101562 Differential Revision: https://developer.blender.org/D16497