Reference Manual
PMAC 2 Software Reference 
PMAC Mathematical Features  367 
Example 
P50=2.5  ;  
P51=INT(P50)    ; Take INT of positive value 
P51  ; Query resulting value 
2        ; Next lower integer value 
P52=INT(-P50)    ; Take INT of negative value 
P52  ; Query resulting value 
-3        ; Next lower integer value 
LN 
Function 
Natural logarithm 
Syntax 
EXP({expression}) 
Domain 
Positive real numbers 
Domain units 
User-determined 
Range 
All real numbers 
Range units 
User-determined 
Remarks 
LN implements the natural logarithm (logarithm base “e”) function of the mathematical 
expression contained inside the following parentheses. 
To implement the logarithm using another base, divide the natural logarithm of the 
value by the natural logarithm of the base (log
y
x = ln x / ln y). The natural logarithm 
of 10 is equal to 2.302585. 
If the argument inside the parentheses is outside of the legal domain of positive 
numbers, a 0 value will be returned. No error will be reported, and the program will 
not stop. It is the programmer’s responsibility to check for possible domain errors. 
Example 
P19=LN(P20)    ; Takes the natural log of P20 
P6=LN(P5)/LN(10)   ; Takes the log base 10 of P5 
SIN 
Function 
Trigonometric sine 
Syntax 
SIN({expression}) 
Domain 
All real numbers 
Domain units 
Radians/degrees 
Range 
-1.0 to +1.0 
Range units 
none 
Remarks 
SIN implements the trigonometric sine function of the mathematical expression 
contained inside the following parentheses. 
This function interprets its argument in degrees if I15 is set to the default value of 0; it 
interprets its argument in radians if I15 is set to 1. 
Example 
P60=SIN(30)    ; Computes cosine of 30 
Y(Q80*SIN(Q81)) ; Move Y axis to calculated value 










