F32

primitive val F32 is
  FloatingPoint[F32 val] val

Implements


Constructors

create

new val create(
  value: F32 val = seq)
: F32 val^

Parameters

  • value: F32 val = seq

Returns


pi

new val pi()
: F32 val^

Returns


e

new val e()
: F32 val^

Returns


_nan

new val _nan()
: F32 val^

Returns


_inf

new val _inf(
  negative: Bool val)
: F32 val^

Parameters

  • negative: Bool val

Returns


from_bits

new val from_bits(
  i: U32 val)
: F32 val^

Parameters

Returns


from[B: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[B] val)]

new val from[B: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[B] val)](
  a: B)
: F32 val^

Parameters

  • a: B

Returns


min_value

Minimum negative value representable.

new val min_value()
: F32 val^

Returns


max_value

Maximum positive value representable.

new val max_value()
: F32 val^

Returns


min_normalised

Minimum positive value representable at full precision (ie a normalised number).

new val min_normalised()
: F32 val^

Returns


epsilon

Minimum positive value such that (1 + epsilon) != 1.

new val epsilon()
: F32 val^

Returns


Public Functions

bits

fun box bits()
: U32 val

Returns


radix

Exponent radix.

fun tag radix()
: U8 val

Returns


precision2

Mantissa precision in bits.

fun tag precision2()
: U8 val

Returns


precision10

Mantissa precision in decimal digits.

fun tag precision10()
: U8 val

Returns


min_exp2

Minimum exponent value such that (2^exponent) - 1 is representable at full precision (ie a normalised number).

fun tag min_exp2()
: I16 val

Returns


min_exp10

Minimum exponent value such that (10^exponent) - 1 is representable at full precision (ie a normalised number).

fun tag min_exp10()
: I16 val

Returns


max_exp2

Maximum exponent value such that (2^exponent) - 1 is representable.

fun tag max_exp2()
: I16 val

Returns


max_exp10

Maximum exponent value such that (10^exponent) - 1 is representable.

fun tag max_exp10()
: I16 val

Returns


abs

fun box abs()
: F32 val

Returns


ceil

fun box ceil()
: F32 val

Returns


floor

fun box floor()
: F32 val

Returns


round

fun box round()
: F32 val

Returns


trunc

fun box trunc()
: F32 val

Returns


min

fun box min(
  y: F32 val)
: F32 val

Parameters

Returns


max

fun box max(
  y: F32 val)
: F32 val

Parameters

Returns


finite

Check whether this number is finite, ie not +/-infinity and not NaN.

fun box finite()
: Bool val

Returns


infinite

Check whether this number is +/-infinity

fun box infinite()
: Bool val

Returns


nan

Check whether this number is NaN.

fun box nan()
: Bool val

Returns


ldexp

fun box ldexp(
  x: F32 val,
  exponent: I32 val)
: F32 val

Parameters

  • x: F32 val
  • exponent: I32 val

Returns


frexp

fun box frexp()
: (F32 val , U32 val)

Returns


log

fun box log()
: F32 val

Returns


log2

fun box log2()
: F32 val

Returns


log10

fun box log10()
: F32 val

Returns


logb

fun box logb()
: F32 val

Returns


pow

fun box pow(
  y: F32 val)
: F32 val

Parameters

Returns


powi

fun box powi(
  y: I32 val)
: F32 val

Parameters

Returns


sqrt

fun box sqrt()
: F32 val

Returns


sqrt_unsafe

Unsafe operation. If this is negative, the result is undefined.

fun box sqrt_unsafe()
: F32 val

Returns


cbrt

fun box cbrt()
: F32 val

Returns


exp

fun box exp()
: F32 val

Returns


exp2

fun box exp2()
: F32 val

Returns


cos

fun box cos()
: F32 val

Returns


sin

fun box sin()
: F32 val

Returns


tan

fun box tan()
: F32 val

Returns


cosh

fun box cosh()
: F32 val

Returns


sinh

fun box sinh()
: F32 val

Returns


tanh

fun box tanh()
: F32 val

Returns


acos

fun box acos()
: F32 val

Returns


asin

fun box asin()
: F32 val

Returns


atan

fun box atan()
: F32 val

Returns


atan2

fun box atan2(
  y: F32 val)
: F32 val

Parameters

Returns


acosh

fun box acosh()
: F32 val

Returns


asinh

fun box asinh()
: F32 val

Returns


atanh

fun box atanh()
: F32 val

Returns


copysign

fun box copysign(
  sign: F32 val)
: F32 val

Parameters

  • sign: F32 val

Returns


hash

fun box hash()
: U64 val

Returns


i128

fun box i128()
: I128 val

Returns


u128

fun box u128()
: U128 val

Returns


i128_unsafe

