Class BCDFloat
- java.lang.Object
-
- net.sourceforge.uiq3.math.BCDFloat
-
- All Implemented Interfaces:
Cloneable,Comparable<Number>,Number
public final class BCDFloat extends Object implements Number
Arbitrary Precision Denormalized Floating Point Arithmetic.For the use in an FX-602P Simulator the precision is fixed at 14 decimal digits.
Note: Local variables are used in trace, and x and y variables are sometimes used inverted to the parameters declared.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBCDFloat.Float_TypeFloating Point Type Finite Normal Real Number NAN Not a Number Type_Positive_Infinity +∞i Type_Negative_Infinity -∞
-
Field Summary
Fields Modifier and Type Field Description private @NotNull BCDIntegerCoefficientcoefficient - 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.private intExponentcurrent exponent - note that the exponent is based on the internal representation where the radix point is right most.private static LoggerLoggerClass logger instance.private static intMax_ExponentMaximum supported Exponent + 1static @NotNull BCDFloatNaNNot a numberstatic @NotNull BCDFloatNum_00static @NotNull BCDFloatNum_0_50.5private static @NotNull BCDFloatNum_0_5_π0.5 π (18 digits)static @NotNull BCDFloatNum_11private static @NotNull BCDFloatNum_1_div_e1 divided by Euler's number (18 digits)static @NotNull BCDFloatNum_1010static @NotNull BCDFloatNum_100100, for example used for percentstatic @NotNull BCDFloatNum_1000100, for example used for percentstatic @NotNull BCDFloatNum_180180, for example used for half a circle in degreestatic @NotNull BCDFloatNum_22private static @NotNull BCDFloatNum_2_π2 π (18 digits)static @NotNull BCDFloatNum_200200, for example used for half a circle in radiant.static @NotNull BCDFloatNum_360060, For example used for seconds in an hour.static @NotNull BCDFloatNum_6060, For example used for minutes in an hour.static @NotNull BCDFloatNum_eEuler's number (18 digits)private static @NotNull BCDFloatNum_log_e_10Loge10 (18 digits)static @NotNull BCDFloatNum_Minus_1-1static @NotNull BCDFloatNum_ππ (18 digits)private static StringTAGClass logger tag.private @NotNull BCDFloat.Float_TypeTypeNumeric Type Finite Normal Real Number NaN Not a Number Type_Positive_Infinity +∞dd> Type_Negative_Infinity -∞-
Fields inherited from interface net.sourceforge.uiq3.math.Number
Compare_Equal, Compare_Greater, Compare_Less, Effective_Precision, Max_Precision
-
-
Constructor Summary
Constructors Constructor Description BCDFloat()Create empty valueBCDFloat(long Value)create from java longBCDFloat(long Coefficient, int Exponent)create from Coefficient and ExponentBCDFloat(@NotNull BCDFloat Value)create new value from existing one.BCDFloat(@NotNull BCDInteger Value)create new value from existing one.BCDFloat(String Value)create from string
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Number$div(@NotNull Number Y)x ÷ y@NotNull Number$minus(@NotNull Number Y)x - y@NotNull Number$plus(@NotNull Number Y)x + Y@NotNull Number$times(@NotNull Number Y)x × Y@NotNull Number$times$times(@NotNull Number Y)xY@NotNull Numberabs()|x|@NotNull Numberand(@NotNull Number y)Logical and@NotNull Numberarc_cos()arc cosine@NotNull Numberarc_cos(@NotNull Number Half_Circle)arc cosine@NotNull Numberarc_cos_hyp()area hyperbolic cosine: loge (x + √(x-1) × √(x+1))@NotNull Numberarc_sin()arc sine@NotNull Numberarc_sin(@NotNull Number Half_Circle)arc sine@NotNull Numberarc_sin_hyp()area hyperbolic sine: loge (x + √(x² + 1))@NotNull Numberarc_tan()arc tangent@NotNull Numberarc_tan(@NotNull Number Half_Circle)arc tangent@NotNull Numberarc_tan_hyp()area hyperbolic tangent: loge ((1 + x) ÷ (1 - x)) / 2@NotNull BCDFloatAs_BCDFloat()Either convert to a BCDFloat or return this.@NotNull BCDFractionAs_BCDFraction()Either convert to a or return this.@NotNull BCDIntegerAs_BCDInteger()Either convert to a BCDInteger or return this.@NotNull Objectclone()clone the float - but it might be easier to use the provided copy Constructor instead.@NotNull NumberClone()clone the float - but it might be easier to use the provided copy Constructor instead.@NotNull BCDIntegerCoefficient()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.longCoefficient_As_Long()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.intCompare(@NotNull Number Value)Compare valuesintcompareTo(@NotNull Number rightValue)@NotNull Numbercos()cos (x)@NotNull Numbercos(@NotNull Number Half_Circle)cosine@NotNull Numbercos_hyp()Hyperbolic cosine: (Exponent^x + Exponent^-x)/2byte[]Digits()number: sum(i = 0 ...booleanequals(@NotNull Object rightValue)@NotNull Numberexp_10()10x@NotNull Numberexp_e()exprivate @NotNull BCDFloatexpI()Exponent^x using series expansion, usable around 0intExponent()current exponent - note that the exponent is based on the internal representation where the radix point is right most.@NotNull BCDFloatFix(int Decimal, int Exponent)Round to a given Precision after the decimal point.@NotNull BCDFloatFrac()Recompose a frac double from the given data.intGet_1_Normalized_Exponent()current exponent so that the ratix point is 1 digit to right.inthashCode()intIndirect_Value(int Digit_Count)Get valuef or indirect addressing.@NotNull NumberInteger()integer part of the BCDFloatbooleanIs_Finite()current value is a normal numberbooleanIs_Infinite()current value is Infinity (but not N/A).booleanIs_Integer()Current value is integer value.booleanIs_NaN()current value is not a numberbooleanIs_Negative()Current value us negativebooleanIs_Zero()value is 0private @NotNull NumberlnI()loge x using series expansion, usable around 1@NotNull Numberlog_10()log10 (x)@NotNull Numberlog_e()loge (x)@NotNull Numberneg()voidNormalize()normalize the valueprivate voidNormalize(int maxE)@NotNull Numbernot()Logical notintNum_Digits()the current number of digits - not that when the number is not normalised there might be more 0's in the number then strictly needed.@NotNull Numberor(@NotNull Number y)Logical or@NotNull NumberP_To_X(@NotNull Number θ)Convert Polar to Rectangle Coordinates@NotNull NumberP_To_X(@NotNull Number θ, @NotNull Number Half_Circle)Convert Polar to Rectangle Coordinates@NotNull NumberP_To_Y(@NotNull Number θ)Convert Polar to Rectangle Coordinates@NotNull NumberP_To_Y(@NotNull Number θ, @NotNull Number Half_Circle)Convert Polar to Rectangle Coordinates@NotNull NumberR_To_R(@NotNull Number y)Convert Rectangle to Polar Coordinates@NotNull NumberR_To_θ(@NotNull Number y)Convert Rectangle to Polar Coordinates@NotNull NumberR_To_θ(@NotNull Number y, @NotNull Number Half_Circle)Convert Rectangle to Polar Coordinates@NotNull Numberroot(@NotNull Number r)r√x@NotNull NumberRound()Round to Effective and Max_Exponent.@NotNull NumberRound(int Precision, int Exponent)Round to a given Precision and Exponent.private voidRound_Effective()Round to Effective and Max_Exponent.private voidRound_Max()Round to Max_Precision and Max_Exponent.private voidRound_To(int Precision, int Exponent)Round to a given Precision and Exponent.@NotNull Numbersin()sine@NotNull Numbersin(@NotNull Number Half_Circle)sine@NotNull Numbersin_hyp()hyperbolic sine: (ex - e-x) ÷ 2private @NotNull NumbersinI()sin using series expansion, usable around 0 (-π .. π)@NotNull Numbersquare()x2@NotNull Numbersquare_root()2√x@NotNull Numbertan()tan x@NotNull Numbertan(@NotNull Number Half_Circle)tangent@NotNull Numbertan_hyp()Hyperbolic tangent: (e2x - 1) ÷ (e2x + 1)@NotNull StringTo_Debug_String()convert to native/debug string representationintTo_Integer()Convert to integerlongTo_Long()Convert to long integer@NotNull StringtoString()convert to scientific string representation@NotNull Numberxor(@NotNull Number y)Logical xor
-
-
-
Field Detail
-
Logger
private static final Logger Logger
Class logger instance.
-
Max_Exponent
private static final int Max_Exponent
Maximum supported Exponent + 1- See Also:
- Constant Field Values
-
Num_0_5_π
@NotNull private static final @NotNull BCDFloat Num_0_5_π
0.5 π (18 digits)Unlike the original BCDFloat from Kai G. Schwebke I use a fixed maximum precision defined at compile time - so there is no need for truly arbitrary irrational constants.
-
Num_10
@NotNull public static final @NotNull BCDFloat Num_10
10
-
Num_1_div_e
@NotNull private static final @NotNull BCDFloat Num_1_div_e
1 divided by Euler's number (18 digits)Unlike the original BCDFloat from Kai G. Schwebke I use a fixed maximum precision defined at compile time - so there is no need for truly arbitrary irrational constants.
-
Num_2_π
@NotNull private static final @NotNull BCDFloat Num_2_π
2 π (18 digits)Unlike the original BCDFloat from Kai G. Schwebke I use a fixed maximum precision defined at compile time - so there is no need for truly arbitrary irrational constants.
-
Num_log_e_10
@NotNull private static final @NotNull BCDFloat Num_log_e_10
Loge10 (18 digits)Unlike the original BCDFloat from Kai G. Schwebke I use a fixed maximum precision defined at compile time - so there is no need for truly arbitrary irrational constants.
-
TAG
private static final String TAG
Class logger tag.
-
NaN
@NotNull public static final @NotNull BCDFloat NaN
Not a number
-
Num_0
@NotNull public static final @NotNull BCDFloat Num_0
0
-
Num_0_5
@NotNull public static final @NotNull BCDFloat Num_0_5
0.5
-
Num_1
@NotNull public static final @NotNull BCDFloat Num_1
1
-
Num_100
@NotNull public static final @NotNull BCDFloat Num_100
100, for example used for percent
-
Num_1000
@NotNull public static final @NotNull BCDFloat Num_1000
100, for example used for percent
-
Num_180
@NotNull public static final @NotNull BCDFloat Num_180
180, for example used for half a circle in degree
-
Num_2
@NotNull public static final @NotNull BCDFloat Num_2
2
-
Num_200
@NotNull public static final @NotNull BCDFloat Num_200
200, for example used for half a circle in radiant.
-
Num_3600
@NotNull public static final @NotNull BCDFloat Num_3600
60, For example used for seconds in an hour.
-
Num_60
@NotNull public static final @NotNull BCDFloat Num_60
60, For example used for minutes in an hour.
-
Num_Minus_1
@NotNull public static final @NotNull BCDFloat Num_Minus_1
-1
-
Num_e
@NotNull public static final @NotNull BCDFloat Num_e
Euler's number (18 digits)Unlike the original BCDFloat from Kai G. Schwebke I use a fixed maximum precision defined at compile time - so there is no need for truly arbitrary irrational constants.
-
Num_π
@NotNull public static final @NotNull BCDFloat Num_π
π (18 digits)Unlike the original BCDFloat from Kai G. Schwebke I use a fixed maximum precision defined at compile time - so there is no need for truly arbitrary irrational constants.
-
Coefficient
@NotNull private @NotNull BCDInteger Coefficient
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.
null for NaN and infinities
-
Exponent
private int Exponent
current exponent - note that the exponent is based on the internal representation where the radix point is right most. For example π is 314159265358979324×10-17.
-
Type
@NotNull private @NotNull BCDFloat.Float_Type Type
Numeric Type- Finite
- Normal Real Number
- NaN
- Not a Number
- Type_Positive_Infinity
- +∞dd>
- Type_Negative_Infinity
- -∞
-
-
Constructor Detail
-
BCDFloat
public BCDFloat()
Create empty value
-
BCDFloat
public BCDFloat(@NotNull @NotNull BCDFloat Value)create new value from existing one.- Parameters:
Value- value to init the instance from
-
BCDFloat
public BCDFloat(@NotNull @NotNull BCDInteger Value)create new value from existing one.- Parameters:
Value- value to init the instance from
-
BCDFloat
public BCDFloat(long Value)
create from java long- Parameters:
Value- value to init the instance from
-
BCDFloat
public BCDFloat(long Coefficient, int Exponent)create from Coefficient and Exponent- Parameters:
Coefficient- CoefficientExponent- Exponent
-
BCDFloat
public BCDFloat(String Value)
create from string- Parameters:
Value- string to create float form
-
-
Method Detail
-
$div
@Contract(pure=true) @NotNull public final @NotNull Number $div(@NotNull @NotNull Number Y)
x ÷ y
-
$minus
@Contract(pure=true) @NotNull public @NotNull Number $minus(@NotNull @NotNull Number Y)
x - y
-
$plus
@Contract(pure=true) @NotNull public final @NotNull Number $plus(@NotNull @NotNull Number Y)
x + Y
-
$times
@Contract(pure=true) @NotNull public final @NotNull Number $times(@NotNull @NotNull Number Y)
x × Y
-
$times$times
@Contract(pure=true) @NotNull public final @NotNull Number $times$times(@NotNull @NotNull Number Y) throws BCDError
xY- Specified by:
$times$timesin interfaceNumber- Parameters:
Y- power- Returns:
- xy
- Throws:
BCDError- calculation error
-
As_BCDFloat
@NotNull public @NotNull BCDFloat As_BCDFloat()
Either convert to a BCDFloat or return this.
- Specified by:
As_BCDFloatin interfaceNumber- Returns:
- value as java int
-
As_BCDFraction
@NotNull public @NotNull BCDFraction As_BCDFraction()
Either convert to a or return this.
- Specified by:
As_BCDFractionin interfaceNumber- Returns:
- value as java int
-
As_BCDInteger
@NotNull public @NotNull BCDInteger As_BCDInteger()
Either convert to a BCDInteger or return this.
- Specified by:
As_BCDIntegerin interfaceNumber- Returns:
- value as java int
-
Clone
@NotNull public @NotNull Number Clone()
clone the float - but it might be easier to use the provided copy Constructor instead.- Specified by:
Clonein interfaceNumber- Returns:
- a new BCDFloat from an existing one.
- See Also:
Object.clone()
-
Coefficient
@NotNull public @NotNull BCDInteger Coefficient()
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.
- Returns:
- Coefficient
-
Coefficient_As_Long
public long Coefficient_As_Long() throws BCDErrorcoefficient - 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.
- Specified by:
Coefficient_As_Longin interfaceNumber- Returns:
- Coefficient
- Throws:
BCDError- when it's not a normal number
-
Digits
public byte[] Digits()
number: sum(i = 0 ... Num_Digits-1; Digits[i]*10^i)
-
Exponent
public final int Exponent() throws BCDErrorcurrent exponent - note that the exponent is based on the internal representation where the radix point is right most. For example π is 314159265358979324×10-17.
-
Fix
@NotNull public final @NotNull BCDFloat Fix(int Decimal, int Exponent)
Round to a given Precision after the decimal point.
-
Frac
@NotNull public final @NotNull BCDFloat Frac()
Recompose a frac double from the given data.
-
Get_1_Normalized_Exponent
public final int Get_1_Normalized_Exponent()
current exponent so that the ratix point is 1 digit to right. For example π would be 3.14159265358979324×100.- Returns:
- Current exponent.
-
Indirect_Value
public int Indirect_Value(int Digit_Count)
Get valuef or indirect addressing.
- Specified by:
Indirect_Valuein interfaceNumber- Parameters:
Digit_Count- Should be 1 … 2 depending if value is used to access memory or perform a goto.- Returns:
- int value for indirect addressing.
-
Integer
@NotNull public @NotNull Number Integer()
integer part of the BCDFloatDo not mix up with To_Integer - This version returns another BCDFloat!
-
Is_Finite
public final boolean Is_Finite()
current value is a normal number
-
Is_Infinite
public final boolean Is_Infinite()
current value is Infinity (but not N/A).- Specified by:
Is_Infinitein interfaceNumber- Returns:
- true when x is infinite
-
Is_Integer
public boolean Is_Integer()
Current value is integer value.- Specified by:
Is_Integerin interfaceNumber- Returns:
- true when x is an integer number
-
Is_NaN
public final boolean Is_NaN()
current value is not a number
-
Is_Negative
public final boolean Is_Negative()
Current value us negative- Specified by:
Is_Negativein interfaceNumber- Returns:
- true when x <= -0
-
Is_Zero
public final boolean Is_Zero()
value is 0
-
Normalize
public final void Normalize()
normalize the value
-
Normalize
private void Normalize(int maxE)
- Parameters:
maxE- maximum exponent
-
Num_Digits
public int Num_Digits() throws BCDErrorthe current number of digits - not that when the number is not normalised there might be more 0's in the number then strictly needed.- Specified by:
Num_Digitsin interfaceNumber- Returns:
- number of digits
- Throws:
BCDError- Not a finite number.
-
P_To_X
@Contract(pure=true) @NotNull public final @NotNull Number P_To_X(@NotNull @NotNull Number θ)
Convert Polar to Rectangle Coordinates
-
P_To_X
@Contract(pure=true) @NotNull public final @NotNull Number P_To_X(@NotNull @NotNull Number θ, @NotNull @NotNull Number Half_Circle)
Convert Polar to Rectangle Coordinates
-
P_To_Y
@Contract(pure=true) @NotNull public final @NotNull Number P_To_Y(@NotNull @NotNull Number θ)
Convert Polar to Rectangle Coordinates
-
P_To_Y
@Contract(pure=true) @NotNull public final @NotNull Number P_To_Y(@NotNull @NotNull Number θ, @NotNull @NotNull Number Half_Circle)
Convert Polar to Rectangle Coordinates
-
R_To_R
@Contract(pure=true) @NotNull public final @NotNull Number R_To_R(@NotNull @NotNull Number y)
Convert Rectangle to Polar Coordinates
-
R_To_θ
@Contract(pure=true) @NotNull public final @NotNull Number R_To_θ(@NotNull @NotNull Number y)
Convert Rectangle to Polar Coordinates
-
R_To_θ
@Contract(pure=true) @NotNull public final @NotNull Number R_To_θ(@NotNull @NotNull Number y, @NotNull @NotNull Number Half_Circle)
Convert Rectangle to Polar Coordinates
-
Round
@NotNull public @NotNull Number Round()
Round to Effective and Max_Exponent.
-
Round
@NotNull public final @NotNull Number Round(int Precision, int Exponent)
Round to a given Precision and Exponent.
-
Round_Effective
private void Round_Effective()
Round to Effective and Max_Exponent.
-
Round_Max
private void Round_Max()
Round to Max_Precision and Max_Exponent.
-
Round_To
private void Round_To(int Precision, int Exponent)Round to a given Precision and Exponent.- Parameters:
Precision- Total precisionExponent- max exponent
-
To_Debug_String
@NotNull public @NotNull String To_Debug_String()
convert to native/debug string representation- Specified by:
To_Debug_Stringin interfaceNumber- Returns:
- (Coefficient, Exponent)
-
To_Integer
public int To_Integer()
Convert to integerDo not mix up with Integer - This version returns a Java int!
- Specified by:
To_Integerin interfaceNumber- Returns:
- value as java int
-
To_Long
public long To_Long()
Convert to long integer
Do not mix up with Integer - This version returns a Java int!
-
abs
@Contract(pure=true) @NotNull public final @NotNull Number abs()
|x|
-
and
@Contract(pure=true) @NotNull public @NotNull Number and(@NotNull @NotNull Number y)
Logical and
-
arc_cos
@Contract(pure=true) @NotNull public final @NotNull Number arc_cos()
arc cosine
-
arc_cos
@Contract(pure=true) @NotNull public final @NotNull Number arc_cos(@NotNull @NotNull Number Half_Circle)
arc cosine
-
arc_cos_hyp
@Contract(pure=true) @NotNull public final @NotNull Number arc_cos_hyp()
area hyperbolic cosine: loge (x + √(x-1) × √(x+1))- Specified by:
arc_cos_hypin interfaceNumber- Returns:
- Hyperbolic sine.
-
arc_sin
@Contract(pure=true) @NotNull public final @NotNull Number arc_sin()
arc sine
-
arc_sin
@Contract(pure=true) @NotNull public final @NotNull Number arc_sin(@NotNull @NotNull Number Half_Circle)
arc sine
-
arc_sin_hyp
@Contract(pure=true) @NotNull public final @NotNull Number arc_sin_hyp()
area hyperbolic sine: loge (x + √(x² + 1))- Specified by:
arc_sin_hypin interfaceNumber- Returns:
- Hyperbolic sine.
-
arc_tan
@Contract(pure=true) @NotNull public final @NotNull Number arc_tan()
arc tangent
-
arc_tan
@Contract(pure=true) @NotNull public final @NotNull Number arc_tan(@NotNull @NotNull Number Half_Circle)
arc tangent
-
arc_tan_hyp
@Contract(pure=true) @NotNull public final @NotNull Number arc_tan_hyp()
area hyperbolic tangent: loge ((1 + x) ÷ (1 - x)) / 2- Specified by:
arc_tan_hypin interfaceNumber- Returns:
- Hyperbolic sine.
-
clone
@NotNull public @NotNull Object clone() throws CloneNotSupportedException
clone the float - but it might be easier to use the provided copy Constructor instead.- Overrides:
clonein classObject- Returns:
- a new BCDFloat from an existing one.
- Throws:
CloneNotSupportedException- See Also:
Object.clone()
-
compareTo
public int compareTo(@NotNull @NotNull Number rightValue)- Specified by:
compareToin interfaceComparable<Number>- Specified by:
compareToin interfaceNumber- Parameters:
rightValue- value to compare with. (no BCDFloat exception thrown)- Returns:
- Compare_Equal
- Values are the same
- Compare_Less
- Left value less the right value
- Compare_Greater
- Left value greater the right value
- See Also:
Comparable.compareTo(java.lang.Object)
-
cos
@Contract(pure=true) @NotNull public final @NotNull Number cos()
cos (x)
-
cos
@Contract(pure=true) @NotNull public final @NotNull Number cos(@NotNull @NotNull Number Half_Circle)
cosine
-
cos_hyp
@Contract(pure=true) @NotNull public final @NotNull Number cos_hyp()
Hyperbolic cosine: (Exponent^x + Exponent^-x)/2
-
equals
public boolean equals(@NotNull @NotNull Object rightValue)
-
expI
@NotNull private @NotNull BCDFloat expI()
Exponent^x using series expansion, usable around 0- Returns:
- ex
-
exp_e
@Contract(pure=true) @NotNull public final @NotNull Number exp_e()
ex
-
lnI
@NotNull private @NotNull Number lnI()
loge x using series expansion, usable around 1- Returns:
- loge
-
log_10
@Contract(pure=true) @NotNull public final @NotNull Number log_10()
log10 (x)
-
log_e
@Contract(pure=true) @NotNull public final @NotNull Number log_e()
loge (x)
-
neg
@Contract(pure=true) @NotNull public final @NotNull Number neg()
-
not
@Contract(pure=true) @NotNull public @NotNull Number not()
Logical not
-
root
@Contract(pure=true) @NotNull public final @NotNull Number root(@NotNull @NotNull Number r)
r√x
-
sin
@Contract(pure=true) @NotNull public final @NotNull Number sin()
sine
-
sin
@Contract(pure=true) @NotNull public final @NotNull Number sin(@NotNull @NotNull Number Half_Circle)
sine
-
sinI
@NotNull private @NotNull Number sinI()
sin using series expansion, usable around 0 (-π .. π)- Returns:
- sin (x)
-
sin_hyp
@Contract(pure=true) @NotNull public final @NotNull Number sin_hyp()
hyperbolic sine: (ex - e-x) ÷ 2
-
square
@Contract(pure=true) @NotNull public final @NotNull Number square()
x2
-
square_root
@Contract(pure=true) @NotNull public final @NotNull Number square_root()
2√x- Specified by:
square_rootin interfaceNumber- Returns:
- 2√x
-
tan
@Contract(pure=true) @NotNull public final @NotNull Number tan()
tan x
-
tan
@Contract(pure=true) @NotNull public final @NotNull Number tan(@NotNull @NotNull Number Half_Circle)
tangent
-
tan_hyp
@NotNull public final @NotNull Number tan_hyp()
Hyperbolic tangent: (e2x - 1) ÷ (e2x + 1)
-
toString
@NotNull public @NotNull String toString()
convert to scientific string representation- Specified by:
toStringin interfaceNumber- Overrides:
toStringin classObject- Returns:
- string representation
- See Also:
Object.toString()
-
-