Class BigFloat.SpecialBigFloat
- All Implemented Interfaces:
Serializable, Comparable<BigFloat>
- Enclosing class:
BigFloat
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class BigFloat
BigFloat.Context -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final BigFloat.Contextprivate final BigFloat.SpecialBigFloat.TypeFields inherited from class BigFloat
NaN, NEGATIVE_INFINITY, POSITIVE_INFINITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns theBigFloatthat isthis + x.intReturns theBigFloatthat isthis / x.booleanReturns theBigFloat.Contextofthisvalue.Returns the exponent ofthisvalue written as mantissa * 10exponent.Returns the fractional part ofthisvalue (right of the decimal point).Returns the integral part ofthisvalue (left of the decimal point).Returns the mantissa ofthisvalue written as mantissa * 10exponent.inthashCode()booleanbooleanReturns whetherthisvalue can be represented asint.booleanReturns whether thisBigFloatis negative.booleanReturns whether thisBigFloatis positive.protected booleanbooleanisZero()Returns whether thisBigFloatis 0.Returns theBigFloatthat isthis * x.intsignum()Returns the signum function of thisBigFloat.Returns theBigFloatthat isthis - x.Returns theBigFloatthat isthis - x.Returnsthisvalue as aBigDecimalvalue.doubletoDouble()Returnsthisvalue as adoublevalue.inttoInt()Returnsthisvalue as aintvalue.longtoLong()Returnsthisvalue as alongvalue.toString()protected BigFloat.SpecialBigFloat.Typetype()return special type of a valueMethods inherited from class BigFloat
abs, acos, acosh, acot, acoth, add, add, add, add, asin, asinh, atan, atanh, context, context, cos, cosh, cot, coth, divide, divide, divide, divide, exp, isBetween, isEqual, isGreaterThan, isGreaterThanOrEqual, isInfinity, isLessThan, isLessThanOrEqual, isNaN, log, log10, log2, max, max, min, min, multiply, multiply, multiply, multiply, negate, pow, pow, pow, pow, pow, remainder, remainder, remainder, remainder, root, root, root, root, root, sin, sinh, sqrt, subtract, subtract, subtract, tan, tanh
-
Field Details
-
DUMMY_CONTEXT
-
type
-
-
Constructor Details
-
SpecialBigFloat
-
-
Method Details
-
isSpecial
-
type
Description copied from class:BigFloatreturn special type of a value- Overrides:
typein classBigFloat- Returns:
BigFloat.SpecialBigFloat.Type
-
add
Description copied from class:BigFloatReturns theBigFloatthat isthis + x.If the two values do not have the same
BigFloat.Context, the result will contain theBigFloat.Contextwith the larger precision. -
subtract
Description copied from class:BigFloatReturns theBigFloatthat isthis - x.If the two values do not have the same
BigFloat.Context, the result will contain theBigFloat.Contextwith the larger precision. -
subtract
-
multiply
Description copied from class:BigFloatReturns theBigFloatthat isthis * x.If the two values do not have the same
BigFloat.Context, the result will contain theBigFloat.Contextwith the larger precision. -
divide
Description copied from class:BigFloatReturns theBigFloatthat isthis / x.If the two values do not have the same
BigFloat.Context, the result will contain theBigFloat.Contextwith the larger precision. -
remainder
Description copied from class:BigFloatReturns theBigFloatthat is the remainder when dividingthisbyx.If the two values do not have the same
BigFloat.Context, the result will contain theBigFloat.Contextwith the larger precision. -
pow
Description copied from class:BigFloatReturns theBigFloatthat isthisto the power ofy.If the two values do not have the same
BigFloat.Context, the result will contain theBigFloat.Contextwith the larger precision. -
root
Description copied from class:BigFloatReturns theBigFloatthat is theyth root ofthis.If the two values do not have the same
BigFloat.Context, the result will contain theBigFloat.Contextwith the larger precision. -
hashCode
-
equals
-
signum
public int signum()Description copied from class:BigFloatReturns the signum function of thisBigFloat.- Overrides:
signumin classBigFloat- Returns:
- -1, 0, or 1 as the value of this
BigDecimalis negative, zero, or positive.
-
isNegative
public boolean isNegative()Description copied from class:BigFloatReturns whether thisBigFloatis negative.- Overrides:
isNegativein classBigFloat- Returns:
trueif negative,falseif 0 or positive
-
isZero
-
isPositive
public boolean isPositive()Description copied from class:BigFloatReturns whether thisBigFloatis positive.- Overrides:
isPositivein classBigFloat- Returns:
trueif positive,falseif 0 or negative
-
compareTo
-
isIntValue
public boolean isIntValue()Description copied from class:BigFloatReturns whetherthisvalue can be represented asint.- Overrides:
isIntValuein classBigFloat- Returns:
trueif the value can be represented asintvalue- See Also:
-
isDoubleValue
public boolean isDoubleValue()Description copied from class:BigFloat- Overrides:
isDoubleValuein classBigFloat- Returns:
trueif the value can be represented asdoublevalue- See Also:
-
getMantissa
Description copied from class:BigFloatReturns the mantissa ofthisvalue written as mantissa * 10exponent.The mantissa is defined as having exactly 1 digit before the decimal point.
- Overrides:
getMantissain classBigFloat- Returns:
- the mantissa
- See Also:
-
getExponent
Description copied from class:BigFloatReturns the exponent ofthisvalue written as mantissa * 10exponent.The mantissa is defined as having exactly 1 digit before the decimal point.
- Overrides:
getExponentin classBigFloat- Returns:
- the exponent
- See Also:
-
getIntegralPart
Description copied from class:BigFloatReturns the integral part ofthisvalue (left of the decimal point).- Overrides:
getIntegralPartin classBigFloat- Returns:
- the integral part
- See Also:
-
getFractionalPart
Description copied from class:BigFloatReturns the fractional part ofthisvalue (right of the decimal point).- Overrides:
getFractionalPartin classBigFloat- Returns:
- the fractional part
- See Also:
-
getContext
Description copied from class:BigFloatReturns theBigFloat.Contextofthisvalue.- Overrides:
getContextin classBigFloat- Returns:
- the
BigFloat.Context
-
toBigDecimal
Description copied from class:BigFloatReturnsthisvalue as aBigDecimalvalue.- Overrides:
toBigDecimalin classBigFloat- Returns:
- the
BigDecimalvalue
-
toDouble
-
toLong
-
toInt
-
toString
-