org.maverickdbms.basic
Class DoubleMath

java.lang.Object
  extended byorg.maverickdbms.basic.DoubleMath
All Implemented Interfaces:
MathInterface

public class DoubleMath
extends java.lang.Object
implements MathInterface


Constructor Summary
DoubleMath()
           
 
Method Summary
 mvString ABS(mvString result, ConstantString a)
          Gets the absolute value for the number.
 mvString add(mvString result, ConstantString a, ConstantString b)
           
 mvString BITAND(mvString result, ConstantString a, ConstantString b)
          Returns the bitwise AND of the 2 numbers
 mvString COS(mvString result, ConstantString a)
          Returns the cosine of the number
 mvString divide(mvString result, ConstantString a, ConstantString b)
           
 mvString EXP(mvString result, ConstantString a)
          Returns the e to the power of the number
 boolean GE(ConstantString a, ConstantString b)
          Determines whether a is greater than or equal to b.
 int getPrecision()
          Returns the current PRECISION value
 boolean GT(ConstantString a, ConstantString b)
          Determines whether a is greater than b.
 mvString INT(mvString result, ConstantString a)
          Returns the integer portion of the number
 boolean LE(ConstantString a, ConstantString b)
          Determines whether a is less than or equal to b.
 mvString LN(mvString result, ConstantString a)
          Returns the natural logarithm of the number
 boolean LT(ConstantString a, ConstantString b)
          Determines whether a is less than b.
 mvString MOD(mvString result, ConstantString a, ConstantString b)
          Returns the modulus of a divided by b
 mvString multiply(mvString result, ConstantString a, ConstantString b)
           
 void PRECISION(ConstantString val)
           
 mvString PWR(mvString result, ConstantString a, ConstantString b)
          Returns the number raised to the power.
 mvString RND(mvString result, ConstantString range)
           
 mvString SIN(mvString result, ConstantString a)
          Returns the sine of the number
 mvString SQRT(mvString result, ConstantString a)
           
 mvString subtract(mvString result, ConstantString a, ConstantString b)
           
 mvString TAN(mvString result, ConstantString a)
          Returns the tangent of the number
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleMath

public DoubleMath()
Method Detail

ABS

public mvString ABS(mvString result,
                    ConstantString a)
Description copied from interface: MathInterface
Gets the absolute value for the number.

Specified by:
ABS in interface MathInterface
Parameters:
result - value to store the absolute number in
a - the number
Returns:
the absolute value

add

public mvString add(mvString result,
                    ConstantString a,
                    ConstantString b)
Specified by:
add in interface MathInterface

BITAND

public mvString BITAND(mvString result,
                       ConstantString a,
                       ConstantString b)
Description copied from interface: MathInterface
Returns the bitwise AND of the 2 numbers

Specified by:
BITAND in interface MathInterface
Parameters:
result - - the number to store the result
a - - the first operand
b - - the second operand
Returns:
the bitwise AND

COS

public mvString COS(mvString result,
                    ConstantString a)
Description copied from interface: MathInterface
Returns the cosine of the number

Specified by:
COS in interface MathInterface
Parameters:
result - - the number to store the result
a - - the angle, in radians
Returns:
the cosine

divide

public mvString divide(mvString result,
                       ConstantString a,
                       ConstantString b)
Specified by:
divide in interface MathInterface

EXP

public mvString EXP(mvString result,
                    ConstantString a)
Description copied from interface: MathInterface
Returns the e to the power of the number

Specified by:
EXP in interface MathInterface
Parameters:
result - - the number to store the result
a - - the number
Returns:
the result

GE

public boolean GE(ConstantString a,
                  ConstantString b)
Description copied from interface: MathInterface
Determines whether a is greater than or equal to b.

Specified by:
GE in interface MathInterface
Parameters:
a - the first number to be compared
b - the second number to be compared
Returns:
true if a is greater than or equal to b

getPrecision

public int getPrecision()
Description copied from interface: MathInterface
Returns the current PRECISION value

Specified by:
getPrecision in interface MathInterface

GT

public boolean GT(ConstantString a,
                  ConstantString b)
Description copied from interface: MathInterface
Determines whether a is greater than b.

Specified by:
GT in interface MathInterface
Parameters:
a - the first number to be compared
b - the second number to be compared
Returns:
true if a is greater than b

INT

public mvString INT(mvString result,
                    ConstantString a)
Description copied from interface: MathInterface
Returns the integer portion of the number

Specified by:
INT in interface MathInterface
Parameters:
a - the number to store the result in
Returns:
the truncated number

LE

public boolean LE(ConstantString a,
                  ConstantString b)
Description copied from interface: MathInterface
Determines whether a is less than or equal to b.

Specified by:
LE in interface MathInterface
Parameters:
a - the first number to be compared
b - the second number to be compared
Returns:
true if a is less than or equal to b

LN

public mvString LN(mvString result,
                   ConstantString a)
Description copied from interface: MathInterface
Returns the natural logarithm of the number

Specified by:
LN in interface MathInterface
Parameters:
result - the number to store the result
a - a number greater than zero
Returns:
the natural logarithm

LT

public boolean LT(ConstantString a,
                  ConstantString b)
Description copied from interface: MathInterface
Determines whether a is less than b.

Specified by:
LT in interface MathInterface
Parameters:
a - the first number to be compared
b - the second number to be compared
Returns:
true if a is less than b

MOD

public mvString MOD(mvString result,
                    ConstantString a,
                    ConstantString b)
Description copied from interface: MathInterface
Returns the modulus of a divided by b

Specified by:
MOD in interface MathInterface
Parameters:
a - the numerator
b - the denominator
result - the modulus
Returns:
the modulus

multiply

public mvString multiply(mvString result,
                         ConstantString a,
                         ConstantString b)
Specified by:
multiply in interface MathInterface

PWR

public mvString PWR(mvString result,
                    ConstantString a,
                    ConstantString b)
Description copied from interface: MathInterface
Returns the number raised to the power.

Specified by:
PWR in interface MathInterface
Parameters:
result - the number to store the result
a - the number
b - the power to be raised
Returns:
the result

PRECISION

public void PRECISION(ConstantString val)
Specified by:
PRECISION in interface MathInterface

RND

public mvString RND(mvString result,
                    ConstantString range)
Specified by:
RND in interface MathInterface

SIN

public mvString SIN(mvString result,
                    ConstantString a)
Description copied from interface: MathInterface
Returns the sine of the number

Specified by:
SIN in interface MathInterface
Parameters:
result - - the number to store the result
a - - the angle, in radians
Returns:
the sine

SQRT

public mvString SQRT(mvString result,
                     ConstantString a)
Specified by:
SQRT in interface MathInterface

subtract

public mvString subtract(mvString result,
                         ConstantString a,
                         ConstantString b)
Specified by:
subtract in interface MathInterface

TAN

public mvString TAN(mvString result,
                    ConstantString a)
Description copied from interface: MathInterface
Returns the tangent of the number

Specified by:
TAN in interface MathInterface
Parameters:
result - - the number to store the result
a - - the angle, in radians
Returns:
the tangent