FloatingPoint[A: FloatingPoint[A] val]

trait val FloatingPoint[A: FloatingPoint[A] val] is
  Real[A] val

Implements


Constructors

min_normalised

new val min_normalised()
: FloatingPoint[A] val^

Returns


epsilon

new val epsilon()
: FloatingPoint[A] val^

Returns


create

new val create(
  value: A)
: Real[A] val^

Parameters

  • value: A

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)
: Real[A] val^

Parameters

  • a: B

Returns


min_value

new val min_value()
: Real[A] val^

Returns


max_value

new val max_value()
: Real[A] val^

Returns


Public Functions

radix

fun tag radix()
: U8 val

Returns


precision2

fun tag precision2()
: U8 val

Returns


precision10

fun tag precision10()
: U8 val

Returns


min_exp2

fun tag min_exp2()
: I16 val

Returns


min_exp10

fun tag min_exp10()
: I16 val

Returns


max_exp2

fun tag max_exp2()
: I16 val

Returns


max_exp10

fun tag max_exp10()
: I16 val

Returns


add_unsafe

Unsafe operation. If any input or output of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

fun box add_unsafe(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

sub_unsafe

Unsafe operation. If any input or output of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

fun box sub_unsafe(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

mul_unsafe

Unsafe operation. If any input or output of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

fun box mul_unsafe(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

div_unsafe

Unsafe operation. If any input or output of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

fun box div_unsafe(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

divmod_unsafe

Unsafe operation. If any input or output of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

fun box divmod_unsafe(
  y: A)
: (A , A)

Parameters

  • y: A

Returns

  • (A , A)

mod_unsafe

Unsafe operation. If any input or output of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

fun box mod_unsafe(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

neg_unsafe

Unsafe operation. If any input or output of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

fun box neg_unsafe()
: A

Returns

  • A

eq_unsafe

Unsafe operation. If any input of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

fun box eq_unsafe(
  y: A)
: Bool val

Parameters

  • y: A

Returns


ne_unsafe

Unsafe operation. If any input of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

fun box ne_unsafe(
  y: A)
: Bool val

Parameters

  • y: A

Returns


lt_unsafe

Unsafe operation. If any input of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

fun box lt_unsafe(
  y: A)
: Bool val

Parameters

  • y: A

Returns


le_unsafe

Unsafe operation. If any input of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

fun box le_unsafe(
  y: A)
: Bool val

Parameters

  • y: A

Returns


ge_unsafe

Unsafe operation. If any input of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

fun box ge_unsafe(
  y: A)
: Bool val

Parameters

  • y: A

Returns


gt_unsafe

Unsafe operation. If any input of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

fun box gt_unsafe(
  y: A)
: Bool val

Parameters

  • y: A

Returns


abs

fun box abs()
: A

Returns

  • A

ceil

fun box ceil()
: A

Returns

  • A

floor

fun box floor()
: A

Returns

  • A

round

fun box round()
: A

Returns

  • A

trunc

fun box trunc()
: A

Returns

  • A

finite

fun box finite()
: Bool val

Returns


infinite

fun box infinite()
: Bool val

Returns


nan

fun box nan()
: Bool val

Returns


ldexp

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

Parameters

  • x: A
  • exponent: I32 val

Returns

  • A

frexp

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

Returns

  • (A , U32 val)

log

fun box log()
: A

Returns

  • A

log2

fun box log2()
: A

Returns

  • A

log10

fun box log10()
: A

Returns

  • A

logb

fun box logb()
: A

Returns

  • A

pow

fun box pow(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

powi

fun box powi(
  y: I32 val)
: A

Parameters

Returns

  • A

sqrt

fun box sqrt()
: A

Returns

  • A

sqrt_unsafe

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

fun box sqrt_unsafe()
: A

Returns

  • A

cbrt

fun box cbrt()
: A

Returns

  • A

exp

fun box exp()
: A

Returns

  • A

exp2

fun box exp2()
: A

Returns

  • A

cos

fun box cos()
: A

Returns

  • A

sin

fun box sin()
: A

Returns

  • A

tan

fun box tan()
: A

Returns

  • A

cosh

fun box cosh()
: A

Returns

  • A

sinh

fun box sinh()
: A

Returns

  • A

tanh

fun box tanh()
: A

Returns

  • A

acos

fun box acos()
: A

Returns

  • A

asin

fun box asin()
: A

Returns

  • A

atan

fun box atan()
: A

Returns

  • A

atan2

fun box atan2(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

acosh

fun box acosh()
: A

Returns

  • A

asinh

fun box asinh()
: A

Returns

  • A

atanh

fun box atanh()
: A

Returns

  • A

copysign

fun box copysign(
  sign: A)
: A

Parameters

  • sign: A

Returns

  • A

string

fun box string()
: String iso^

Returns


add

fun box add(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

sub

fun box sub(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

mul

fun box mul(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

div

fun box div(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

divmod

fun box divmod(
  y: A)
: (A , A)

Parameters

  • y: A

Returns

  • (A , A)

mod

fun box mod(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

neg

fun box neg()
: A

Returns

  • A

eq

fun box eq(
  y: A)
: Bool val

Parameters

  • y: A

Returns


ne

fun box ne(
  y: A)
: Bool val

Parameters

  • y: A

Returns


lt

fun box lt(
  y: A)
: Bool val

Parameters

  • y: A

Returns


le

fun box le(
  y: A)
: Bool val

Parameters

  • y: A

Returns


ge

fun box ge(
  y: A)
: Bool val

Parameters

  • y: A

Returns


gt

fun box gt(
  y: A)
: Bool val

Parameters

  • y: A

Returns


min

fun box min(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

max

fun box max(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

hash

fun box hash()
: U64 val

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


i128

fun box i128()
: I128 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


u128

fun box u128()
: U128 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


i128_unsafe

fun box i128_unsafe()
: I128 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


u128_unsafe

fun box u128_unsafe()
: U128 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: A)
: (Less val | Equal val | Greater val)

Parameters

  • that: A

Returns


Private Functions

_value

fun box _value()
: A

Returns

  • A