| Previous | Contents | Index |
The following are transcendental functions that SheerPower performs:
ABS returns the absolute value of a specified numeric expression.
| Example 6-15 ABS function |
|---|
print abs(-5) 5 |
The arccosine of X (ACOS(x)) returns the angle whose COS is x. The angle is returned in radians. ACOS has to be between -1 and +1 (inclusive).
| Example 6-16 ACOS function |
|---|
print acos(.75) .722734247813 |
Given X and Y coordinates, the ANGLE function returns the angle from 0,0 in radians.
| Example 6-17 ANGLE function |
|---|
print angle(4,9) 1.152571997216 |
The arcsine of X (ASIN(x)) returns the angle whose SIN is x. The angle is returned in radians. ASIN has to be between -1 and +1 (inclusive).
| Example 6-18 ASIN function |
|---|
print asin(.3) .304692654015 |
Arctangent (ATN) returns the angle, in radians, of a specified tangent.
| Example 6-19 ATN function |
|---|
print atn(33) 1.540502566876 |
COS returns the cosine of an angle the user specifies in radians.
| Example 6-20 COS function |
|---|
print cos(64)
.39185723043
|
COSH returns the hyperbolic cosine of a passed real number.
| Example 6-21 COSH function |
|---|
print cosh(31)
14524424832623.712890625
|
Cotangent (COT(X)) is equivalent to 1/TAN(X).
| Example 6-22 COT function |
|---|
print cot(31)
-2.2640027937804799
|
| Example 6-23 CSC function |
|---|
print csc(187)
-1.0028370028157145
|
Given an angle in radians, the DEG function returns the number of degrees.
| Example 6-24 DEG function |
|---|
print deg(14) 802.140913183152502 |
EXP function returns the value of the mathematical constant, "e", raised to a specified power.
| Example 6-25 EXP function |
|---|
print exp(5) 148.413159102577 |
LOG returns the natural logarithm of a specified number.
| Example 6-26 LOG function |
|---|
print log(100) 4.605170186 |
LOG2 returns a number's base 2 logarithm.
| Example 6-27 LOG2 function |
|---|
print log2(100) 6.643856189775 |
LOG10 returns a number's common logarithm.
| Example 6-28 LOG10 function |
|---|
print log10(100) 2 |
Returns the value 3.1415926535897932.
| Example 6-29 PI function |
|---|
print pi 3.1415926535897932 |
Given a measurement in degrees, the RAD function returns the number of radians.
| Example 6-30 RAD function |
|---|
print rad(85) 1.4835298641951801 |
SEC returns a secant of a given angle (1/COS(num_expr)). num_expr is a passed angle.
| Example 6-31 SEC function |
|---|
print sec(5) 3.5253200858189003 |
SGN returns the sign of a number. It returns a +1 if the expression is positive, a -1 if the expression is negative, and 0 if the expression is zero.
| Example 6-32 SGN function |
|---|
print sgn(-238) print sgn(238) print sgn(0) -1 1 0 |
SIN returns the sine of an angle specified in radians.
| Example 6-33 SIN function |
|---|
print sin(23) -.846220404 |
SINH(X) returns the hyperbolic sine X.
| Example 6-34 SINH function |
|---|
print sinh(23) 4872401723.124451637268 |
SQR returns the square root of a number.
| Example 6-35 SQR function |
|---|
print sqr(64) 8 |
TAN returns the tangent of an angle that is specified in radians.
| Example 6-36 TAN function |
|---|
print tan(0.2) .202710035509 |
TANH returns the hyperbolic tangent of the numeric expression given.
| Example 6-37 TANH function |
|---|
print tanh(0.5) .46211715726 |
The following are date and time functions that SheerPower performs:
DATE returns today's date in YYDDD format. The 'DDD' is the number of days that have gone by so far this year.
| Example 6-38 DATE function |
|---|
print date 3117 |
The DATE$ function returns the date in image format. int_expr1 is a given Julian day number, the default is today's date. int_expr2 indicates the desired output format for the date. The Julian day is the number of days since January 1, 1600.
| Value (int_expr2) | Output Date Format |
|---|---|
| 0 | YYYYMMDD format |
| 1 | MMDDYYYY format |
| 2 | DDMMYYYY format |
| 3 | dd-Mon-yyyy format |
| 4 | Month dd, yyyy format |
| Example 6-39 DATE$ function |
|---|
print date$ - gives 20010424 print date$(days(date$),1) - gives 04242001 print date$(days(date$),2) - gives 24042001 print date$(days(date$),3) - gives 24-Apr-2001 print date$(days(date$),4) - gives April 20, 2001 |
| Previous | Next | Contents | Index |