Module math

Source

Functionsยง

apply_random_float_error ๐Ÿ”’
Disturbes a floating-point result by a relative error in the range (-2^scale, 2^scale).
apply_random_float_error_ulp ๐Ÿ”’
apply_random_float_error gives instructions to apply a 2^N ULP error. This function implements these instructions such that applying a 2^N ULP error is less error prone. So for a 2^N ULP error, you would pass N as the ulp_exponent argument.
sqrt ๐Ÿ”’