KeyCreator Drafting / Tools / Solve / Calculator / Calculator Functions

Calculator Functions  
abs(x)

Description – The absolute value of the number.

Argument – You can assign any value to x, or make it an assigned variable.

Example – CALC> x = -2
CALC> -2
CALC> y = abs(x)
CALC> 2

acos(x)

Description – The arc cosine of x, in the range of 0 to 180 degrees.

Arguments –The value of x must be between -1 and

Example – CALC> y = acos(.862)
CALC> 30.45811

asin(x)

Description – The arc sine of x, a value in the range -90 to 90 degrees.

Arguments – The value of x must be between -1 and 1 degrees.

Example – CALC> y = asin(0.65)
CALC> 40.541602

atan(x)

Description The arc tangent of x, a value in the range -90 to 90 degrees.

Arguments x is any value or assigned variable.

Example CALC> y = atan(17)
CALC> 86.633539

atan2(y,x)

Description The arc tangent of y/x, a value in the range -180 to 180 degrees.

Arguments  Any two values, with the exception that they are not both equal to zero.

Example CALC> y = atan2(2,17)
CALC> 6.70984

ceil(x)

Description The value of x rounded up to the nearest integer.

Arguments Any value x.

Example CALC> y = 5.84
CALC> 5.84
CALC> x = ceil(y)
CALC> 6

copsize (type)

Description Size of copious entity item.

Arguments Type can be any one of the following constants (either upper or lowercase letters may be used):

  char Character

  uchar unsigned character

  int  Integer

  uint unsigned integer

  short short integer

  ushort unsigned short

  long long integer

  ulong unsigned long

  float Float

  double  double

  tcode copious entity type code

Example s = copsize (long)
(s will be equal to 4)

cos(x)

Description The cosine of the angle x, a value in the range -1 to

Arguments Any angle value, x in degrees.

Example CALC> y = cos(67.3)
CALC> 0.385906

cosh(x)

Description The hyperbolic cosine of the angle x, a value in the range greater than or equal to one.

Arguments Any angle value, x in degrees.

Example CALC> y = cosh(67.3)
CALC> 772905

dms (d, m, s)

By typing dms in the online calculator field, you can enter an angle using the degree, minute, second notation. This will then accept the angle as specified, as 60ths for example, when both dimensioning and creating.

Description Returns a single value in degrees using this formula:

 dms = d + (m/60) + (s/3600)

Arguments Any d, m, or s value.

Example y = dms (23, 2, 55)
y will be equal to 20486

exp(x)

Description Returns the value e to the x of e^x (natural exponential function).

Arguments Any value x.

Note  When the resultant value overflows, the value is set to the largest possible double-precision value.

Example CALC> y = exp(3)
CALC> 20.085537

floor(x)

Because the Online Calculator does not do integer arithmetic by truncation, use floor to approximate integer arithmetic by truncation.

Description The value of x rounded down to the nearest integer.

Arguments Any value x.

Example CALC> y = 5.84
CALC> 5.84
CALC> x = floor(y)
CALC> 5

fmod(x, y)

Description Returns floating point remainder of an integer division, as modulus, x mod y.

Arguments x and y can be any values.

Example x = 55.32
y = fmod (x, 3)
y will be equal to 32

hypot(x,y)

Description The length of the hypotenuse of the triangle, sqrt (x*x + y*y).

Arguments The lengths of the two legs of a right triangle, x and y.

Example CALC> a = 5
CALC> 5
CALC> b = 6.7
CALC> 6.7
CALC> h = hypot(a,b)
CALC> 7.5591

log(x)

Description The natural logarithm of x.

Arguments Any number x which is greater than or equal to zero.

Example CALC> log(4.9)
CALC> 589235

log10(x)

Description The base 10 logarithm of x.

Arguments Any number x which is greater than or equal to zero.

Example CALC> log10(3)
CALC> 0.477121

pow (a, b)

Description Returns the value of a raised to the power of b (ab).

Arguments a and b can be any values.

Example x = pow (3, 5)
x will be equal to 15.5885

sin(x)

Description The sine of the angle x, a value in the range -1 to

Arguments Any angle value, x in degrees.

Example CALC> y = sin(16)
CALC> 0.275637

sinh(x)

Description The hyperbolic sine of the angle x; it can be any double-precision value.

Arguments Any angle value x in degrees.

Example CALC> y = sinh(34)
CALC> 0.628857

sizeof

Description An integer representing the size of the item specified where:

 0 = undefined

 1 = defined single variable

 >1 = defined array of n elements

Arguments HIDD_SPOT_LIGHT is the name of a variable or array.

Example n = sizeof (footage)

sqrt(x)

Description The square root of x.

Arguments Any number x which is greater than or equal to zero.

Examples CALC> sqrt(18.67)
CALC> 4.32088

tan(x)

Description The tangent of x.

Arguments Any value x in degrees.

Example CALC> y = tan(42)
CALC> 0.900404

tanh(x)

Description The hyperbolic tangent of x, a value in the range of -1 to

Arguments Any value x in degrees.

Example CALC> y = tanh(42)
CALC> 0.624921

$msg = "HIDD_SPOT_LIGHT"

Description String variable assignment.

Example $msg = "Hello"1