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.

Math and Time Functions$ZLOGReturns the base 10 logarithm value of the specified positive numeric expression.$ZLOG(n)ParameternAny positive, non-zero number, which can be specified as a value, a variable, oran expression.Description$ZLOG returns the base 10 logarithm value of n.Specifying zero or a negative number generates an error.The corresponding natural log (base e) function is $ZLN.ExamplesThe following example writes the base 10 logarithms of the integers 1 through 10:FOR x=1:1:10 {WRITE !,"The log of ",x," = ",$ZLOG(x)}QUITreturns:The log of 1 = 0The log of 2 = .301029995663981195The log of 3 = .477121254719662437The log of 4 = .60205999132796239The log of 5 = .698970004336018805The log of 6 = .778151250383643633The log of 7 = .845098040014256831The log of 8 = .903089986991943586The log of 9 = .954242509439324875The log of 10 = 1WRITE $ZLOG($ZPI)returns .4971498726941338541.WRITE $ZLOG(.5)returns -.301029995663981195.WRITE $ZLOG(0)370 <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!