BCDInteger

Arbitrary Max_Precision BCD Integer Arithmetic

Constructors

Link copied to clipboard
constructor()
new Number, val = 0, length = 0
constructor(Value: BCDInteger)
new Number from existing number
constructor(Digits: Array<Byte>, Negative: Boolean)
new Number from attributes.
constructor(s: CharSequence)
new Number, val and length from string
constructor(n: Int)
new Number, val = 0, length = n
constructor(value: Long)
new Number, val = 0, length = n

Properties

Link copied to clipboard
Compare result.
Link copied to clipboard
Compare result.
Link copied to clipboard
val Compare_Less: Int = -1
Compare result.
Link copied to clipboard
private open var Digits: Array<Byte>
number: sum(i = 0 ...
Link copied to clipboard
Effectivly needed precision.
private val INTEGER_VALUES_CAN_NOT_USE_LOGARITHMIC_FUNCTIONS: String = "Integer Values can not use logarithmic functions"
private val INTEGER_VALUES_CAN_NOT_USE_TRIGONOMETRIC_FUNCTIONS: String = "Integer Values can not use trigonometric functions"
Link copied to clipboard
private open var Last_Remainder: BCDInteger
remainder of last long division
Link copied to clipboard
private open var Last_Remainder_Short: Byte
remainder of last short division
Link copied to clipboard
private val Logger: Logger
Class logger instance.
Link copied to clipboard
val Max_Precision: Int = 18
Max supported precision.
Link copied to clipboard
private open var Negative: Boolean
sign
Link copied to clipboard
private val Null_Digits: Array<Byte>
No digits
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
private open var Num_Digits: Int
number of digits
Link copied to clipboard
private val TAG: String
Class logger tag.

Functions

Link copied to clipboard
open fun $div(y: Number): Number
signed division
Link copied to clipboard
open fun $minus(y: Number): Number
signed subtraction
Link copied to clipboard
open fun $plus(y: Number): Number
signed addition
Link copied to clipboard
open fun $times(y: Number): Number
signed multiplication
Link copied to clipboard
open fun $times$times(y: Number): Number
xy
Link copied to clipboard
open fun abs(): Number
|x|
Link copied to clipboard
open fun addUnsigned(y: Int): BCDInteger
unsigned (absolute) addition of one digit
private open fun addUnsigned(a: BCDInteger): BCDInteger
unsigned (absolute) addition
Link copied to clipboard
open fun and(y: Number): Number
Logical and
Link copied to clipboard
open fun arc_cos(): Number
open fun arc_cos(Half_Circle: Number): Number
arc cosine
Link copied to clipboard
open fun arc_cos_hyp(): Number
area hyperbolic cosine: loge (x + √(x-1) × √(x+1))
Link copied to clipboard
open fun arc_sin(): Number
open fun arc_sin(Half_Circle: Number): Number
arc sine
Link copied to clipboard
open fun arc_sin_hyp(): Number
area hyperbolic sine: loge (x + √(x² + 1))
Link copied to clipboard
open fun arc_tan(): Number
open fun arc_tan(Half_Circle: Number): Number
arc tangent
Link copied to clipboard
open fun arc_tan_hyp(): Number
area hyperbolic tangent: loge ((1 + x) ÷ (1 - x)) / 2
Link copied to clipboard
open fun As_BCDFloat(): BCDFloat
Either convert to a BCDFloat or return this.
Link copied to clipboard
Either convert to a or return this.
Link copied to clipboard
Either convert to a BCDInteger or return this.
Link copied to clipboard
open fun Clone(): Number
clone the integer - but it might be easier to use the provided copy Constructor instead.
Link copied to clipboard
open fun clone(): Any
clone the float - but it might be easier to use the provided copy Constructor instead.
Link copied to clipboard
coefficient - while a 18 digits number can also be represented as an long an 18digits multiplication need a 36digits temporary and that is more then a long can do.
Link copied to clipboard
open fun Compare(Value: Number): Int
signed compare
Link copied to clipboard
open fun Compare_Unsigned(Value: BCDInteger): Int
unsigned (absolute) compare
Link copied to clipboard
abstract fun compareTo(p: T): Int
open fun compareTo(rightValue: Number): Int
Link copied to clipboard
open fun cos(): Number
cos (x)
open fun cos(Half_Circle: Number): Number
cosine
Link copied to clipboard
open fun cos_hyp(): Number
Hyperbolic cosine: (Exponent^x + Exponent^-x)/2
Link copied to clipboard
open fun Digits(): Array<Byte>
number: sum(i = 0 ...
Link copied to clipboard
open fun div(y: Number): Number
x ÷ y
Link copied to clipboard
private open fun divUnsigned(y: Int): BCDInteger
private open fun divUnsigned(Right: BCDInteger): BCDInteger
predicate: Num_Digits > v.numDigits, v = v.Normalize(), v.numDigits > 1
Link copied to clipboard
open fun equals(rightValue: Any): Boolean
Link copied to clipboard
open fun exp_10(): Number
10x
Link copied to clipboard
open fun exp_e(): Number
ex
Link copied to clipboard
open fun Exponent(): Int
current exponent - note that the exponent is based on the internal representation where the radix point is right most.
Link copied to clipboard
protected open fun finalize()
Link copied to clipboard
open fun Fix(Decimal: Int, Exponent: Int): Number
Round to a given Precision after the decimal point.
Link copied to clipboard
open fun Frac(): Number
Recompose a frac double from the given data.
Link copied to clipboard
open fun gcd(y: BCDInteger): BCDInteger
<>calculate the greatest common denominator using the Euclidean algorithm
Link copied to clipboard
fun getClass(): Class<out Any>
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun Indirect_Value(Digit_Count: Int): Int
Get valuef or indirect addressing.
Link copied to clipboard
open fun Integer(): Number
integer part of the BCDFloat Do not mix up with To_Integer - This version returns another Number!
Link copied to clipboard
open fun Is_Finite(): Boolean
current value is a normal number
Link copied to clipboard
open fun Is_Infinite(): Boolean
current value is Infinity.
Link copied to clipboard
open fun Is_Integer(): Boolean
Current value is integer value.
Link copied to clipboard
open fun Is_NaN(): Boolean
current value is not a number
Link copied to clipboard
open fun Is_Negative(): Boolean
Current value us negative
Link copied to clipboard
value is 0
Link copied to clipboard
Link copied to clipboard
open fun log_10(): Number
log10 (x)
Link copied to clipboard
open fun log_e(): Number
loge (x)
Link copied to clipboard
private open fun mid(start: Int, len: Int): BCDInteger
get part of number
Link copied to clipboard
open fun minus(y: Number): Number
x - y
Link copied to clipboard
private open fun mulUnsigned(y: Int): BCDInteger
unsigned (absolute) multiplication by one digit
private open fun mulUnsigned(y: BCDInteger): BCDInteger
unsigned (absolute) multiplication
Link copied to clipboard
open fun neg(): Number
Link copied to clipboard
open fun Normalize()
Normalize (remove leading zero digits)
Link copied to clipboard
open fun not(): Number
Logical not
Link copied to clipboard
fun notify()
Link copied to clipboard
fun notifyAll()
Link copied to clipboard
open fun Num_Digits(): Int
returns number of digits
Link copied to clipboard
open fun or(y: Number): Number
Logical or
Link copied to clipboard
open fun P_To_X(θ: Number): Number
open fun P_To_X(θ: Number, Half_Circle: Number): Number
Convert Polar to Rectangle Coordinates
Link copied to clipboard
open fun P_To_Y(θ: Number): Number
open fun P_To_Y(θ: Number, Half_Circle: Number): Number
Convert Polar to Rectangle Coordinates
Link copied to clipboard
open fun plus(y: Number): Number
x + y
Link copied to clipboard
open fun pow(y: Number): Number
xy
Link copied to clipboard
open fun R_To_R(y: Number): Number
Convert Rectangle to Polar Coordinates
Link copied to clipboard
open fun R_To_θ(y: Number): Number
open fun R_To_θ(y: Number, Half_Circle: Number): Number
Convert Rectangle to Polar Coordinates
Link copied to clipboard
open fun root(r: Number): Number
r√x
Link copied to clipboard
open fun Round(): Number
Round to effective Precision and Exponent.
open fun Round(Precision: Int, Exponent: Int): Number
Round to a given Precision and Exponent.
Link copied to clipboard
open fun Shift_Left(n: Int): BCDInteger
shift left by n digits (= divide by 10n)
Link copied to clipboard
open fun Shift_Right(n: Int): BCDInteger
shift right by n digits (= multiply by 10n)
Link copied to clipboard
open fun sin(): Number
open fun sin(Half_Circle: Number): Number
sine
Link copied to clipboard
open fun sin_hyp(): Number
hyperbolic sine: (ex - e-x) ÷ 2
Link copied to clipboard
open fun square(): Number
Link copied to clipboard
open fun square_root(): Number
²√x
Link copied to clipboard
private open fun subUnsigned(y: BCDInteger): BCDInteger
unsigned (absolute) subtraction predicate: this > a (or this < a if Num_Digits == a.numDigits and underflow in most significant digit is allowed)
Link copied to clipboard
open fun tan(): Number
tan x
open fun tan(Half_Circle: Number): Number
tangent
Link copied to clipboard
open fun tan_hyp(): Number
Hyperbolic tangent: (e2x - 1) ÷ (e2x + 1)
Link copied to clipboard
open fun times(y: Number): Number
x × y
Link copied to clipboard
convert to native/debug string representation
Link copied to clipboard
open fun To_Integer(): Int
Convert to integer Do not mix up with Integer – This version returns a Java int!
Link copied to clipboard
open fun To_Long(): Long
Link copied to clipboard
open fun toString(): String
return string representation of number
Link copied to clipboard
fun wait()
Link copied to clipboard
open fun xor(y: Number): Number
Logical xor