struct f32

Declaration

struct f32 { /* full declaration omitted */ };

Description

A 32-bit floating point type. This type can represent a wide range of decimal numbers, like 3.5, 27, -113.75, 0.0078125, 34359738368, 0, -1. So unlike integer types (such as `i32`), floating point types can represent non-integer numbers, too. Specifically, this type holds the same values as the `float` type specified by the C++ standard. See the [namespace level documentation]($sus::num) for more.

Declared at: sus/num/float.h:52

Member Variables

public float primitive_value = float{0.}
The inner primitive value. Prefer to cast to the desired primitive type, such as with `float{n}` for a numeric value `n`.
public static const float MIN_PRIMITIVE
Smallest finite primitive value.
public static const float MAX_PRIMITIVE
Largest finite primitive value.
public static const sus::num::f32 MIN
Smallest finite [`
public static const sus::num::f32 MAX
Largest finite [`
public static const sus::num::u32 RADIX
The radix or base of the internal representation of [`
public static const sus::num::u32 MANTISSA_DIGITS
Approximate number of significant digits in base 2.
public static const sus::num::u32 DIGITS
Approximate number of significant digits in base 10.
public static const sus::num::f32 EPSILON
Machine epsilon value for [`
public static const sus::num::f32 MIN_POSITIVE
Smallest positive normal [`
public static const sus::num::i32 MIN_EXP
One greater than the minimum possible normal power of 2 exponent.
public static const sus::num::i32 MAX_EXP
Maximum possible power of 2 exponent.
public static const sus::num::i32 MIN_10_EXP
Minimum possible normal power of 10 exponent.
public static const sus::num::i32 MAX_10_EXP
Maximum possible power of 10 exponent.
public static const sus::num::f32 NAN
This value is not constexpr because the value can differ in a constexpr evaluation context from a runtime context, leading to bugs.
public static const sus::num::f32 INFINITY
Infinity.
public static const sus::num::f32 NEG_INFINITY
Negative infinity.