NAME

fpmath – a module for Tensile

DESCRIPTION

fpmath adds floating-point support to Tensile.

FUNCTIONS

isfloat(num)

RETURNS:true if num is a legal floating-point number

fadd(num1 num2 ...)

RETURNS:the sum of all its argument

fpostincr(var val)

adds val to var
RETURNS:old value of var

fincr(var val)

adds val to var
RETURNS:new value of var

fpostdecr(var val)

subtracts val from var
RETURNS:old value of var

fdecr(var val)

subtracts val from var
RETURNS:old value of var

fmul(val1 val2 ...)

RETURNS:a multiply of vals

fsub(val1 val2)

RETURNS:difference between val1 and val2

fdiv(val1 val2)

RETURNS:quotient of val1 and val2

fneg(val)

RETURNS:a negated val

fabs(val)

RETURNS:the absolute value of val

fint(val)

RETURNS:integral part of val

frac(val)

RETURNS:fractional part of val

fsqrt(val)

RETURNS:a square root of val

fln(val)

RETURNS:a natural logarithm of val

fsin(val)

RETURNS:a sine of val (in radians)

fcos(val)

RETURNS:a cosine of val (in radians)

fexp(val)

RETURNS:e^val

fpower(val1 val2)

RETURNS:val1^val2

fprecision([prec])

if prec is present, sets the floating point precision to it
RETURNS:the old value of precision

Comparison functions

eq, neq, less, greater, le, ge accept float as their first argument, resulting in floating point comparison

SEE ALSO

sl(1)

AUTHOR

Artem V. Andreev

COPYRIGHT

Copyright © 2001, 2002 Artem V. Andreev – See
sl(1) for details