Class BigFloat.SpecialBigFloat
- All Implemented Interfaces:
Serializable,Comparable<BigFloat>
- Enclosing class:
BigFloat
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class ch.obermuhlner.math.big.BigFloat
BigFloat.Context -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final BigFloat.Contextprivate final BigFloat.SpecialBigFloat.TypeFields inherited from class ch.obermuhlner.math.big.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 ch.obermuhlner.math.big.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
protected boolean 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
Description copied from class:BigFloatReturns theBigFloatthat isthis - x. -
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
public int 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
public boolean isZero()Description copied from class:BigFloatReturns whether thisBigFloatis 0. -
isPositive
public boolean isPositive()Description copied from class:BigFloatReturns whether thisBigFloatis positive.- Overrides:
isPositivein classBigFloat- Returns:
trueif positive,falseif 0 or negative
-
compareTo
- Specified by:
compareToin interfaceComparable<BigFloat>- Overrides:
compareToin classBigFloat
-
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
public double toDouble()Description copied from class:BigFloatReturnsthisvalue as adoublevalue. -
toLong
public long toLong()Description copied from class:BigFloatReturnsthisvalue as alongvalue. -
toInt
public int toInt()Description copied from class:BigFloatReturnsthisvalue as aintvalue. -
toString
-