Returns a new instance of Quadruple
with the value of the absolute value of this instance
Quadruple.add(double summand)
Adds the value of the given double
summand to the value of this Quadruple.
Quadruple.add(long summand)
Adds the value of the given long
summand to the value of this Quadruple.
Adds the value of the given Quadruple
summand to the value of this Quadruple.
Adds the value of the given double op2
to the value of Quadruple op1
and creates a new instance of Quadruple containing the sum.
Adds the value of the given long op2
to the value of Quadruple op1
and creates a new instance of Quadruple containing the sum.
Adds the value of the given Quadruple op2
to the value of Quadruple op1
and creates a new instance of Quadruple containing the sum.
Quadruple.assign(boolean negative,
int exponent,
long mantHi,
long mantLo)
Builds a Quadruple value from the given low-level parts and assigns it to the instance.
Treats the
exponent
parameter as the biased exponent value,
so that its value equal to
EXPONENT_OF_ONE
(
0xFFFF_FFFEL
)
corresponds to the
Quadruple
value of 1.0.
Quadruple.assign(double value)
Converts the given value to quadruple and assigns it to the instance.
Expands exponent to 32 bits preserving its value, and expands mantissa to 128 bits,
filling with zeroes the least significant 76 bits that absent in the double value.
Quadruple.assign(int exponent,
long mantHi,
long mantLo)
Builds a non-negative Quadruple value from the given low-level parts and assigns it to the instance.
Treats the
exponent
parameter as the biased exponent value,
so that its value equal to
EXPONENT_OF_ONE
(
0xFFFF_FFFEL
)
corresponds to the
Quadruple
value of 1.0.
Converts the given value to quadruple and assigns it to the instance.
To find the mantissa, shifts the bits of the absolute value of the parameter left,
so that its most significant non-zero bit (that stands for the 'implicit unity'
of the floating point formats) gets shifted out, then corrects the exponent
depending on the shift distance and sets the sign
in accordance with the initial sign of the parameter.
Quadruple.assign(long[] value)
Builds a Quadruple from the low-level parts given as an array of long
.
The elements of the array are expected to contain the following values:
Assigns the given value to the instance (copies the values of the private fields of the parameter
to the respective fields of this instance).
Parses the given String that is expected to contain
floating-point value in any conventional string form or a string designation
of one of special values, and assigns the corresponding value to the instance.
Parsing is case-insensitive.
The admittable string designations for special values are the following:
"Quadruple.MIN_VALUE", "MIN_VALUE", "Quadruple.MAX_VALUE", "MAX_VALUE",
"Quadruple.MIN_NORMAL", "MIN_NORMAL", "Quadruple.NaN", "NaN",
"Quadruple.NEGATIVE_INFINITY", "NEGATIVE_INFINITY", "-INFINITY",
"Quadruple.POSITIVE_INFINITy", "POSITIVE_INFINITY", "INFINITY", "+INFINITY".
If the exact value of the number represented by the input string is greater
than the nearest exact Quadruple
value by less than
0.5 - 1e-17
of the least significant bit of the mantissa of the latter, it gets rounded
down to the aforementioned Quadruple
value.
If it is greater by 0.5 LSB or more, it gets rounded up to the greater adjacent
Quadruple value.
In cases when difference between the input value and the nearest Quadruple
value is between
(0.5 - 1e-17) * LSB
and 0.5 * LSB
,
the direction of the rounding is unpredictable.
Converts the given value to Quadruple
, and assigns it to the instance.
If the source value can't be represented as Quadruple
exactly, it gets rounded to a 129-bit value
(implicit unity + 128 bits of the fractional part of the mantissa) according to the 'half-up' rule.
Assigns the value of a IEEE-754 quadruple value passed in as an array
of 16 byte
s containing the 128 bits of the IEEE-754 quadruple to the given instance.
The passed in array of longs is expected to be big-endian, in other words the value[0]
should contain the sign bit, and the high-order 7 bits of the IEEE-754 quadruple's exponent,
and the value[15]
is expected to contain the least significant 8 bits of the significand.
The argument remains unchanged.
Assigns the value of a IEEE-754 quadruple value passed in as an array
of two long
s containing the 128 bits of the IEEE-754 quadruple to the given instance.
The passed in array of longs is expected to be big-endian, in other words the value[0]
should contain the sign bit, the exponent, and the most significant 48 bits of the significand.
The argument remains unchanged.
Assigns to this instance the maximum of the
values of this
instance and the operand.
Assigns to this instance the minimum of the
values of this
instance and the operand.
Assigns the value of "Not a Number" (NaN
) to this instance.
Assigns the value of -Infinity
to this instance.
Assigns the value of +Infinity
to this instance.
Builds a Quadruple value from the given low-level parts and assigns it to the instance.
Treats the exponent
parameter as the unbiased exponent value,
whose 0
value corresponds to the Quadruple
value of 1.0.
Builds a non-negative Quadruple value from the given low-level parts and assigns it to the instance.
Treats the exponent
parameter as the unbiased exponent value,
whose 0
value corresponds to the Quadruple
value of 1.0.
Quadruple.divide(double divisor)
Divides the value of this Quadruple by the value of the given double
divisor.
Quadruple.divide(long divisor)
Divides the value of this Quadruple by the value of the given long
divisor.
Divides the value of this Quadruple by the value of the given Quadruple
divisor.
Divides the value of the given dividend by the value of the given double
divisor,
creates and returns a new instance of Quadruple containing the quotient.
Divides the value of the given dividend by the value of the given long
divisor,
creates and returns a new instance of Quadruple containing the quotient.
Divides the value of the given dividend by the value of the given Quadruple
divisor,
creates and returns a new instance of Quadruple containing the quotient.
Returns a new instance of Quadruple
with the value of the
maximum of the values of the operands.
Returns a new Quadruple
instance with the value of MAX_VALUE
(2^2147483647 * (2 - 2^-128)
= 1.76161305168396335320749314979184028566452310e+646456993)
Returns a new instance of Quadruple
with the value of the
minimum of the values of the operands.
Returns a new Quadruple
instance with the value of MIN_NORMAL
(2^-2147483646
= 2.27064621040149253752656726517958758124747730e-646456993)
Returns a new Quadruple
instance with the value of MIN_VALUE
(2^-2147483774
= 6.67282948260747430814835377499134611597699952e-646457032)
Multiplies the value of this Quadruple by the value of the given double
factor.
Multiplies the value of this Quadruple by the value of the given long
factor.
Multiplies the value of this Quadruple by the value of the given Quadruple
factor.
Multiplies the value of the given Quadruple factor1
by the double factor2
,
creates and returns a new instance of Quadruple containing the product.
Multiplies the value of the given Quadruple factor1
by the long factor2
,
creates and returns a new instance of Quadruple containing the product.
Multiplies the value of the given Quadruple factor1
by the Quadruple factor2
,
creates and returns a new instance of Quadruple containing the product.
Returns a new Quadruple
instance with the value of NaN
.
Changes the sign of this Quadruple.
Returns a new Quadruple
instance with the value of -Infinity
.
Creates a new Quadruple instance with a pseudo-random value
using a static randomly initialized java.util.Random
instance.
Creates a new Quadruple instance with a pseudo-random value
using the given java.util.Random
instance.
Returns a new Quadruple
instance with the value of 1.0.
Returns a new Quadruple
instance with the value of the number π
(pi)
(3.141592653589793238462643383279502884195)
Returns a new Quadruple
instance with the value of +Infinity
.
Computes a square root of the value of this Quadruple
and replaces the old value of this instance with the newly-computed value.
Computes a square root of the value of the given Quadruple
,
creates and returns a new instance of Quadruple containing the value of the square root.
Subtracts the value of the given double
subtrahend from the value of this Quadruple.
Subtracts the value of the given long
subtrahend from the value of this Quadruple.
Subtracts the value of the given Quadruple
subtrahend from the value of this Quadruple.
Subtracts the value of the double
subtrahend
from the value of the minuend
,
creates and returns a new instance of Quadruple that contains the difference.
Subtracts the value of the long
subtrahend
from the value of the minuend
,
creates and returns a new instance of Quadruple that contains the difference.
Subtracts the value of the Quadruple
subtrahend
from the value of the minuend
,
creates and returns a new instance of Quadruple that contains the difference.
Returns a new Quadruple
instance with the value of 10.0.
Returns a new Quadruple
instance with the value of 2.0.
Adds the value of the given Quadruple
summand to the value of this Quadruple.
Adds the value of the given double op2
to the value of Quadruple op1
and creates a new instance of Quadruple containing the sum.
Adds the value of the given long op2
to the value of Quadruple op1
and creates a new instance of Quadruple containing the sum.
Adds the value of the given Quadruple op2
to the value of Quadruple op1
and creates a new instance of Quadruple containing the sum.
Assigns the given value to the instance (copies the values of the private fields of the parameter
to the respective fields of this instance).
Assigns to this instance the maximum of the
values of this
instance and the operand.
Assigns to this instance the minimum of the
values of this
instance and the operand.
static int
Compares the values of two instances.
static int
Compares the magnitudes (absolute values) of the two Quadruples.
int
Compares the magnitude (absolute value) of this instance
with the magnitude of the other instance.
int
Compares the value of this instance with the value of the specified instance.
Divides the value of this Quadruple by the value of the given Quadruple
divisor.
Divides the value of the given dividend by the value of the given double
divisor,
creates and returns a new instance of Quadruple containing the quotient.
Divides the value of the given dividend by the value of the given long
divisor,
creates and returns a new instance of Quadruple containing the quotient.
Divides the value of the given dividend by the value of the given Quadruple
divisor,
creates and returns a new instance of Quadruple containing the quotient.
Returns a new instance of Quadruple
with the value of the
maximum of the values of the operands.
Returns a new instance of Quadruple
with the value of the
minimum of the values of the operands.
Multiplies the value of this Quadruple by the value of the given Quadruple
factor.
Multiplies the value of the given Quadruple factor1
by the double factor2
,
creates and returns a new instance of Quadruple containing the product.
Multiplies the value of the given Quadruple factor1
by the long factor2
,
creates and returns a new instance of Quadruple containing the product.
Multiplies the value of the given Quadruple factor1
by the Quadruple factor2
,
creates and returns a new instance of Quadruple containing the product.
Computes a square root of the value of the given Quadruple
,
creates and returns a new instance of Quadruple containing the value of the square root.
Subtracts the value of the given Quadruple
subtrahend from the value of this Quadruple.
Subtracts the value of the double
subtrahend
from the value of the minuend
,
creates and returns a new instance of Quadruple that contains the difference.
Subtracts the value of the long
subtrahend
from the value of the minuend
,
creates and returns a new instance of Quadruple that contains the difference.
Subtracts the value of the Quadruple
subtrahend
from the value of the minuend
,
creates and returns a new instance of Quadruple that contains the difference.