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.

$ZEXP$ZEXPReturns the natural logarithm raised to the specified power.$ZEXP(n)ParametersnAny number.Description$ZEXP returns a value that is the natural logarithm (base e) raised to the power n.The corresponding natural logarithm function is $ZLN.ParametersnAny number. It can be specified as a value, a variable, or an expression.ExamplesThe following example writes the natural log raised to the power of negative and positiveintegers:FOR x=-3:1:3 {WRITE !,"The natural log raised to ",x," = ",$ZEXP(x)}QUITreturns:The natural log raised to -3 = .04978706836786394297The natural log raised to -2 = .1353352832366126919The natural log raised to -1 = .3678794411714423216The natural log raised to 0 = 1The natural log raised to 1 = 2.718281828459045236The natural log raised to 2 = 7.389056098930650228The natural log raised to 3 = 20.08553692318766774The following example writes the natural logs raised to the first nine multiples of pi:SET y=1FOR x=$ZPI:$ZPI:10*$ZPI {WRITE !,"The natural log raised to ",y,"pi = ",$ZEXP(x)SET y=y+1 }QUIT<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 365

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

Saved successfully!

Ooh no, something went wrong!