Delta Tau GEO BRICK LV Reference Manual

Page of 760
Turbo PMAC/PMAC2 Software Reference
 
Turbo PMAC Mathematical Features 
 493 
Examples: 
P50=2.5 
;  
P51=INT(P50) 
; Take INT of positive value 
P51 
; Query resulting value 
; 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 
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.  
Execution time, 80 MHz CPU: 4.3 µsec interpreted, 1.4 µsec compiled 
Examples: 
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 
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.  
Execution time, 80 MHz CPU: 5.6 µsec interpreted, 3.2 µsec compiled 
Examples: 
P60=SIN(30) 
; Computes cosine of 30 
Y(Q80*SIN(Q81)) 
; Move Y axis to calculated value