Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
Development · Evolving reference

NumericLimits

Exposes exact finite numeric extrema for one supported representation.

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.

NumericLimits

pub struct NumericLimits<T> where T: Numeric, Copyable, Defaultable

Exposes exact finite numeric extrema for one supported representation.

This compile-time utility contains no runtime state, allocation or target-host query. Floating MinValue means the most negative finite number; MaxValue means the largest finite number. Target-width integers use the selected target facts. T: Copyable, Defaultable supported built-in numeric representation.

NumericLimits.fn

pub static const fn MinValue() -> T

Returns the lowest finite value of the exact destination type. Return: Zero for unsigned integers, signed minimum or negative finite float maximum.

NumericLimits.fn

pub static const fn MaxValue() -> T

Returns the highest finite value of the exact destination type. Return: Exact integer maximum or largest finite floating value.

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