Skip to content

F32

[Source]

primitive val F32 is
  FloatingPoint[F32 val] val

Implements


Constructors

create

[Source]

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

Parameters

  • value: F32 val = 0

Returns


pi

[Source]

new val pi()
: F32 val^

Returns


e

[Source]

new val e()
: F32 val^

Returns


from_bits

[Source]

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)]

[Source]

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

[Source]

Minimum negative value representable.

new val min_value()
: F32 val^

Returns


max_value

[Source]

Maximum positive value representable.

new val max_value()
: F32 val^

Returns


min_normalised

[Source]

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

new val min_normalised()
: F32 val^

Returns


epsilon

[Source]

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

new val epsilon()
: F32 val^

Returns


Public Functions

bits

[Source]

fun box bits()
: U32 val

Returns


radix

[Source]

Exponent radix.

fun tag radix()
: U8 val

Returns


precision2

[Source]

Mantissa precision in bits.

fun tag precision2()
: U8 val

Returns


precision10

[Source]

Mantissa precision in decimal digits.

fun tag precision10()
: U8 val

Returns


min_exp2

[Source]

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

[Source]

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

[Source]

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

fun tag max_exp2()
: I16 val

Returns


max_exp10

[Source]

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

fun tag max_exp10()
: I16 val

Returns


abs

[Source]

fun box abs()
: F32 val

Returns


ceil

[Source]

fun box ceil()
: F32 val

Returns


floor

[Source]

fun box floor()
: F32 val

Returns


round

[Source]

fun box round()
: F32 val

Returns


trunc

[Source]

fun box trunc()
: F32 val

Returns


min

[Source]

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

Parameters

Returns


max

[Source]

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

Parameters

Returns


fld

[Source]

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

Parameters

Returns


fld_unsafe

[Source]

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

Parameters

Returns


mod

[Source]

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

Parameters

Returns


mod_unsafe

[Source]

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

Parameters

Returns


finite

[Source]

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

fun box finite()
: Bool val

Returns


infinite

[Source]

Check whether this number is +/-infinity

fun box infinite()
: Bool val

Returns


nan

[Source]

Check whether this number is NaN.

fun box nan()
: Bool val

Returns


ldexp

[Source]

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

Parameters

  • x: F32 val
  • exponent: I32 val

Returns


frexp

[Source]

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

Returns


log

[Source]

fun box log()
: F32 val

Returns


log2

[Source]

fun box log2()
: F32 val

Returns


log10

[Source]

fun box log10()
: F32 val

Returns


logb

[Source]

fun box logb()
: F32 val

Returns


pow

[Source]

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

Parameters

Returns


powi

[Source]

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

Parameters

Returns


sqrt

[Source]

fun box sqrt()
: F32 val

Returns


sqrt_unsafe

[Source]

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

fun box sqrt_unsafe()
: F32 val

Returns


cbrt

[Source]

fun box cbrt()
: F32 val

Returns


exp

[Source]

fun box exp()
: F32 val

Returns


exp2

[Source]

fun box exp2()
: F32 val

Returns


cos

[Source]

fun box cos()
: F32 val

Returns


sin

[Source]

fun box sin()
: F32 val

Returns


tan

[Source]

fun box tan()
: F32 val

Returns


cosh

[Source]

fun box cosh()
: F32 val

Returns


sinh

[Source]

fun box sinh()
: F32 val

Returns


tanh

[Source]

fun box tanh()
: F32 val

Returns


acos

[Source]

fun box acos()
: F32 val

Returns


asin

[Source]

fun box asin()
: F32 val

Returns


atan

[Source]

fun box atan()
: F32 val

Returns


atan2

[Source]

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

Parameters

Returns


acosh

[Source]

fun box acosh()
: F32 val

Returns


asinh

[Source]

fun box asinh()
: F32 val

Returns


atanh

[Source]

fun box atanh()
: F32 val

Returns


copysign

[Source]

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

