NextFloatToward

Revision as of 22:45, 27 October 2022 by Lchrisman (talk | contribs) (Created page with "''New to Analytica 6.3'' == NextFloatToward( x, to ) == When <code>to > x</code>, returns the smallest 64-bit floating point number that is larger than «x». When <cod...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

New to Analytica 6.3

NextFloatToward( x, to )

When to > x, returns the smallest 64-bit floating point number that is larger than «x».

When to < x, returns the largest 64-bit floating point number that is smaller than «x».

When to = x, returns x.

This function can be useful when you are working around numeric round-off issues.

Examples

NextFloatToward( 10.0, INF ) → 10.000000000000002
NextFloatToward( 10.0, -INF ) → 9.999999999999998

See also

  • MantissaAndExponent
Comments


You are not allowed to post comments.