Amos Professional Manual  Contents  Index

Maths


SET DOUBLE PRECISION
instruction: engage double precision accuracy
Set Double Precision

Double precision should be set at the start of your program, and all floating point calculations will be performed using the more accurate mode. Because the two modes are completely separate, single precision and double precision modes cannot be mixed in the same program.

Standard mathematical functions

SQR
function: calculate square root
square=Sqr(number)
square#=Sqr(number#)

This function calculates the square root of a positive number, that is to say, it returns a number that must be multiplied by itself to give the specified value. For example:

D> Print Sqr(25)
   Print Sqr(11.1111)

EXP
function: calculate exponential
exponential#=Exp(value#)

Use the EXP function to return the exponential of a specified value. For example:

D> Print Exp(1)

LOG
function: return logarithm
a=Log(value)
a#=Log(value#)

LOG returns the logarithm in base 10 (log 10) of the given value. For example:

E> Print Log(10)
   A#=Log(100)

LN
function: return natural logarithm
a#=Ln(value#)

Back    Next
05.03.06