Package org.jruby.ext.bigdecimal
Class RubyBigDecimal
java.lang.Object
org.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.RubyNumeric
org.jruby.ext.bigdecimal.RubyBigDecimal
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<IRubyObject>,InstanceVariables,InternalVariables,IRubyObject,CoreObjectType
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.jruby.RubyNumeric
RubyNumeric.InvalidIntegerException, RubyNumeric.NumberTooLargeExceptionNested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.DataNested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.Finalizer -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class org.jruby.RubyNumeric
DBL_EPSILONFields inherited from class org.jruby.RubyObject
IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATORFields inherited from class org.jruby.RubyBasicObject
ALL_F, BASICOBJECT_ALLOCATOR, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, IS_OVERLAID_F, metaClass, NEVER, NIL_F, REFINED_MODULE_F, STAMP_OFFSET, TAINTED_F, UNDEF, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F, USER9_F, USERA_F, VAR_TABLE_OFFSET, varTable, varTableStampFields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionRubyBigDecimal(Ruby runtime, BigDecimal value) RubyBigDecimal(Ruby runtime, BigDecimal value, boolean isNan) RubyBigDecimal(Ruby runtime, BigDecimal value, int infinitySign) RubyBigDecimal(Ruby runtime, BigDecimal value, int infinitySign, int zeroSign) RubyBigDecimal(Ruby runtime, RubyBigDecimal rbd) Deprecated.RubyBigDecimal(Ruby runtime, RubyClass klass) RubyBigDecimal(Ruby runtime, RubyClass klass, BigDecimal value) RubyBigDecimal(Ruby runtime, RubyClass klass, RubyBigDecimal rbd) Deprecated. -
Method Summary
Modifier and TypeMethodDescription_dump(ThreadContext context) _dump(ThreadContext context, IRubyObject unused) static RubyBigDecimal_load(ThreadContext context, IRubyObject recv, IRubyObject from) abs()Deprecated.abs(ThreadContext context) num_absadd2(ThreadContext context, IRubyObject b, IRubyObject digits) asBigInteger(ThreadContext context) Return a BigInteger representation of this numerical valuedoubleasDouble(ThreadContext context) Return a double representation of this numerical valueintasInt(ThreadContext context) Returns the value of this numeric and a java int.longasLong(ThreadContext context) Return the value of this numeric as a 64-bit long.static BigDecimalbigSqrt(BigDecimal squarD, MathContext rootMC) Returns the correctly rounded square root of a positive BigDecimal.ceil(ThreadContext context) MRI: num_ceilceil(ThreadContext context, IRubyObject arg) coerce(ThreadContext context, IRubyObject other) num_coerceTries to convert this object to a Ruby Float using the "to_f" method.Deprecated.static RubyClasscreateBigDecimal(ThreadContext context) divmod(ThreadContext context, IRubyObject other) num_divmodstatic IRubyObjectdouble_fig(ThreadContext context, IRubyObject recv) eql_p(ThreadContext context, IRubyObject arg) num_eqlexponent()Deprecated.exponent(ThreadContext context) finite_p()Deprecated.finite_p(ThreadContext context) fix()Deprecated.fix(ThreadContext context) floor(ThreadContext context) MRI: num_floorfloor(ThreadContext context, IRubyObject arg) static intformatFractionalDigitGroups(String format) static booleanformatHasFloatingPointNotation(String format) static booleanformatHasLeadingPlus(String format) static booleanformatHasLeadingSpace(String format) frac(ThreadContext context) This is overridden in the other concrete Java builtins to provide a fast way to determine what type they are.getValue()hash(ThreadContext context) Will return the hash code of this object.static IRubyObjectinduced_from(ThreadContext context, IRubyObject recv, IRubyObject arg) infinite_p(ThreadContext context) initialize_copy(ThreadContext context, IRubyObject original) num_init_copyinspect(ThreadContext context) Returns a string containing a human-readable representation of obj.static IRubyObjectinterpret_loosely(ThreadContext context, IRubyObject recv, IRubyObject str) final booleanisZero(ThreadContext context) static IRubyObjectlimit(ThreadContext context, IRubyObject recv) Retrieve vpPrecLimit.static IRubyObjectlimit(ThreadContext context, IRubyObject recv, IRubyObject arg) Set new vpPrecLimit if Fixnum and return the old value.static IRubyObjectmode(ThreadContext context, IRubyObject recv, IRubyObject[] args) mult2(ThreadContext context, IRubyObject b, IRubyObject n) multiplyWith(ThreadContext context, RubyBignum value) multiplyWith(ThreadContext context, RubyFloat value) multiplyWith(ThreadContext context, RubyInteger value) n_significant_digits(ThreadContext context) nan_p(ThreadContext context) static RubyBigDecimalnewInstance(ThreadContext context, IRubyObject recv, IRubyObject arg) Deprecated.static IRubyObjectnewInstance(ThreadContext context, IRubyObject recv, IRubyObject arg, boolean strict, boolean exception) Deprecated.static RubyBigDecimalnewInstance(ThreadContext context, IRubyObject recv, IRubyObject arg, IRubyObject mathArg) static IRubyObjectnewInstance(ThreadContext context, IRubyObject recv, IRubyObject arg, IRubyObject mathArg, boolean strict, boolean exception) Deprecated.nonzero_p(ThreadContext context) num_nonzero_pop_cmp(ThreadContext context, IRubyObject arg) num_cmpop_div(ThreadContext context, IRubyObject other) op_div(ThreadContext context, IRubyObject other, IRubyObject digits) op_divide(ThreadContext context, IRubyObject other) op_eqq(ThreadContext context, IRubyObject arg) rb_equal The Ruby "===" method is used by default in case/when statements.op_ge(ThreadContext context, IRubyObject arg) op_gt(ThreadContext context, IRubyObject arg) op_le(ThreadContext context, IRubyObject arg) op_lt(ThreadContext context, IRubyObject arg) op_minus(ThreadContext context, IRubyObject b) op_mod(ThreadContext context, IRubyObject other) op_mul(ThreadContext context, IRubyObject arg) op_plus(ThreadContext context, IRubyObject b) op_pow(ThreadContext context, IRubyObject exp) op_power(ThreadContext context, IRubyObject exp) op_power(ThreadContext context, IRubyObject exp, IRubyObject prec) op_quo(ThreadContext context, IRubyObject other) op_quo(ThreadContext context, IRubyObject object, IRubyObject digits) op_uminus(ThreadContext context) num_uminusop_uplus(ThreadContext context) num_uplusprecision(ThreadContext context) precision_scale(ThreadContext context) precs(ThreadContext context) Deprecated.remainder(ThreadContext context, IRubyObject arg) num_remainderround(ThreadContext context, IRubyObject[] args) round(ThreadContext context, IRubyObject scale, IRubyObject mode) static IRubyObjectsave_exception_mode(ThreadContext context, IRubyObject recv, Block block) static IRubyObjectsave_limit(ThreadContext context, IRubyObject recv, Block block) static IRubyObjectsave_rounding_mode(ThreadContext context, IRubyObject recv, Block block) scale(ThreadContext context) sign()Deprecated.sign(ThreadContext context) split(ThreadContext context) sqrt(IRubyObject arg) Deprecated.sqrt(ThreadContext context, IRubyObject arg) sub2(ThreadContext context, IRubyObject b, IRubyObject n) to_f()Deprecated.to_f(ThreadContext context) final IRubyObjectto_int()Deprecated.to_int(ThreadContext context) num_to_intto_r(ThreadContext context) to_s(IRubyObject[] args) Deprecated.to_s(ThreadContext context) to_s(ThreadContext context, IRubyObject arg) <T> TConvert the object to the specified Java class, if possible.toString()The default toString method is just a wrapper that calls the Ruby "to_s" method.truncate(ThreadContext context) MRI: num_truncatetruncate(ThreadContext context, IRubyObject arg) zero_p()Deprecated.zero_p(ThreadContext context) num_zero_pMethods inherited from class org.jruby.RubyNumeric
abs2, arg, asNumeric, callCoerced, callCoerced, callCoerced, callCoerced, ceil, checkInt, checkInt, coerce, coerceBin, coerceBin, coerceBit, coerceBit, coerceCmp, coerceCmp, coerceFailed, coerceRelOp, coerceRelOp, coerceRescue, compareWithZero, conjugate, convertToRational, convertToRational, createNumericClass, dbl_cmp, dbl2ival, dbl2num, denominator, div, doCoerce, dup, fdiv, fix2int, fix2int, fix2long, fixable, float2long, float2ulong, floatStep, floatStepSize, floor, getBigIntegerValue, getCoerced, getDoubleValue, getIntValue, getLongValue, getRoundingMode, idiv, idiv, image, int2fix, integer_p, integer_p, intervalStepSize, isNegative, isNegative, isNegativeNumber, isPositive, isPositive, isPositiveNumber, isReal, isZero, magnitude, modulo, negativeInt, negFixable, negFixable, newNumeric, num_imaginary, num2chr, num2dbl, num2dbl, num2fix, num2fix, num2int, num2long, num2ulong, numerator, numFuncall, numFuncall, numRemainder, op_not, op_num_equal, op_uplus, polar, posFixable, posFixable, positiveInt, quo, rbClone, rbClone, rbClone, rbClone, real, real_p, rect, round, round, scalar_p, singleton_method_added, step, str2fnum, str2fnum, str2fnum, str2inum, str2inum, str2inum, to_c, truncateMethods inherited from class org.jruby.RubyObject
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, dig, dig1, dig2, eqlInternal, equalInternal, equals, finishObjectClass, hashCode, inspect, puts, specificEval, toRubyStringMethods inherited from class org.jruby.RubyBasicObject
addFinalizer, addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkCallMethod, checkFrozen, checkStringType, cloneSetup, compareTo, convertToArray, convertToHash, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, dataGetStruct, dataGetStructChecked, dataWrapStruct, decode, display, dupFinalizer, dupSetup, ensureInstanceVariablesSettable, eql, eql_p, equal_p, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, finishBasicObjectClass, forEachInstanceVariable, forEachInstanceVariableName, freeze, frozen_p, getCurrentContext, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getJavaClass, getMarshalVariableList, getMetaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getSingletonClassCloneAndAttach, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hash, hashyInspect, hasInstanceVariable, hasInstanceVariables, hasInternalVariable, hasVariables, id, infectBy, initialize, initialize_copy, inspect, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval, instance_exec, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, isBuiltin, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isSpecialConst, isSpecialObject, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, makeMetaClass, makeMetaClassBootstrap, method, method, method, method_missing, methods, methods, nil_p, nonFixnumHashCode, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_equal, op_match, op_not_equal, op_not_match, private_methods, protected_methods, public_methods, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method, singleton_method, singleton_method_added, singleton_method_removed, singleton_method_undefined, singleton_methods, singletonClass, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_a, to_a, to_s, trust, type, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnderMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jruby.runtime.builtin.IRubyObject
checkStringType19, dup, marshalLiveVariables
-
Field Details
-
ROUND_DOWN
public static final int ROUND_DOWN- See Also:
-
ROUND_CEILING
public static final int ROUND_CEILING- See Also:
-
ROUND_UP
public static final int ROUND_UP- See Also:
-
ROUND_HALF_DOWN
public static final int ROUND_HALF_DOWN- See Also:
-
ROUND_HALF_EVEN
public static final int ROUND_HALF_EVEN- See Also:
-
ROUND_HALF_UP
public static final int ROUND_HALF_UP- See Also:
-
ROUND_FLOOR
public static final int ROUND_FLOOR- See Also:
-
SIGN_POSITIVE_INFINITE
public static final int SIGN_POSITIVE_INFINITE- See Also:
-
SIGN_POSITIVE_ZERO
public static final int SIGN_POSITIVE_ZERO- See Also:
-
SIGN_NEGATIVE_FINITE
public static final int SIGN_NEGATIVE_FINITE- See Also:
-
SIGN_NaN
public static final int SIGN_NaN- See Also:
-
BASE
public static final int BASE- See Also:
-
ROUND_MODE
public static final int ROUND_MODE- See Also:
-
SIGN_POSITIVE_FINITE
public static final int SIGN_POSITIVE_FINITE- See Also:
-
SIGN_NEGATIVE_INFINITE
public static final int SIGN_NEGATIVE_INFINITE- See Also:
-
SIGN_NEGATIVE_ZERO
public static final int SIGN_NEGATIVE_ZERO- See Also:
-
EXCEPTION_INFINITY
public static final int EXCEPTION_INFINITY- See Also:
-
EXCEPTION_OVERFLOW
public static final int EXCEPTION_OVERFLOW- See Also:
-
EXCEPTION_NaN
public static final int EXCEPTION_NaN- See Also:
-
EXCEPTION_UNDERFLOW
public static final int EXCEPTION_UNDERFLOW- See Also:
-
EXCEPTION_ZERODIVIDE
public static final int EXCEPTION_ZERODIVIDE- See Also:
-
EXCEPTION_ALL
public static final int EXCEPTION_ALL- See Also:
-
-
Constructor Details
-
RubyBigDecimal
-
RubyBigDecimal
-
RubyBigDecimal
-
RubyBigDecimal
-
RubyBigDecimal
-
RubyBigDecimal
-
RubyBigDecimal
Deprecated. -
RubyBigDecimal
Deprecated.
-
-
Method Details
-
createBigDecimal
-
getValue
-
getNativeClassIndex
Description copied from class:RubyObjectThis is overridden in the other concrete Java builtins to provide a fast way to determine what type they are. Will generally return a value from org.jruby.runtime.ClassIndex- Specified by:
getNativeClassIndexin interfaceCoreObjectType- Overrides:
getNativeClassIndexin classRubyObject- Returns:
- the ClassIndex of the native type this object was constructed from
- See Also:
-
_dump
-
_dump
-
_load
-
double_fig
-
limit
Retrieve vpPrecLimit. -
limit
Set new vpPrecLimit if Fixnum and return the old value. -
save_limit
-
save_exception_mode
-
save_rounding_mode
-
interpret_loosely
public static IRubyObject interpret_loosely(ThreadContext context, IRubyObject recv, IRubyObject str) -
mode
-
induced_from
-
newInstance
@Deprecated public static RubyBigDecimal newInstance(ThreadContext context, IRubyObject recv, IRubyObject arg) Deprecated. -
newInstance
@Deprecated public static IRubyObject newInstance(ThreadContext context, IRubyObject recv, IRubyObject arg, boolean strict, boolean exception) Deprecated. -
newInstance
public static RubyBigDecimal newInstance(ThreadContext context, IRubyObject recv, IRubyObject arg, IRubyObject mathArg) -
newInstance
public static IRubyObject newInstance(ThreadContext context, IRubyObject recv, IRubyObject arg, IRubyObject mathArg, boolean strict, boolean exception) -
hash
Description copied from class:RubyBasicObjectWill return the hash code of this object. In comparison to MRI, this method will use the Java identity hash code instead of using rb_obj_id, since the usage of id in JRuby will incur the cost of some. ObjectSpace maintenance.- Overrides:
hashin classRubyBasicObject- Parameters:
context- the current thread context- Returns:
- the hash value
-
initialize_copy
Description copied from class:RubyNumericnum_init_copy- Overrides:
initialize_copyin classRubyNumeric- Parameters:
context- the thread contextoriginal- the original- Returns:
- a copy unless the same thing
-
op_mod
-
remainder
Description copied from class:RubyNumericnum_remainder- Overrides:
remainderin classRubyNumeric
-
op_mul
-
mult2
-
op_pow
-
op_power
-
op_power
-
op_plus
- Overrides:
op_plusin classRubyNumeric
-
add2
-
op_uplus
Description copied from class:RubyNumericnum_uplus- Overrides:
op_uplusin classRubyNumeric
-
op_uminus
Description copied from class:RubyNumericnum_uminus- Overrides:
op_uminusin classRubyNumeric
-
op_minus
- Overrides:
op_minusin classRubyNumeric
-
sub2
-
op_divide
-
op_quo
-
op_quo
-
op_div
-
op_div
-
op_cmp
Description copied from class:RubyNumericnum_cmp- Overrides:
op_cmpin classRubyNumeric
-
eql_p
Description copied from class:RubyNumericnum_eql- Overrides:
eql_pin classRubyNumeric
-
op_eqq
Description copied from class:RubyObjectrb_equal The Ruby "===" method is used by default in case/when statements. The Object implementation first checks Java identity equality and then calls the "==" method too.- Specified by:
op_eqqin interfaceIRubyObject- Overrides:
op_eqqin classRubyObject
-
op_lt
-
op_le
-
op_gt
-
op_ge
-
abs
Deprecated. -
abs
Description copied from class:RubyNumericnum_abs- Overrides:
absin classRubyNumeric
-
ceil
-
ceil
Description copied from class:RubyNumericMRI: num_ceil- Overrides:
ceilin classRubyNumeric
-
coerce
Description copied from class:RubyNumericnum_coerce- Overrides:
coercein classRubyNumeric
-
asBigInteger
Description copied from class:RubyNumericReturn a BigInteger representation of this numerical value- Overrides:
asBigIntegerin classRubyNumeric- Parameters:
context- the current thread context- Returns:
- a BigInteger
-
asDouble
Description copied from class:RubyNumericReturn a double representation of this numerical value- Overrides:
asDoublein classRubyNumeric- Parameters:
context- the current thread context- Returns:
- a double
-
asInt
Description copied from class:RubyNumericReturns the value of this numeric and a java int.- Overrides:
asIntin classRubyNumeric
-
asLong
Description copied from class:RubyNumericReturn the value of this numeric as a 64-bit long.- Overrides:
asLongin classRubyNumeric
-
getBigDecimalValue
-
multiplyWith
-
multiplyWith
-
multiplyWith
-
divmod
Description copied from class:RubyNumericnum_divmod- Overrides:
divmodin classRubyNumeric
-
exponent
Deprecated. -
exponent
-
finite_p
- Overrides:
finite_pin classRubyNumeric
-
finite_p
Deprecated. -
floor
Description copied from class:RubyNumericMRI: num_floor- Overrides:
floorin classRubyNumeric
-
floor
-
frac
-
infinite_p
- Overrides:
infinite_pin classRubyNumeric
-
inspect
Description copied from class:RubyBasicObjectReturns a string containing a human-readable representation of obj. If not overridden, uses theto_smethod to generate the string. [ 1, 2, 3..4, 'five' ].inspect #=> "[1, 2, 3..4, \"five\"]" Time.new.inspect #=> "Wed Apr 09 08:54:39 CDT 2003"- Specified by:
inspectin interfaceIRubyObject- Overrides:
inspectin classRubyBasicObject
-
nan_p
-
nonzero_p
Description copied from class:RubyNumericnum_nonzero_p- Overrides:
nonzero_pin classRubyNumeric
-
nonzero_p
Deprecated. -
n_significant_digits
-
precision
-
scale
-
precision_scale
-
precs
Deprecated. -
round
-
round
-
sign
Deprecated.Usesign(ThreadContext)instead.- Returns:
-
sign
-
split
-
sqrt
Deprecated. -
sqrt
-
to_f
Deprecated. -
to_f
-
convertToFloat
Description copied from class:RubyBasicObjectTries to convert this object to a Ruby Float using the "to_f" method.- Specified by:
convertToFloatin interfaceIRubyObject- Overrides:
convertToFloatin classRubyBasicObject- Returns:
- float representation of this
-
to_int
Deprecated. -
to_int
Description copied from class:RubyNumericnum_to_int- Overrides:
to_intin classRubyNumeric
-
convertToInteger
Deprecated.Description copied from class:RubyBasicObjectTries to convert this object to a Ruby Integer using the "to_int" method.- Specified by:
convertToIntegerin interfaceIRubyObject- Overrides:
convertToIntegerin classRubyBasicObject- Returns:
- an integer representation of this
-
to_r
-
formatHasLeadingPlus
-
formatHasLeadingSpace
-
formatHasFloatingPointNotation
-
formatFractionalDigitGroups
-
isZero
- Overrides:
isZeroin classRubyNumeric
-
to_s
- Overrides:
to_sin classRubyBasicObject
-
to_s
-
toString
Description copied from class:RubyObjectThe default toString method is just a wrapper that calls the Ruby "to_s" method.- Overrides:
toStringin classRubyObject- Returns:
- string representation
-
to_s
Deprecated. -
fix
Deprecated. -
fix
-
truncate
Description copied from class:RubyNumericMRI: num_truncate- Overrides:
truncatein classRubyNumeric
-
truncate
-
zero_p
Description copied from class:RubyNumericnum_zero_p- Overrides:
zero_pin classRubyNumeric
-
zero_p
Deprecated. -
toJava
Description copied from interface:IRubyObjectConvert the object to the specified Java class, if possible.- Specified by:
toJavain interfaceIRubyObject- Overrides:
toJavain classRubyNumeric- Type Parameters:
T- type- Parameters:
target- The target type to which the object should be converted.- Returns:
- java type
- See Also:
-
bigSqrt
Returns the correctly rounded square root of a positive BigDecimal. This method performs the fast Square Root by Coupled Newton Iteration algorithm by Timm Ahrendt, from the book "Pi, unleashed" by Jörg Arndt in a neat loop.The code is based on Frans Lelieveld's code , used here with permission.
- Parameters:
squarD- The number to get the root from.rootMC- Precision and rounding mode.- Returns:
- the root of the argument number
- Throws:
ArithmeticException- if the argument number is negativeIllegalArgumentException- if rootMC has precision 0- See Also:
-
sign(ThreadContext)instead.