Module math

Source
Description

Numeric helpers — generic Ord ops, integer arithmetic, and float transcendentals.

The MinMax trait supplies .min / .max / .clamp on any Ord type. Integer bit-manipulation and ilog helpers live as free :fns backed by host intrinsics. Float transcendentals (fsqrt, fpow, fln, trig, hyperbolics, rounding, classification, IEEE-754 helpers) are also free :fns typed AnyFloat -> AnyFloat — operator specialisation must land before they can move to trait methods.

Data Types

Types

Int

Abstractions

Traits

IntMath
MinMax

Functions

Trait Implementations

impl MinMax for Float(?480305)

.clamp ( (Float ?480305) (Float ?480305) (Float ?480305) (Float ?480305) )

.max ( (Float ?480305) (Float ?480305) (Float ?480305) )

.min ( (Float ?480305) (Float ?480305) (Float ?480305) )

impl Int for ?880311

.to-str-radix ( (Int range) (Int ..) Str )

.to-str-radix — render the integer in the given radix (2..=36). Stack effect: value radix .to-str-radix.