CRE Programmer's Guide

Math Functions
Common Run-Time Environment (CRE) Programmer’s Guide528146-004
7-3
Standard Math Functions
Table 7-2 on page 7-3 shows the standard math functions supported by the native CRE
library. The native CRE does not provide pTAL prototypes for these functions. It
provides only the function names, which are case-sensitive. You can use the function
prototypes in the C header files as examples when writing your own pTAL prototypes
for these functions.
See the
Guardian Native C Library Calls Reference Manual or the Open System
Services Library Calls Reference Manual for descriptions of these functions.
Sign on
page 7-18
Returns its first parameter with the sign set according to its second
parameter.
Sin
on
page 7-19
Returns the sine of an angle whose size is expressed in radians.
Sinh
on
page 7-19
Returns a hyperbolic sine.
Split
on
page 7-20
Separates a floating-point number into integral and fractional parts.
Sqrt
on
page 7-20
Returns the square root of a number.
Tan
on
page 7-21
Returns the tangent of an angle whose size is expressed in radians.
Tanh
on
page 7-21
Returns a hyperbolic tangent.
Truncate
on
page 7-22
Returns the nonfractional part of a number.
Upper
on
page 7-22
Returns the smallest integer that is not less than the value of its parameter.
Table 7-2. Native CRE Standard Math Functions (page 1 of 2)
Function Name Native CRE Library Function Name
acos Returns an arccosine expressed in radians
acosh Returns a hyperbolic arccosine
asin Returns an arcsine expressed in radians
asinh Returns a hyperbolic arcsine
atan Returns an arctangent expressed in radians
atan2 Returns the arctangent, expressed in radians, of the quotient of its
parameters
cbrt Returns a cube root
Table 7-1. TNS CRE Standard Math Functions (page 2 of 2)
Function
Name Function Action