neuray API Programmer's Manual

Fast Approximations for float Math Functions

[Math Functions]

Description

Fast approximations for math functions on limited precision floats.

Include File:

#include <mi/math/function.h>

Functions

Float32 mi::math::fast_exp( Float32 x)
A fast implementation of exp for floats.
Float32 mi::math::fast_log2( Float32 i)
A fast implementation of log2(x) for floats.
Float32 mi::math::fast_pow( Float32 b, Float32 e)
A fast implementation of pow(x,y) for floats.
Float32 mi::math::fast_pow2( Float32 x)
A fast implementation of pow(2,x) for floats.
Float32 mi::math::fast_sqrt( Float32 i)
A fast implementation of sqrt(x) for floats.

Functions

Float32 mi::math::fast_exp( Float32 x) [inline]

A fast implementation of exp for floats.

Float32 mi::math::fast_log2( Float32 i) [inline]

A fast implementation of log2(x) for floats.

Float32 mi::math::fast_pow( Float32 b, Float32 e) [inline]

A fast implementation of pow(x,y) for floats.

Parameters

b
base
e
exponent
Float32 mi::math::fast_pow2( Float32 x) [inline]

A fast implementation of pow(2,x) for floats.

Float32 mi::math::fast_sqrt( Float32 i) [inline]

A fast implementation of sqrt(x) for floats.