object Real extends Serializable
The Real
companion object defines the origin (zero), one half and one
as well as some utility functions.
- Alphabetic
- By Inheritance
- Real
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
E: Real
Euler's number 'e' with 106 bits of precision
-
val
EPSILON: Double
Approximate machine epsilon for Double-Double
-
val
NaN: Real
Represents Not a Number
-
val
Pi: Real
'pi' with 106 bits of precision
-
val
_0: Real
Zero (0) as a Real number
-
val
_1: Real
One (1) as a Real number
-
val
_10: Real
Ten (10) as a Real number
-
val
_1by2: Real
One Half (0.5) as a Real number
-
val
_1n: Real
Negative One (-1) as a Real number
-
val
_2: Real
Two (2) as a Real number
-
val
_2Pi: Real
'2 pi' with 106 bits of precision
-
val
_512: Real
2^9 as a real number
-
val
_700: Real
700 as a real number
-
def
abs(x: Real): Real
Return the absolute value of real number 'x'.
Return the absolute value of real number 'x'.
- x
the real number whose absolute value is sought
-
def
apply(xs: String): Real
Create a real number from its primary string representation "dd.ddd".
Create a real number from its primary string representation "dd.ddd". Example: "0.693147180559945309417232121458"
- xs
the string form of a real number
-
def
apply(xt: (Double, Double)): Real
Create a real number from a pair (Tuple2) of Doubles.
Create a real number from a pair (Tuple2) of Doubles.
- xt
the tuple form of a real number
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
implicit
def
double2Real(d: Double): Real
Implicit conversion from 'Double' to 'Real'.
Implicit conversion from 'Double' to 'Real'.
- d
the Double parameter to convert
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exp(x: Real = _1): Real
Return 'e' raised to the 'x'-th power 'e^x'. 'x' is rescaled to improve convergence. Rescaling causes slight reduction in precision. e = 2.718281828459045235360287471345 from scalation.math.Real.exp E = 2.718281828459045235360287471352 given constant
Return 'e' raised to the 'x'-th power 'e^x'. 'x' is rescaled to improve convergence. Rescaling causes slight reduction in precision. e = 2.718281828459045235360287471345 from scalation.math.Real.exp E = 2.718281828459045235360287471352 given constant
- x
the real number exponent
- See also
bt.pa.msu.edu/pub/papers/HICOSYMSU08/HICOSYMSU08.pdf FIX: use a faster and more precise algorithm
http://mathworld.wolfram.com/e.html
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
log(x: Real): Real
Return the natural log (log base 'e') of real number 'x'.
Return the natural log (log base 'e') of real number 'x'.
- x
the real number whose log is sought
- See also
bt.pa.msu.edu/pub/papers/HICOSYMSU08/HICOSYMSU08.pdf
-
val
log_2: Real
Natural log of 2 as a real number
-
def
magnitude(x: Double): Int
Determine the decimal magnitude of 'x', i.e., the largest integer 'k' such that '10^k <= x'.
Determine the decimal magnitude of 'x', i.e., the largest integer 'k' such that '10^k <= x'.
- x
the number to find the magnitude of
-
def
max(x: Real, y: Real): Real
Return the maximum of two real numbers 'x' and 'y'.
Return the maximum of two real numbers 'x' and 'y'.
- x
the first real number to compare
- y
the second real number to compare
-
def
min(x: Real, y: Real): Real
Return the minimum of two real numbers 'x' and 'y'.
Return the minimum of two real numbers 'x' and 'y'.
- x
the first real number to compare
- y
the second real number to compare
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
implicit
val
num: Real
Implicit numeric value for establishing type
-
implicit
val
ord: Ordering[Real]
Ordering for real numbers
-
def
signum(r: Real): Real
Return the signum (sgn) of a real number.
Return the signum (sgn) of a real number. The values may be -1, 0, or 1.
- r
the real number to obtain the sigum of
-
def
sin(x: Real): Real
Return the sin of real number 'x'.
Return the sin of real number 'x'.
- x
the real number whose sin is sought
-
def
sqrt(x: Real): Real
Return the square root of real number 'x'.
Return the square root of real number 'x'.
- x
the real number whose square root is sought
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )