builtin FloatingPoint - tadashi9e/gmp4pony GitHub Wiki
FloatingPoint[A: FloatingPoint[A] val]
trait val FloatingPoint[A: FloatingPoint[A] val] is
Real[A] val- Real[A] val
new val min_normalised()
: FloatingPoint[A] val^- FloatingPoint[A] val^
new val epsilon()
: FloatingPoint[A] val^- FloatingPoint[A] val^
new val create(
value: A)
: Real[A] val^- value: A
- Real[A] 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)]
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^- a: B
- Real[A] val^
new val min_value()
: Real[A] val^- Real[A] val^
new val max_value()
: Real[A] val^- Real[A] val^
fun tag radix()
: U8 val- U8 val
fun tag precision2()
: U8 val- U8 val
fun tag precision10()
: U8 val- U8 val
fun tag min_exp2()
: I16 val- I16 val
fun tag min_exp10()
: I16 val- I16 val
fun tag max_exp2()
: I16 val- I16 val
fun tag max_exp10()
: I16 val- I16 val
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- y: A
- A
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- y: A
- A
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- y: A
- A
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- y: A
- A
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 fld_unsafe(
y: A)
: A- y: A
- A
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 divrem_unsafe(
y: A)
: (A , A)- y: A
- (A , A)
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 rem_unsafe(
y: A)
: A- y: A
- A
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- y: A
- A
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- A
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: box->A)
: Bool val- y: box->A
- Bool val
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: box->A)
: Bool val- y: box->A
- Bool val
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: box->A)
: Bool val- y: box->A
- Bool val
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: box->A)
: Bool val- y: box->A
- Bool val
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: box->A)
: Bool val- y: box->A
- Bool val
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: box->A)
: Bool val- y: box->A
- Bool val
fun box abs()
: A- A
fun box ceil()
: A- A
fun box floor()
: A- A
fun box round()
: A- A
fun box trunc()
: A- A
fun box finite()
: Bool val- Bool val
fun box infinite()
: Bool val- Bool val
fun box nan()
: Bool val- Bool val
fun box ldexp(
x: A,
exponent: I32 val)
: A- x: A
- exponent: I32 val
- A
fun box frexp()
: (A , U32 val)- (A , U32 val)
fun box log()
: A- A
fun box log2()
: A- A
fun box log10()
: A- A
fun box logb()
: A- A
fun box pow(
y: A)
: A- y: A
- A
fun box powi(
y: I32 val)
: A- y: I32 val
- A
fun box sqrt()
: A- A
Unsafe operation. If this is negative, the result is undefined.
fun box sqrt_unsafe()
: A- A
fun box cbrt()
: A- A
fun box exp()
: A- A
fun box exp2()
: A- A
fun box cos()
: A- A
fun box sin()
: A- A
fun box tan()
: A- A
fun box cosh()
: A- A
fun box sinh()
: A- A
fun box tanh()
: A- A
fun box acos()
: A- A
fun box asin()
: A- A
fun box atan()
: A- A
fun box atan2(
y: A)
: A- y: A
- A
fun box acosh()
: A- A
fun box asinh()
: A- A
fun box atanh()
: A- A
fun box copysign(
sign: A)
: A- sign: A
- A
fun box string()
: String iso^- String iso^
fun box add(
y: A)
: A- y: A
- A
fun box sub(
y: A)
: A- y: A
- A
fun box mul(
y: A)
: A- y: A
- A
fun box div(
y: A)
: A- y: A
- A
fun box divrem(
y: A)
: (A , A)- y: A
- (A , A)
fun box rem(
y: A)
: A- y: A
- A
fun box neg()
: A- A
fun box fld(
y: A)
: A- y: A
- A
fun box mod(
y: A)
: A- y: A
- A
fun box eq(
y: box->A)
: Bool val- y: box->A
- Bool val
fun box ne(
y: box->A)
: Bool val- y: box->A
- Bool val
fun box lt(
y: box->A)
: Bool val- y: box->A
- Bool val
fun box le(
y: box->A)
: Bool val- y: box->A
- Bool val
fun box ge(
y: box->A)
: Bool val- y: box->A
- Bool val
fun box gt(
y: box->A)
: Bool val- y: box->A
- Bool val
fun box min(
y: A)
: A- y: A
- A
fun box max(
y: A)
: A- y: A
- A
fun box hash()
: USize val- USize val
fun box hash64()
: U64 val- U64 val
fun box i8()
: I8 val- I8 val
fun box i16()
: I16 val- I16 val
fun box i32()
: I32 val- I32 val
fun box i64()
: I64 val- I64 val
fun box i128()
: I128 val- I128 val
fun box ilong()
: ILong val- ILong val
fun box isize()
: ISize val- ISize val
fun box u8()
: U8 val- U8 val
fun box u16()
: U16 val- U16 val
fun box u32()
: U32 val- U32 val
fun box u64()
: U64 val- U64 val
fun box u128()
: U128 val- U128 val
fun box ulong()
: ULong val- ULong val
fun box usize()
: USize val- USize val
fun box f32()
: F32 val- F32 val
fun box f64()
: F64 val- F64 val
fun box i8_unsafe()
: I8 val- I8 val
fun box i16_unsafe()
: I16 val- I16 val
fun box i32_unsafe()
: I32 val- I32 val
fun box i64_unsafe()
: I64 val- I64 val
fun box i128_unsafe()
: I128 val- I128 val
fun box ilong_unsafe()
: ILong val- ILong val
fun box isize_unsafe()
: ISize val- ISize val
fun box u8_unsafe()
: U8 val- U8 val
fun box u16_unsafe()
: U16 val- U16 val
fun box u32_unsafe()
: U32 val- U32 val
fun box u64_unsafe()
: U64 val- U64 val
fun box u128_unsafe()
: U128 val- U128 val
fun box ulong_unsafe()
: ULong val- ULong val
fun box usize_unsafe()
: USize val- USize val
fun box f32_unsafe()
: F32 val- F32 val
fun box f64_unsafe()
: F64 val- F64 val
fun box compare(
that: box->A)
: (Less val | Equal val | Greater val)- that: box->A