Skip to content

Modern Math IsSubnormal

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

Home › Math Library › Math Library › IsSubnormal

IsSubnormal

Returns true if the value is nonzero but below the smallest normal number.

Syntax

IsSubnormal( x )

Examples

#import "std/numeric"
using numeric

'' Below the smallest normal, where the exponent has bottomed out and
'' precision is being lost bit by bit
print IsSubnormal( MinSubnormalDouble( ) )    '' true
print IsSubnormal( 1.0 )                       '' false
print IsSubnormal( 0.0 )                       '' false -- zero is neither

'' Worth testing when a result is suspiciously small: it means the
'' computation has already lost significance

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

Clone this wiki locally