11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

$ZCOS210-1returns 1.107148717794090502returns .7853981633974483098returns 0returns -.7853981633974483098ExampleThe following example permits you to calculate the arc tangent of a number:READ "Input a number: ",numWRITE !,"the arc tangent is: ",$ZARCTAN(num)QUITSee Also• $ZTAN function• $ZPI special variable$ZCOSCosine function.$ZCOS(n)ParametersnAn angle in radians ranging from Pi to 2 Pi (inclusive). Other supplied numeric valuesare converted to a value within this range.Description$ZCOS returns the trigonometric cosine of n. The result is a signed decimal number rangingfrom -1 to +1 (see note).Note:$ZCOS (like all trigonometric functions) calculates its values based on pi roundedto the number of available decimal digits. Therefore, the value returned by $ZCOS(0)is 1.000000000000000001 and $ZCOS($ZPI) is –1.000000000000000001. For thisreason you should not perform limit tests comparing these returned values to 1 and–1.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 319

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

Saved successfully!

Ooh no, something went wrong!