F32
primitive val F32 is FloatingPoint[F32 val] val
Implements
- FloatingPoint[F32 val] val
Constructors
create
new val create( value: F32 val = 0) : F32 val^
Parameters
- value: F32 val = 0
Returns
- F32 val^
pi
new val pi() : F32 val^
Returns
- F32 val^
e
new val e() : F32 val^
Returns
- F32 val^
from_bits
new val from_bits( i: U32 val) : F32 val^
Parameters
- i: U32 val
Returns
- F32 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) : F32 val^
Parameters
- a: B
Returns
- F32 val^
min_value
Minimum negative value representable.
new val min_value() : F32 val^
Returns
- F32 val^
max_value
Maximum positive value representable.
new val max_value() : F32 val^
Returns
- F32 val^
min_normalised
Minimum positive value representable at full precision (ie a normalised number).
new val min_normalised() : F32 val^
Returns
- F32 val^
epsilon
Minimum positive value such that (1 + epsilon) != 1.
new val epsilon() : F32 val^
Returns
- F32 val^
Public Functions
bits
fun box bits() : U32 val
Returns
- U32 val
radix
Exponent radix.
fun tag radix() : U8 val
Returns
- U8 val
precision2
Mantissa precision in bits.
fun tag precision2() : U8 val
Returns
- U8 val
precision10
Mantissa precision in decimal digits.
fun tag precision10() : U8 val
Returns
- U8 val
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
- I16 val
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
- I16 val
max_exp2
Maximum exponent value such that (2^exponent) - 1 is representable.
fun tag max_exp2() : I16 val
Returns
- I16 val
max_exp10
Maximum exponent value such that (10^exponent) - 1 is representable.
fun tag max_exp10() : I16 val
Returns
- I16 val
abs
fun box abs() : F32 val
Returns
- F32 val
ceil
fun box ceil() : F32 val
Returns
- F32 val
floor
fun box floor() : F32 val
Returns
- F32 val
round
fun box round() : F32 val
Returns
- F32 val
trunc
fun box trunc() : F32 val
Returns
- F32 val
min
fun box min( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
max
fun box max( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
fld
fun box fld( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
fld_unsafe
fun box fld_unsafe( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
mod
fun box mod( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
mod_unsafe
fun box mod_unsafe( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
finite
Check whether this number is finite, ie not +/-infinity and not NaN.
fun box finite() : Bool val
Returns
- Bool val
infinite
Check whether this number is +/-infinity
fun box infinite() : Bool val
Returns
- Bool val
nan
Check whether this number is NaN.
fun box nan() : Bool val
Returns
- Bool val
ldexp
fun box ldexp( x: F32 val, exponent: I32 val) : F32 val
Parameters
Returns
- F32 val
frexp
fun box frexp() : (F32 val , U32 val)
Returns
log
fun box log() : F32 val
Returns
- F32 val
log2
fun box log2() : F32 val
Returns
- F32 val
log10
fun box log10() : F32 val
Returns
- F32 val
logb
fun box logb() : F32 val
Returns
- F32 val
pow
fun box pow( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
powi
fun box powi( y: I32 val) : F32 val
Parameters
- y: I32 val
Returns
- F32 val
sqrt
fun box sqrt() : F32 val
Returns
- F32 val
sqrt_unsafe
Unsafe operation. If this is negative, the result is undefined.
fun box sqrt_unsafe() : F32 val
Returns
- F32 val
cbrt
fun box cbrt() : F32 val
Returns
- F32 val
exp
fun box exp() : F32 val
Returns
- F32 val
exp2
fun box exp2() : F32 val
Returns
- F32 val
cos
fun box cos() : F32 val
Returns
- F32 val
sin
fun box sin() : F32 val
Returns
- F32 val
tan
fun box tan() : F32 val
Returns
- F32 val
cosh
fun box cosh() : F32 val
Returns
- F32 val
sinh
fun box sinh() : F32 val
Returns
- F32 val
tanh
fun box tanh() : F32 val
Returns
- F32 val
acos
fun box acos() : F32 val
Returns
- F32 val
asin
fun box asin() : F32 val
Returns
- F32 val
atan
fun box atan() : F32 val
Returns
- F32 val
atan2
fun box atan2( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
acosh
fun box acosh() : F32 val
Returns
- F32 val
asinh
fun box asinh() : F32 val
Returns
- F32 val
atanh
fun box atanh() : F32 val
Returns
- F32 val
copysign
fun box copysign( sign: F32 val) : F32 val
Parameters
- sign: F32 val
Returns
- F32 val
hash
fun box hash() : USize val
Returns
- USize val
hash64
fun box hash64() : U64 val
Returns
- U64 val
i128
fun box i128() : I128 val
Returns
- I128 val
u128
fun box u128() : U128 val
Returns
- U128 val
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
- I128 val
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
- U128 val
add_unsafe
fun box add_unsafe( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
sub_unsafe
fun box sub_unsafe( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
mul_unsafe
fun box mul_unsafe( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
div_unsafe
fun box div_unsafe( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
divrem_unsafe
fun box divrem_unsafe( y: F32 val) : (F32 val , F32 val)
Parameters
- y: F32 val
Returns
rem_unsafe
fun box rem_unsafe( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
neg_unsafe
fun box neg_unsafe() : F32 val
Returns
- F32 val
eq_unsafe
fun box eq_unsafe( y: F32 val) : Bool val
Parameters
- y: F32 val
Returns
- Bool val
ne_unsafe
fun box ne_unsafe( y: F32 val) : Bool val
Parameters
- y: F32 val
Returns
- Bool val
lt_unsafe
fun box lt_unsafe( y: F32 val) : Bool val
Parameters
- y: F32 val
Returns
- Bool val
le_unsafe
fun box le_unsafe( y: F32 val) : Bool val
Parameters
- y: F32 val
Returns
- Bool val
ge_unsafe
fun box ge_unsafe( y: F32 val) : Bool val
Parameters
- y: F32 val
Returns
- Bool val
gt_unsafe
fun box gt_unsafe( y: F32 val) : Bool val
Parameters
- y: F32 val
Returns
- Bool val
string
fun box string() : String iso^
Returns
- String iso^
add
fun box add( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
sub
fun box sub( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
mul
fun box mul( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
div
fun box div( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
divrem
fun box divrem( y: F32 val) : (F32 val , F32 val)
Parameters
- y: F32 val
Returns
rem
fun box rem( y: F32 val) : F32 val
Parameters
- y: F32 val
Returns
- F32 val
neg
fun box neg() : F32 val
Returns
- F32 val
eq
fun box eq( y: F32 val) : Bool val
Parameters
- y: F32 val
Returns
- Bool val
ne
fun box ne( y: F32 val) : Bool val
Parameters
- y: F32 val
Returns
- Bool val
lt
fun box lt( y: F32 val) : Bool val
Parameters
- y: F32 val
Returns
- Bool val
le
fun box le( y: F32 val) : Bool val
Parameters
- y: F32 val
Returns
- Bool val
ge
fun box ge( y: F32 val) : Bool val
Parameters
- y: F32 val
Returns
- Bool val
gt
fun box gt( y: F32 val) : Bool val
Parameters
- y: F32 val
Returns
- Bool val
i8
fun box i8() : I8 val
Returns
- I8 val
i16
fun box i16() : I16 val
Returns
- I16 val
i32
fun box i32() : I32 val
Returns
- I32 val
i64
fun box i64() : I64 val
Returns
- I64 val
ilong
fun box ilong() : ILong val
Returns
- ILong val
isize
fun box isize() : ISize val
Returns
- ISize val
u8
fun box u8() : U8 val
Returns
- U8 val
u16
fun box u16() : U16 val
Returns
- U16 val
u32
fun box u32() : U32 val
Returns
- U32 val
u64
fun box u64() : U64 val
Returns
- U64 val
ulong
fun box ulong() : ULong val
Returns
- ULong val
usize
fun box usize() : USize val
Returns
- USize val
f32
fun box f32() : F32 val
Returns
- F32 val
f64
fun box f64() : F64 val
Returns
- F64 val
i8_unsafe
fun box i8_unsafe() : I8 val
Returns
- I8 val
i16_unsafe
fun box i16_unsafe() : I16 val
Returns
- I16 val
i32_unsafe
fun box i32_unsafe() : I32 val
Returns
- I32 val
i64_unsafe
fun box i64_unsafe() : I64 val
Returns
- I64 val
ilong_unsafe
fun box ilong_unsafe() : ILong val
Returns
- ILong val
isize_unsafe
fun box isize_unsafe() : ISize val
Returns
- ISize val
u8_unsafe
fun box u8_unsafe() : U8 val
Returns
- U8 val
u16_unsafe
fun box u16_unsafe() : U16 val
Returns
- U16 val
u32_unsafe
fun box u32_unsafe() : U32 val
Returns
- U32 val
u64_unsafe
fun box u64_unsafe() : U64 val
Returns
- U64 val
ulong_unsafe
fun box ulong_unsafe() : ULong val
Returns
- ULong val
usize_unsafe
fun box usize_unsafe() : USize val
Returns
- USize val
f32_unsafe
fun box f32_unsafe() : F32 val
Returns
- F32 val
f64_unsafe
fun box f64_unsafe() : F64 val
Returns
- F64 val
compare
fun box compare( that: F32 val) : (Less val | Equal val | Greater val)
Parameters
- that: F32 val
Returns
© 2016-2020, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/builtin-F32