Unsafe operation. If the value doesn't fit in the destination type, the result is undefined.

fun box i128_unsafe()
: I128 val

Returns


u128_unsafe

Unsafe operation. If the value doesn't fit in the destination type, the result is undefined.

fun box u128_unsafe()
: U128 val

Returns


add_unsafe

fun box add_unsafe(
  y: F32 val)
: F32 val

Parameters

Returns


sub_unsafe

fun box sub_unsafe(
  y: F32 val)
: F32 val

Parameters

Returns


mul_unsafe

fun box mul_unsafe(
  y: F32 val)
: F32 val

Parameters

Returns


div_unsafe

fun box div_unsafe(
  y: F32 val)
: F32 val

Parameters

Returns


divmod_unsafe

fun box divmod_unsafe(
  y: F32 val)
: (F32 val , F32 val)

Parameters

Returns


mod_unsafe

fun box mod_unsafe(
  y: F32 val)
: F32 val

Parameters

Returns


neg_unsafe

fun box neg_unsafe()
: F32 val

Returns


eq_unsafe

fun box eq_unsafe(
  y: F32 val)
: Bool val

Parameters

Returns


ne_unsafe

fun box ne_unsafe(
  y: F32 val)
: Bool val

Parameters

Returns


lt_unsafe

fun box lt_unsafe(
  y: F32 val)
: Bool val

Parameters

Returns


le_unsafe

fun box le_unsafe(
  y: F32 val)
: Bool val

Parameters

Returns


ge_unsafe

fun box ge_unsafe(
  y: F32 val)
: Bool val

Parameters

Returns


gt_unsafe

fun box gt_unsafe(
  y: F32 val)
: Bool val

Parameters

Returns


string

fun box string()
: String iso^

Returns


add

fun box add(
  y: F32 val)
: F32 val

Parameters

Returns


sub

fun box sub(
  y: F32 val)
: F32 val

Parameters

Returns


mul

fun box mul(
  y: F32 val)
: F32 val

Parameters

Returns


div

fun box div(
  y: F32 val)
: F32 val

Parameters

Returns


divmod

fun box divmod(
  y: F32 val)
: (F32 val , F32 val)

Parameters

Returns


mod

fun box mod(
  y: F32 val)
: F32 val

Parameters

Returns


neg

fun box neg()
: F32 val

Returns


eq

fun box eq(
  y: F32 val)
: Bool val

Parameters

Returns


ne

fun box ne(
  y: F32 val)
: Bool val

Parameters

Returns


lt

fun box lt(
  y: F32 val)
: Bool val

Parameters

Returns


le

fun box le(
  y: F32 val)
: Bool val

Parameters

Returns


ge

fun box ge(
  y: F32 val)
: Bool val

Parameters

Returns


gt

fun box gt(
  y: F32 val)
: Bool val

Parameters

Returns


i8

fun box i8()
: I8 val

Returns


i16

fun box i16()
: I16 val

Returns


i32

fun box i32()
: I32 val

Returns


i64

fun box i64()
: I64 val

Returns


ilong

fun box ilong()
: ILong val

Returns


isize

fun box isize()
: ISize val

Returns


u8

fun box u8()
: U8 val

Returns


u16

fun box u16()
: U16 val

Returns


u32

fun box u32()
: U32 val

Returns


u64

fun box u64()
: U64 val

Returns


ulong

fun box ulong()
: ULong val

Returns


usize

fun box usize()
: USize val

Returns


f32

fun box f32()
: F32 val

Returns


f64

fun box f64()
: F64 val

Returns


i8_unsafe

fun box i8_unsafe()
: I8 val

Returns


i16_unsafe

fun box i16_unsafe()
: I16 val

Returns


i32_unsafe

fun box i32_unsafe()
: I32 val

Returns


i64_unsafe

fun box i64_unsafe()
: I64 val

Returns


ilong_unsafe

fun box ilong_unsafe()
: ILong val

Returns


isize_unsafe

fun box isize_unsafe()
: ISize val

Returns


u8_unsafe

fun box u8_unsafe()
: U8 val

Returns


u16_unsafe

fun box u16_unsafe()
: U16 val

Returns


u32_unsafe

fun box u32_unsafe()
: U32 val

Returns


u64_unsafe

fun box u64_unsafe()
: U64 val

Returns


ulong_unsafe

fun box ulong_unsafe()
: ULong val

Returns


usize_unsafe

fun box usize_unsafe()
: USize val

Returns


f32_unsafe

fun box f32_unsafe()
: F32 val

Returns


f64_unsafe

fun box f64_unsafe()
: F64 val

Returns


compare

fun box compare(
  that: F32 val)
: (Less val | Equal val | Greater val)

Parameters

  • that: F32 val

Returns


Private Functions

_value

fun box _value()
: F32 val

Returns