A lexical real constant evaluates to a value of type real. The internal
representation of reals is 64-bit IEEE 754 floating-point. No exceptions
are thrown in real math.
Real Expressions
Expression Value Value Type
---------- ----- ----------
1.2 1.2 Real
2/2 1.0 Real
Parameters: |
$value : | A string concept. |
|
Constructs an integer concept inicialized with the value represented by
the string given as parameter.
Parameters: |
$value : | Concept that will be added to this concept. |
|
Adds the concept value given as parameter to this concept value and
returns the result.
Parameters: |
$value : | To this will be compared this concept. |
|
Returns true if this concept value is smaller or equals with the
parameters value, false otherwise.
Parameters: |
$value : | To this will be compared this concept. |
|
Returns true if this concept value is smaller then the parameters value,
false otherwise.
Parameters: |
$value : | To this will be compared this concept. |
|
Returns true if this concept value is greater or equals with the
parameters value, false otherwise.
Parameters: |
$value : | Concept with which value will be divided this concept. |
|
Divide this concept value with the concept value given as parameter and
returns the result.
Decrease this concept value with 1.
Parameters: |
$value : |
Concept which value will be substracted from this concept. |
|
Substracts the concept value given as parameter from this concept value
and returns the result.
Increase this concept value with 1.
Parameters: |
$value : | Concept with which value will be multiplied this concept. |
|
Multipy with the parameter value this concept value and returns the
result.
Parameters: |
$value : | To this will be compared this concept. |
|
Returns true if this concept value is greater then the parameters value,
false otherwise.
Parameters: |
$value : | To this will be compared this concept. |
|
Returns true if this concept value equals with the parameters value,
false otherwise.
Extracts the root of this concept value and returns the result.
$r = 2
print $r.sqrt
-- the result is --
1.4142135
Returns a logical concept representing this concept's value.
(ex. 1 = true)
$r = 0
print $r.toLogicalConcept
$r = 1
print $r.toLogicalConcept
-- the result is --
false
true
Returns a string concept representing this concept's value.
$r = 2.23523
print $r.toStringConcept
-- the result is --
2.23523
Returns the absolute value of an real concept.
If the argument is not negative, the argument is returned.
If the argument is negative, the negation of the argument
is returned.
$r = -15.837
print $r.abs
-- the result is --
15.837
Parameters: |
$value : | The real concept to be compared to the current value |
|
Returns the greater of two real concepts.
If the arguments have the same value,
the result is that same value.
$r = 12.576
$s = 12.578
print $r.max($s)
-- the result is --
12.578
Parameters: |
$value : | The real concept to be compared to the current value |
|
Returns the smaller of two real concepts.
If the arguments have the same value,
the result is that same value.
$r = 12.576
$s = 12.578
print $r.min($s)
-- the result is --
12.576
Returns the arc cosine of an angle, in the range of 0.0 through pi.
Special case :
-
If the current value is NaN or its absolute value is greater than 1, then the result is NaN.
A result must be within 1 ulp of the correctly rounded result.
Results must be semi-monotonic.
$r = 0.274
print $r.acos
-- the result is --
1.2932466
Returns the arc sine of an angle, in the range of -pi/2 through pi/2.
Special cases :
-
If the current value is NaN or its absolute value
is greater than 1, then the result is NaN.
-
If the current value is positive zero, then the result
is positive zero;
-
if the current value is negative zero, then the result
is negative zero.
A result must be within 1 ulp of the correctly rounded result.
Results must be semi-monotonic.
$r = 0.274
print $r.asin
-- the result is --
0.27754974
Returns the arc tangent of an angle, in the range of -pi/2 through pi/2.
Special cases :
-
If the current value is NaN, then the result is NaN.
-
If the current value is positive zero, then the result
is positive zero;
-
if the current value is negative zero, then the result
is negative zero.
A result must be within 1 ulp of the correctly rounded result.
Results must be semi-monotonic.
$r = 0.274
print $r.atan
-- the result is --
0.26743627
Returns the smallest (closest to negative infinity) real concept
that is not less than the argument and is equal to a mathematical integer.
Special cases :
-
If the current value is already equal to a mathematical integer,
then the result is the same as the argument.
-
If the curent value is NaN or an infinity or positive zero or negative zero,
then the result is the same as the argument.
-
If the current value is less than zero but greater than -1.0,
then the result is negative zero.
Note that the value of ceil(x) is exactly the value of -floor(-x).
$r = 34.1568
print $r.ceil
-- the result is --
35.0
Returns the trigonometric cosine of an angle.
Special case:
-
If the current value is NaN or an infinity, then the result is NaN.
A result must be within 1 ulp of the correctly rounded result.
Results must be semi-monotonic.
$r = 0.274
print $r.cos
-- the result is --
0.96269625
Returns the exponential number e (i.e., 2.718...) raised to the power of a real concept.
Special cases:
-
If the current value is NaN, the result is NaN.
-
If the current value is positive infinity, then the result is positive infinity.
-
If the current value is negative infinity, then the result is positive zero.
A result must be within 1 ulp of the correctly rounded result.
Results must be semi-monotonic.
$r = 4.183
print $r.exp
-- the result is --
65.56225
Returns the largest (closest to positive infinity) real concept that is
not greater than the argument and is equal to a mathematical integer.
Special cases:
-
If the current value value is already equal to a mathematical integer,
then the result is the same as the argument.
-
If the current value is NaN or an infinity or positive zero or negative zero,
then the result is the same as the argument.
$r = 34.6458
print $r.floor
-- the result is --
34.0
Returns the natural logarithm (base e) of a double value.
Special cases:
-
If the current value is NaN or less than zero, then the result is NaN.
-
If the current value is positive infinity, then the result is positive infinity.
-
If the current value is positive zero or negative zero, then the result
is negative infinity.
A result must be within 1 ulp of the correctly rounded result.
Results must be semi-monotonic.
$r = 4.183
print $r.log
-- the result is --
1.4310287
Parameters: |
$value : |
This argument will be the value to which the current value will be raised. |
|
Returns of value of the current valur raised to the power of the argument.
Special cases:
-
If the argument is positive or negative zero, then the result is 1.0.
-
If the argument is 1.0, then the result is the same as the current value.
-
If the argument is NaN, then the result is NaN.
-
If the current value is NaN and the argument is nonzero, then the result is NaN.
-
If the absolute value of the current value is greater than 1
and the argument is positive infinity,
or the absolute value of the current value is less than 1
and the argument is negative infinity, then the result is positive infinity.
-
If the absolute value of the current value is greater than 1
and the argument is negative infinity,
or the absolute value of the current value is less than 1
and the argument is positive infinity, then the result is positive zero.
-
If the absolute value of the current value equals 1
and the argument is infinite, then the result is NaN.
-
If the current value is positive zero and the argument is greater than zero,
or the current value is positive infinity and the argument is less than zero,
then the result is positive zero.
-
If the current value is positive zero and the argument is less than zero,
or the current value is positive infinity and the argument is greater than zero,
then the result is positive infinity.
-
If the current value is negative zero and the argument is greater than zero
but not a finite odd integer,
or the current value is negative infinity and the argument is less than zero
but not a finite odd integer, then the result is positive zero.
-
If the current value is negative zero and the argument is a positive finite odd integer,
or the current value is negative infinity and the argument is a negative finite odd integer,
then the result is negative zero.
-
If the current value is negative zero and the argument is less than zero
but not a finite odd integer,
or the current value is negative infinity and the argument is greater than zero
but not a finite odd integer, then the result is positive infinity.
-
If the current value is negative zero and the argument is a negative finite odd integer,
or the current value is negative infinity and the argument is a positive finite odd integer,
then the result is negative infinity.
-
If the current value is less than zero and the argument is a finite even integer,
then the result is equal to the result of raising the absolute value of the
current value to the power of the argument.
-
If the current value is less than zero and the argument is a finite odd integer,
then the result is equal to the negative of the result of raising the absolute value
of the current value to the power of the argument.
-
If the current value is finite and less than zero and the argument is finite and not an integer,
then the result is NaN.
-
If current value and argument are integers, then the result is exactly equal to the
mathematical result of raising the current value to the power of the argument
if that result can in fact be represented exactly as a double value.
A result must be within 1 ulp of the correctly rounded result. Results must be semi-monotonic.
$r = 2
print $r.pow(3)
-- the result is --
8.0
Returns the trigonometric sine of an angle.
Special cases:
-
If the current value is NaN or an infinity, then the result is NaN.
-
If the current value is positive zero, then the result is positive zero;
if the current value is negative zero, then the result is negative zero.
A result must be within 1 ulp of the correctly rounded result.
Results must be semi-monotonic.
$r = 0.274
print $r.sin
-- the result is --
0.27058437
Returns the trigonometric tangent of an angle.
Special cases:
-
If the current value is NaN or an infinity, then the result is NaN.
-
If the current value is positive zero, then the result is positive zero;
if the current value is negative zero, then the result is negative zero
A result must be within 1 ulp of the correctly rounded result.
Results must be semi-monotonic.
$r = 0.274
print $r.tan
-- the result is --
0.2810693
Converts an angle measured in radians to the equivalent angle measured in degrees.
$r = 0.274
print $r.toDegrees
-- the result is --
15.699043
Converts an angle measured in degrees to the equivalent angle measured in radians.
$r = 0.274
print $r.toRadians
-- the result is --
0.004782202