Math Extension
Previous Topic  Next Topic 

Product

Math Extension

Manufacturer

Standard Satellite Forms component

Website

http://www.satelliteforms.net/

Source code provided

Yes

Platform

PalmOS, PocketPC

Sample project(s)

Advanced Calculator

Keywords

math, trigonometry, sin, cos, tan, acos, asin, atan, round


The Math Extension provides access to advanced math functions.


The PalmOS Math extension also requires the inclusion of the MathLib shared library.


Scripts API


All methods except 'About' return a value.  Unless mentioned otherwise, it is assumed that each method returns a floating-point value.  Also, if there is an error detected the method should always return the last value passed to it.


Usage:  Global Method:  [Name of method]

          Private Method:  [Name of extension].[Name of method]


Example of usage:  Global Method:  ABS(x)

                         Private Method:  Extensions(“Math”).About()



ABS(Float)

Returns the absolute value.


About()

A private method that returns the about box of the Math Extension.



ACOS(Float)

ArcCosine(x)



ACOSH(Float)

Hyperbolic ArcCosine(x)



ASIN(Float)

ArcSine(x)



ASINH(Float)

Hyperbolic ArcSine(x)


ATAN(Float)

ArcTangent(x)


ATANH(Float)

Tangent(x)



ATAN2(Float)

ArcTangent2(x)


CBRT(Float)

Finds the cube root of the given value.



COS(Float)

Cosine(x)


COSH(Float)

Hyperbolic Cosine(x)


COPYSIGN(Float, Float)

Returns x with the sign of y. 

Example of usage:  value = COPYSIGN(x,y).



DREM(Float, Float)

Finds the remainder of x/y. 

Example of usage:  DREM(x, y).


EXP(Float)

Exponent(x)


EXPM1(Float)

Returns:  Exp(x) - 1.


FREXPINT(Float)

Breaks the given value into normalized fraction and an integral power of 2.  This one returns the integer.


FREXPFRAC(Float)

Breaks the given value into normalized fraction and an integral power of 2. Returns the fractional value.


ILOGB(Float)

Returns the binary exponent of a non-zero x.  Returns an integer.



ISINF(Float)

Returns 0 if value passed is finite or not a number, +1 if it approaches +Infinity, or -1 if it approaches -Infinity.  Returns an integer.



LDEXP(Float, Float)

Returns:  x * 2^y. 

Example of usage:  value = LDEXP(x, y).


LOG(Float)

Natural Logarithm


LOG2(Float)

Log base 2


LOG10(Float)

Log base 10


MODFFRAC(Float)

Breaks a number into its fractional part.



MODFINT(Float)

Breaks a number into its integral and fractional parts. Returns an integer


POW(Float, Float)

Returns x to the power of y. 

Example of usage:  value = POW(x, y).


ROUND(Float, integer)

Rounds the value to nearest decimal place specified. 

Example of usage:  value = Round(x, decimal).


SIN(Float)

Sine(x)


SINH(Float)

Hyperbolic Sine(x)



SQROOT(Float)

Gives the square root of the given value.


TAN(Float)

Tangent(x)



TANH(Float)

Hyperbolic Tangent(x)



DocID: 10138  DocDate: 2005-07-18