Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
Snapshot · Oct 24, 2026 · Frozen documentation

FloatingClassification

Classifies the exact f16 representation with IsNaN semantics.

Sn is under heavy development. This reference includes the intended 1.0 design; features may be incomplete in the current compiler. Read the status →

Module std.math

import std.math;

Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.

IsNaN

pub const fn IsNaN(Value: f16) -> bool

Classifies the exact f16 representation with IsNaN semantics. Value: Floating bits, including subnormals, signed zero and NaN payloads. Return: Classification without arithmetic, allocation or floating-status mutation.

IsFinite

pub const fn IsFinite(Value: f16) -> bool

Classifies the exact f16 representation with IsFinite semantics. Value: Floating bits, including subnormals, signed zero and NaN payloads. Return: Classification without arithmetic, allocation or floating-status mutation.

IsInfinity

pub const fn IsInfinity(Value: f16) -> bool

Classifies the exact f16 representation with IsInfinity semantics. Value: Floating bits, including subnormals, signed zero and NaN payloads. Return: Classification without arithmetic, allocation or floating-status mutation.

CopySign

pub const fn CopySign(Magnitude: f16, Sign: f16) -> f16

Returns f16 Magnitude bits with the sign bit of Sign. Magnitude: Bits whose exponent/fraction are preserved, including NaNs. Sign: Floating value supplying only its sign bit. Return: Exact bitwise sign replacement; no arithmetic or runtime dependency.

IsNaN

pub const fn IsNaN(Value: f32) -> bool

Classifies the exact f32 representation with IsNaN semantics. Value: Floating bits, including subnormals, signed zero and NaN payloads. Return: Classification without arithmetic, allocation or floating-status mutation.

IsFinite

pub const fn IsFinite(Value: f32) -> bool

Classifies the exact f32 representation with IsFinite semantics. Value: Floating bits, including subnormals, signed zero and NaN payloads. Return: Classification without arithmetic, allocation or floating-status mutation.

IsInfinity

pub const fn IsInfinity(Value: f32) -> bool

Classifies the exact f32 representation with IsInfinity semantics. Value: Floating bits, including subnormals, signed zero and NaN payloads. Return: Classification without arithmetic, allocation or floating-status mutation.

CopySign

pub const fn CopySign(Magnitude: f32, Sign: f32) -> f32

Returns f32 Magnitude bits with the sign bit of Sign. Magnitude: Bits whose exponent/fraction are preserved, including NaNs. Sign: Floating value supplying only its sign bit. Return: Exact bitwise sign replacement; no arithmetic or runtime dependency.

IsNaN

pub const fn IsNaN(Value: f64) -> bool

Classifies the exact f64 representation with IsNaN semantics. Value: Floating bits, including subnormals, signed zero and NaN payloads. Return: Classification without arithmetic, allocation or floating-status mutation.

IsFinite

pub const fn IsFinite(Value: f64) -> bool

Classifies the exact f64 representation with IsFinite semantics. Value: Floating bits, including subnormals, signed zero and NaN payloads. Return: Classification without arithmetic, allocation or floating-status mutation.

IsInfinity

pub const fn IsInfinity(Value: f64) -> bool

Classifies the exact f64 representation with IsInfinity semantics. Value: Floating bits, including subnormals, signed zero and NaN payloads. Return: Classification without arithmetic, allocation or floating-status mutation.

CopySign

pub const fn CopySign(Magnitude: f64, Sign: f64) -> f64

Returns f64 Magnitude bits with the sign bit of Sign. Magnitude: Bits whose exponent/fraction are preserved, including NaNs. Sign: Floating value supplying only its sign bit. Return: Exact bitwise sign replacement; no arithmetic or runtime dependency.

Documentation snapshot: October 24, 2026 About versions ↗
Searching Development · language & standard library