|
Jatha Software | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jatha.dynatype.StandardLispValue
org.jatha.dynatype.StandardLispAtom
org.jatha.dynatype.StandardLispNumber
public abstract class StandardLispNumber
LispNumber is an abstract class that implements the Common LISP NUMBER type. It contains the definitions of add, subtract, multiply and divide.
LispValue,
LispAtom,
LispInteger,
LispReal| Field Summary |
|---|
| Fields inherited from class org.jatha.dynatype.StandardLispValue |
|---|
f_lisp |
| Constructor Summary | |
|---|---|
StandardLispNumber()
|
|
StandardLispNumber(Jatha lisp)
|
|
| Method Summary | |
|---|---|
LispValue |
abs()
Default implementation of abs. |
LispValue |
acos()
Arccos function with result in radians. |
LispValue |
add(LispValue args)
ADD adds any combination of real or integer numbers. |
LispValue |
asin()
Arcsin function with result in radians. |
LispValue |
atan()
Arctan function with result in radians. |
LispValue |
atan2(LispValue x)
Two-argument Arctan function with result in radians Also called Inverse Tangent, this is the angle whose tangent is y/x, where y is the first argument and x is the second argument. |
boolean |
basic_constantp()
Returns Java true if the object is a constant. |
boolean |
basic_numberp()
Returns Java true if the object is a number. |
LispValue |
ceiling()
Returns the smallest integer greater than or equal to the input value. |
LispValue |
constantp()
Returns T if the object is a constant. |
LispValue |
cos()
Cosine function, argument in radians. |
LispValue |
cot()
Cotangent function, 1/tan(x), argument in radians. |
LispValue |
csc()
Cosecant function, 1/sin(x), argument in radians. |
LispValue |
degreesToRadians()
Converts a numeric value from degrees to radians. |
LispValue |
divide(LispValue args)
DIVIDE adds any combination of real or integer numbers. |
LispValue |
eql(LispValue arg)
Returns T if the argument is EQ to the object or if the arguments and object are numbers with equal values. |
LispValue |
equalNumeric(LispValue arg)
Returns T if the object is EQUAL to its argument. |
LispValue |
factorial()
Compute the factorial of a non-negative integer. |
LispValue |
floor()
Returns the largest integer less than or equal to the input value. |
abstract double |
getDoubleValue()
Returns a double value corresponding to this value. |
LispValue |
greaterThan(LispValue arg)
Returns T if the object prepended to the argument list is in strictly decreasing order. |
LispValue |
greaterThanOrEqual(LispValue arg)
Returns T if the object prepended to the argument list is in non-increasing order. |
LispValue |
lessThan(LispValue arg)
Returns T if the object prepended to the argument list is in strictly increasing order. |
LispValue |
lessThanOrEqual(LispValue arg)
Returns T if the object prepended to the argument list is in strictly non-decreasing order. |
LispValue |
max(LispValue args)
Returns the max of this number and its arguments, which may be a list of numbers or a single number. |
LispValue |
min(LispValue args)
Returns the min of this number and its arguments, which may be a list of numbers or a single number. |
LispValue |
multiply(LispValue args)
MULTIPLY adds any combination of real or integer numbers. |
LispValue |
negate()
Returns the negative of the given number. |
LispValue |
numberp()
Returns T if the object is any kind of number. |
LispValue |
radiansToDegrees()
Converts a numeric value from radians to degrees. |
LispValue |
reciprocal()
Computes 1/x of the given number. |
LispValue |
sec()
Secant function, 1/cos(x), argument in radians. |
LispValue |
sin()
Sine trigonometric function, argument is in radians. |
LispValue |
sqrt()
Square root. |
LispValue |
subtract(LispValue args)
SUBTRACT adds any combination of real or integer numbers. |
LispValue |
tan()
Tangent trigonometric function, argument is in radians. |
LispValue |
typep(LispValue type)
|
| Methods inherited from class org.jatha.dynatype.StandardLispAtom |
|---|
atom, basic_atom |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jatha.dynatype.LispNumber |
|---|
getBigIntegerValue, getLongValue |
| Constructor Detail |
|---|
public StandardLispNumber()
public StandardLispNumber(Jatha lisp)
| Method Detail |
|---|
public boolean basic_constantp()
LispValue
basic_constantp in interface LispValuebasic_constantp in class StandardLispValuepublic boolean basic_numberp()
LispValue
basic_numberp in interface LispValuebasic_numberp in class StandardLispValuepublic abstract double getDoubleValue()
LispNumber
getDoubleValue in interface LispNumberpublic LispValue constantp()
LispValue
constantp in interface LispValueconstantp in class StandardLispValuepublic LispValue abs()
abs in interface LispValueabs in class StandardLispValuepublic LispValue degreesToRadians()
degreesToRadians in interface LispValuedegreesToRadians in class StandardLispValuepublic LispValue radiansToDegrees()
radiansToDegrees in interface LispValueradiansToDegrees in class StandardLispValuepublic LispValue factorial()
factorial in interface LispValuefactorial in class StandardLispValuepublic LispValue max(LispValue args)
max in interface LispValuemax in class StandardLispValueargs - a number or a list of numbers
public LispValue min(LispValue args)
min in interface LispValuemin in class StandardLispValueargs - a number or a list of numbers
public LispValue negate()
negate in interface LispValuenegate in class StandardLispValuepublic LispValue numberp()
LispValue
numberp in interface LispValuenumberp in class StandardLispValuepublic LispValue reciprocal()
reciprocal in interface LispValuereciprocal in class StandardLispValuepublic LispValue add(LispValue args)
add in interface LispValueadd in class StandardLispValueLispReal,
LispIntegerpublic LispValue divide(LispValue args)
divide in interface LispValuedivide in class StandardLispValueLispReal,
LispInteger,
LispBignumpublic LispValue multiply(LispValue args)
multiply in interface LispValuemultiply in class StandardLispValueLispReal,
LispIntegerpublic LispValue subtract(LispValue args)
subtract in interface LispValuesubtract in class StandardLispValueLispReal,
LispIntegerpublic LispValue acos()
acos in interface LispValueacos in class StandardLispValuepublic LispValue asin()
asin in interface LispValueasin in class StandardLispValuepublic LispValue atan()
atan in interface LispValueatan in class StandardLispValuepublic LispValue atan2(LispValue x)
atan2 in interface LispValueatan2 in class StandardLispValuepublic LispValue ceiling()
ceiling in interface LispValueceiling in class StandardLispValuepublic LispValue cos()
cos in interface LispValuecos in class StandardLispValuepublic LispValue cot()
cot in interface LispValuecot in class StandardLispValuepublic LispValue csc()
csc in interface LispValuecsc in class StandardLispValuepublic LispValue floor()
floor in interface LispValuefloor in class StandardLispValuepublic LispValue sec()
sec in interface LispValuesec in class StandardLispValuepublic LispValue sin()
sin in interface LispValuesin in class StandardLispValuepublic LispValue sqrt()
StandardLispValue
sqrt in interface LispValuesqrt in class StandardLispValuepublic LispValue tan()
tan in interface LispValuetan in class StandardLispValuepublic LispValue typep(LispValue type)
typep in interface LispValuetypep in class StandardLispAtompublic LispValue greaterThan(LispValue arg)
LispValue
greaterThan in interface LispValuegreaterThan in class StandardLispValuepublic LispValue greaterThanOrEqual(LispValue arg)
LispValue
greaterThanOrEqual in interface LispValuegreaterThanOrEqual in class StandardLispValuepublic LispValue lessThan(LispValue arg)
LispValue
lessThan in interface LispValuelessThan in class StandardLispValuepublic LispValue lessThanOrEqual(LispValue arg)
LispValue
lessThanOrEqual in interface LispValuelessThanOrEqual in class StandardLispValuepublic LispValue equalNumeric(LispValue arg)
LispValue
equalNumeric in interface LispValueequalNumeric in class StandardLispValuepublic LispValue eql(LispValue arg)
LispValue
eql in interface LispValueeql in class StandardLispValue
|
Jatha Software | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||