SignedInteger[A: SignedInteger[A, B] val, B: UnsignedInteger[B] val]
trait val SignedInteger[A: SignedInteger[A, B] val, B: UnsignedInteger[B] val] is Integer[A] val
Implements
- Integer[A] val
Constructors
create
new val create( value: A) : Real[A] val^
Parameters
- value: A
Returns
- 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^
Parameters
- a: B
Returns
- Real[A] val^
min_value
new val min_value() : Real[A] val^
Returns
- Real[A] val^
max_value
new val max_value() : Real[A] val^
Returns
- Real[A] val^
Public Functions
abs
fun box abs() : B
Returns
- B
shl
fun box shl( y: B) : A
Parameters
- y: B
Returns
- A
shr
fun box shr( y: B) : A
Parameters
- y: B
Returns
- A
shl_unsafe
Unsafe operation. If bits differing from the final sign bit are shifted-out, the result is undefined.
fun box shl_unsafe( y: B) : A
Parameters
- y: B
Returns
- A
shr_unsafe
Unsafe operation. If non-zero bits are shifted-out, the result is undefined.
fun box shr_unsafe( y: B) : A
Parameters
- y: B
Returns
- A
popcount
fun box popcount() : B
Returns
- B
clz
fun box clz() : B
Returns
- B
ctz
fun box ctz() : B
Returns
- B
clz_unsafe
Unsafe operation. If this is 0, the result is undefined.
fun box clz_unsafe() : B
Returns
- B
ctz_unsafe
Unsafe operation. If this is 0, the result is undefined.
fun box ctz_unsafe() : B
Returns
- B
bitwidth
fun box bitwidth() : B
Returns
- B
bytewidth
fun box bytewidth() : USize val
Returns
- USize val
string
fun box string() : String iso^
Returns
- String iso^
add_unsafe
fun box add_unsafe( y: A) : A
Parameters
- y: A
Returns
- A
sub_unsafe
fun box sub_unsafe( y: A) : A
Parameters
- y: A
Returns
- A
mul_unsafe
fun box mul_unsafe( y: A) : A
Parameters
- y: A
Returns
- A
div_unsafe
fun box div_unsafe( y: A) : A
Parameters
- y: A
Returns
- A
divrem_unsafe
fun box divrem_unsafe( y: A) : (A , A)
Parameters
- y: A
Returns
- (A , A)
rem_unsafe
fun box rem_unsafe( y: A) : A
Parameters
- y: A
Returns
- A
fld_unsafe
fun box fld_unsafe( y: A) : A
Parameters
- y: A
Returns
- A
mod_unsafe
fun box mod_unsafe( y: A) : A
Parameters
- y: A
Returns
- A
add_partial
fun box add_partial( y: A) : A ?
Parameters
- y: A
Returns
- A ?
sub_partial
fun box sub_partial( y: A) : A ?
Parameters
- y: A
Returns
- A ?
mul_partial
fun box mul_partial( y: A) : A ?
Parameters
- y: A
Returns
- A ?
div_partial
fun box div_partial( y: A) : A ?
Parameters
- y: A
Returns
- A ?
rem_partial
fun box rem_partial( y: A) : A ?
Parameters
- y: A
Returns
- A ?
divrem_partial
fun box divrem_partial( y: A) : (A , A) ?
Parameters
- y: A
Returns
- (A , A) ?
fld_partial
fun box fld_partial( y: A) : A ?
Parameters
- y: A
Returns
- A ?
mod_partial
fun box mod_partial( y: A) : A ?
Parameters
- y: A
Returns
- A ?
neg_unsafe
fun box neg_unsafe() : A
Returns
- A
addc
fun box addc( y: A) : (A , Bool val)
Parameters
- y: A
Returns
- (A , Bool val)
subc
fun box subc( y: A) : (A , Bool val)
Parameters
- y: A
Returns
- (A , Bool val)
mulc
fun box mulc( y: A) : (A , Bool val)
Parameters
- y: A
Returns
- (A , Bool val)
divc
fun box divc( y: A) : (A , Bool val)
Parameters
- y: A
Returns
- (A , Bool val)
remc
fun box remc( y: A) : (A , Bool val)
Parameters
- y: A
Returns
- (A , Bool val)
fldc
fun box fldc( y: A) : (A , Bool val)
Parameters
- y: A
Returns
- (A , Bool val)
modc
fun box modc( y: A) : (A , Bool val)
Parameters
- y: A
Returns
- (A , Bool val)
op_and
fun box op_and( y: A) : A
Parameters
- y: A
Returns
- A
op_or
fun box op_or( y: A) : A
Parameters
- y: A
Returns
- A
op_xor
fun box op_xor( y: A) : A
Parameters
- y: A
Returns
- A
op_not
fun box op_not() : A
Returns
- A
bit_reverse
fun box bit_reverse() : A
Returns
- A
bswap
fun box bswap() : A
Returns
- A
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
divrem
fun box divrem( y: A) : (A , A)
Parameters
- y: A
Returns
- (A , A)
rem
fun box rem( y: A) : A
Parameters
- y: A
Returns
- A
neg
fun box neg() : A
Returns
- A
fld
fun box fld( y: A) : A
Parameters
- y: A
Returns
- A
mod
fun box mod( y: A) : A
Parameters
- y: A
Returns
- A
eq
fun box eq( y: box->A) : Bool val
Parameters
- y: box->A
Returns
- Bool val
ne
fun box ne( y: box->A) : Bool val
Parameters
- y: box->A
Returns
- Bool val
lt
fun box lt( y: box->A) : Bool val
Parameters
- y: box->A
Returns
- Bool val
le
fun box le( y: box->A) : Bool val
Parameters
- y: box->A
Returns
- Bool val
ge
fun box ge( y: box->A) : Bool val
Parameters
- y: box->A
Returns
- Bool val
gt
fun box gt( y: box->A) : Bool val
Parameters
- y: box->A
Returns
- Bool val
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() : USize val
Returns
- USize val
hash64
fun box hash64() : U64 val
Returns
- U64 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
i128
fun box i128() : I128 val
Returns
- I128 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
u128
fun box u128() : U128 val
Returns
- U128 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
i128_unsafe
fun box i128_unsafe() : I128 val
Returns
- I128 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
u128_unsafe
fun box u128_unsafe() : U128 val
Returns
- U128 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: box->A) : (Less val | Equal val | Greater val)
Parameters
- that: box->A
Returns
© 2016-2020, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/builtin-SignedInteger