| fp_utilities | R Documentation |
Utilities for floating point number manipulation and analysis.
float_next(x)
float_prior(x)
float_distance(x, y)
float_advance(x, distance)
ulp(x)
relative_difference(x, y)
epsilon_difference(x, y)
x |
A numeric value. |
y |
A numeric value. |
distance |
Integer number of ULPS to advance by. |
A numeric value after performing the specified floating point operation.
Boost Documentation for more details on the mathematical background.
print(float_next(1.0), digits = 20)
print(float_distance(1.0, 2.0), digits = 20)
print(float_prior(1.0), digits = 20)
print(float_advance(1.0, 10), digits = 20)
print(ulp(1.0), digits = 20)
print(relative_difference(1.1, 1.1000009), digits = 20)
print(epsilon_difference(1.1, 1.1000009), digits = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.