numeric.float32


inline bool isnan(float32 x) §

Check x is not a number.

inline bool isinf(float32 x) §

Check x is positive or negative infinity.

inline bool isfinite(float32 x) §
inline bool isnormal(float32 x) §
inline bool signbit(float32 x) §

Return sign of x.

template <Denorm denorm_mode>
inline float32 add(float32 in1, float32 in2) §

Addition.

template <Denorm denorm_mode>
inline float32 mul(float32 in1, float32 in2) §

Multiplication.

template <Denorm denorm_mode>
inline bool eq(float32 in1, float32 in2) §

Compare two float32 values for equality.

template <Denorm denorm_mode>
inline bool lt(float32 in1, float32 in2) §

Check in1 less than in2.

template <Denorm denorm_mode>
inline bool gt(float32 in1, float32 in2) §

Check in1 greater than in2.

template <Denorm denorm_mode>
inline float32 sub(float32 in1, float32 in2) §

Subtract in2 from in1.

inline float32 rcp(float32 x) §

Reciprocal 1 / x.

inline float32 exp2(float32 x) §

2x

inline float32 exp(float32 x) §

ex

inline float32 expm1(float32 x) §

Calculate ex − 1. Denorm inputs and outputs are supported. For smaller values of x, expm1(x) may be more accurate than exp(x)-1.

inline float32 log2(float32 x) §

log2(x)

inline float32 log(float32 x) §

ln(x)

inline float32 log10(float32 x) §

log10(x)

inline float32 log1p(float32 value) §

Calculate ln(x + 1). Denorm inputs and outputs are supported. For small values of x, log1p may be more accurate than log(1+x).

inline float32 logb(float32 x) §

Calculate the floating-point value of the unbiased exponent part of log(x). If x is a subnormal value, the result of log2(mantissa part of x)-126 is returned.

inline int32 ilogb(float32 x) §

Return the signed integral value of the unbiased exponent part of log(x). If x is a subnormal value, the result of log2(mantissa part of x)-126 is returned.

inline float32 atan(float32 x) §

Return the principal values of arctangent. Denorm inputs and outputs are supported.

inline float32 pow(float32 base, float32 expo) §

baseexpo

inline float32 sin(float32 x) §

sin(x) with x in radians.

inline float32 cos(float32 x) §

cos(x) with x in radians.

template <Denorm denorm_mode>
inline float32 min(float32 x, float32 y) §

Return the smaller of x and y. A NaN is treated as missing data, and the other value will be returned.

template <Denorm denorm_mode>
inline float32 max(float32 x, float32 y) §

Return the larger of x and y. A NaN is treated as missing data, and the other value will be returned.

template <Denorm denorm_mode>
inline float32 ceil(float32 x) §

Return the smallest integer not less than x: x

template <Denorm denorm_mode>
inline float32 floor(float32 x) §

Return the largest integer not greater than x: x

template <Denorm denorm_mode>
inline float32 round(float32 x) §

Return the nearest integer to x, rounding halfway away from zero.

template <Denorm denorm_mode>
inline float32 trunc(float32 x) §

Return the nearest integer not greater in magnitude than x.

template <Denorm denorm_mode>
inline float32 dim(float32 x, float32 y) §

The positive difference between x and y: max(x - y, 0). Return NaN if x or y is NaN.

template <Denorm denorm_mode>
inline float32 abs(float32 x) §

Return the absolute value of x: |x|

template <auto N>
inline float32 from_int(int<N> value) §

Convert a signed integer to a float32.

Parameters

  • auto N
    

    Width of value.

template <auto N>
inline float32 from_uint(uint<N> value) §

Convert an unsigned integer to a float32.

Parameters

  • auto N
    

    Width of value.

template <auto N>
inline optional<int<N>> to_int(float32 value) §

Convert a float32 to a signed integer.

Parameters

  • auto N
    

    Width of the signed integer.

template <auto N>
inline optional<uint<N>> to_uint(float32 value) §

Convert a float32 to an unsigned integer

Parameters

  • auto N
    

    Width of the unsigned integer.