11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Math and Time FunctionsParametersnAn angle in radians ranging from Pi to 2 Pi (inclusive). It can be specified as a value, a variable,or an expression. You can specify the value Pi by using the $ZPI special variable. You canspecify positive or negative values smaller than Pi or larger than 2 Pi; <strong>Caché</strong> resolve thesevalues to the corresponding multiple of Pi. For example, 3 Pi is equivalent to Pi, negative Piis equivalent to Pi, and zero is equivalent to 2 Pi.ExampleThe following example permits you to compute the cosine of a number:READ "Input a number: ",numIF $ZABS(num)>(2*$ZPI) { WRITE !,"number is a larger than 2 pi" }ELSE {WRITE !,"the cosine is: ",$ZCOS(num)}QUITSee Also• $ZSIN function• $ZARCCOS function• $ZPI special variable$ZCOTCotangent function.$ZCOT(n)ParametersnAn angle in radians.Description$ZCOT returns the trigonometric cotangent of n. The result is a signed decimal number.320 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!