Parameters

  • sign: F32 val

Returns


hash

[Source]

fun box hash()
: USize val

Returns


hash64

[Source]

fun box hash64()
: U64 val

Returns


i128

[Source]

fun box i128()
: I128 val

Returns


u128

[Source]

fun box u128()
: U128 val

Returns


i128_unsafe

[Source]

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

[Source]

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

[Source]

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

Parameters

Returns


sub_unsafe

[Source]

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

Parameters

Returns


mul_unsafe

[Source]

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

Parameters

Returns


div_unsafe

[Source]

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

Parameters

Returns


divrem_unsafe

[Source]

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

Parameters

Returns


rem_unsafe

[Source]

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

Parameters

Returns


neg_unsafe

[Source]

fun box neg_unsafe()
: F32 val

Returns


eq_unsafe

[Source]

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

Parameters

Returns


ne_unsafe

[Source]

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

Parameters

Returns


lt_unsafe

[Source]

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

Parameters

Returns


le_unsafe

[Source]

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

Parameters

Returns


ge_unsafe

[Source]

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

Parameters

Returns


gt_unsafe

[Source]

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

Parameters

Returns


string

[Source]

fun box string()
: String iso^

Returns


add

[Source]

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

Parameters

Returns


sub

[Source]

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

Parameters

Returns


mul

[Source]

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

Parameters

Returns


div

[Source]

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

Parameters

Returns


divrem

[Source]

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

Parameters

Returns


rem

[Source]

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

Parameters

Returns


neg

[Source]

fun box neg()
: F32 val

Returns


eq

[Source]

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

Parameters

Returns


ne

[Source]

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

Parameters

Returns


lt

[Source]

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

Parameters

Returns


le

[Source]

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

Parameters

Returns


ge

[Source]

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

Parameters

Returns


gt

[Source]

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

Parameters

Returns


i8

[Source]

fun box i8()
: I8 val

Returns


i16

[Source]

fun box i16()
: I16 val

Returns


i32

[Source]

fun box i32()
: I32 val

Returns


i64

[Source]

fun box i64()
: I64 val

Returns


ilong

[Source]

fun box ilong()
: ILong val

Returns


isize

[Source]

fun box isize()
: ISize val

Returns


u8

[Source]

fun box u8()
: U8 val

Returns


u16

[Source]

fun box u16()
: U16 val

Returns


u32

[Source]

fun box u32()
: U32 val

Returns


u64

[Source]

fun box u64()
: U64 val

Returns


ulong

[Source]

fun box ulong()
: ULong val

Returns


usize

[Source]

fun box usize()
: USize val

Returns


f32

[Source]

fun box f32()
: F32 val

Returns


f64

[Source]

fun box f64()
: F64 val

Returns


i8_unsafe

[Source]

fun box i8_unsafe()
: I8 val

Returns


i16_unsafe

[Source]

fun box i16_unsafe()
: I16 val

Returns


i32_unsafe

[Source]

fun box i32_unsafe()
: I32 val

Returns


i64_unsafe

[Source]

fun box i64_unsafe()
: I64 val

Returns


ilong_unsafe

[Source]

fun box ilong_unsafe()
: ILong val

Returns


isize_unsafe

[Source]

fun box isize_unsafe()
: ISize val

Returns


u8_unsafe

[Source]

fun box u8_unsafe()
: U8 val

Returns


u16_unsafe

[Source]

fun box u16_unsafe()
: U16 val

Returns


u32_unsafe

[Source]

fun box u32_unsafe()
: U32 val

Returns


u64_unsafe

[Source]

fun box u64_unsafe()
: U64 val

Returns


ulong_unsafe

[Source]

fun box ulong_unsafe()
: ULong val

Returns


usize_unsafe

[Source]

fun box usize_unsafe()
: USize val

Returns


f32_unsafe

[Source]

fun box f32_unsafe()
: F32 val

Returns


f64_unsafe

[Source]

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