Skip to content

Modern Math GetRoundingMode

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › Math Library › Math Library › GetRoundingMode

GetRoundingMode

Returns the direction floating-point results are currently rounded in.

Syntax

GetRoundingMode( )

Examples

#import "std/numeric"
using numeric

'' The FPU's current rounding direction. TO NEAREST by default, which
'' is why RoundHalfEven agrees with the hardware and Round does not.
print GetRoundingMode( ) = ROUND_TO_NEAREST      '' -1 (true)

'' The names are ROUND_*, not the C FE_* spellings -- ROUND_TO_NEAREST,
'' ROUND_TOWARD_NEGATIVE, ROUND_TOWARD_POSITIVE, ROUND_TOWARD_ZERO

Library: Math Library
Category: Math Library
Documented under: Nothing Becomes A Keyword

Clone this wiki locally