Skip to content

Modern Math TestFpException

Paul Squires edited this page Sep 30, 2026 · 5 revisions

Home › Math Library › Math Library › TestFpException

TestFpException

Syntax

TestFpException( e )

Examples

#import "std/numeric"
using FB

'' The flags are STICKY: once raised they stay raised until cleared, so
'' a test after a long computation says "this happened at some point",
'' not "this just happened"
ClearFpExceptions( )
print TestFpException( FP_OVERFLOW )      '' false

dim as float64 big = 1e308
dim as float64 r = big * 10
print TestFpException( FP_OVERFLOW )      '' true

Library: Math Library
Category: Math Library
Documented under: Nothing Becomes A Keyword
Source: docs/math/math.txt in the FBC-Modern repository.

Clone this wiki locally