TEIMSI
Developer's platform of programming text codes

The next topic is the description for the use of the following predefined TEIMSI functions:

1)- abs(number)

2)- acos(number)

3)- asin(number)

4)- atan(number)

5)- atanxy(number,number)

6)- cos(number)

7)- exp(number)

8)- facto(number)

9)- floor(number)

10)- ln(number)

11)- max(number,number)

12)- min(number,number)

13)- rnd()

14)- randomize()

15)- randomize_from_key(string)

16)- ron(number)

17)- sgn(number)

18)- sin(number)

19)- sqrt(number)

20)- tan(number)

# abs

The "abs" function determines the absolute value of a number (it passes a number to positive if it's negative).

Syntax
 abs(decimal_number)

Parameters
 decimal_number TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

```

Go to top

# acos

The "acos" function calculates the arc cosine of a decimal number between -1 and 1. The resulting value is another number between _PI and 0, the function is the inverse of the "cos" (cosine) function.

Syntax
 acos(decimal_number)

Parameters
 decimal_number TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

```

Go to top

# asin

The "asin" function finds the arc sine of a decimal number between -1 and 1. The resulting value is another number between -_PI/2 and _PI/2, the function is the inverse of the "sin" function (sine function).

Syntax
 asin(decimal_number)

Parameters
 decimal_number TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

```

Go to top

# atan

The "atan" function is the arctangent of a decimal number between -infinity and +infinity. The resulting value is another number between -_PI/2 and _PI/2, the function is the inverse of the "tan" function (tangent function).

Syntax
 atan(decimal_number)

Parameters
 decimal_number TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

alert(atan(1000000))		// 	Shows ~ _PI/2 = 1.57079...

```

Go to top

# atanxy

The "atanxy" function finds the angle (in radians and range of 0 to 2*_PI) in the vertex (0,0) of the triangle (x,y),(0,0),(1,0) within a rectangular and cartesian two-dimensional plane.

Syntax
 atanxy(decimal_number1,decimal_number2)

Parameters
 decimal_number1 TEIMSI variable with data type of floating point number. decimal_number2 TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

alert(atanxy(-1,-1))	//	Shows 3.926 ... = (5/8)*2*_PI = º225
alert(atanxy(1,-1))	//	Shows 5.497 ... = (7/8)*2*_PI = º315
alert(atanxy(1,1))		//	Shows 0.785 ... = (1/8)*2*_PI = º45
alert(atanxy(-1,1))	//	Shows 2.356 ... = (3/8)*2*_PI = º135

```

Go to top

# cos

The "cos" function determines the cosine of a number that represents an angle in radians.

Syntax
 cos(decimal_number)

Parameters
 decimal_number TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

```

Go to top

# exp

The "exp" function finds "e" (2.71828182 ...) raised to the number that is passed as a parameter.

Syntax
 exp(decimal_number)

Parameters
 decimal_number TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

alert(exp(1))		//	Shows e, 2,71828 ...

```

Go to top

# facto

The "facto" function receives a non-negative integer and returns the factorial number. For example facto(4) =4*3*2*1=24, facto(8) =8*7*6*5*4*3*2*1=40320.

Syntax
 facto(decimal_number)

Parameters
 decimal_number TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

```

Go to top

# floor

The "floor" function returns the integer part of a decimal number.

Syntax
 floor(decimal_number)

Parameters
 decimal_number TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

```

Go to top

# ln

The "ln" function finds the logarithm base to "e" (2.71828 ...) of a positive decimal number. It is the inverse function to the exp function.

Syntax
 ln(decimal_number)

Parameters
 decimal_number TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

// _E=2.718281828

```

Go to top

# max

The "max" function receives two numbers and returns the greatest of them.

Syntax
 max(decimal_number1,decimal_number2)

Parameters
 decimal_number1 TEIMSI variable with data type of floating point number. decimal_number2 TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

```

Go to top

# min

The "min" function receives two numbers and returns the smallest of them.

Syntax
 min(decimal_number1,decimal_number2)

Parameters
 decimal_number1 TEIMSI variable with data type of floating point number. decimal_number2 TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

```

Go to top

# rnd

The "rnd" function returns a random decimal number between 0 and 1.

Syntax
 rnd()

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

```

Go to top

# randomize

The "randomize" function randomly initializes the seed for the "rnd" values generator.

Syntax
 randomize()

Returned value
 Boolean TEIMSI variable with a "true" boolean.

Example:

```

randomize()

```

Go to top

# randomize_from_key

The "randomize_from_key" function receives a "key" string for the initialization of the random seed for the "rnd" values generator procedure.

Syntax
 randomize_from_key(string)

Parameters
 string TEIMSI variable with a string data type.

Returned value
 Boolean TEIMSI variable with a boolean data type with a value of "true" if no error has occured.

Example:

```

randomize_from_key("random 1")

```

Go to top

# ron

The "ron" function rounds a number to the nearest integer.

Syntax
 ron(decimal_number)

Parameters
 decimal_number TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

```

Go to top

# sgn

The "sgn" function returns an integer of three possible: -1, 0, 1. The -1 if you send it a negative number, 0 if zero and 1 if a positive one.

Syntax
 sgn(decimal_number)

Parameters
 decimal_number TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

```

Go to top

# sin

The "sin" function determines the sine of a number that represents an angle in radians.

Syntax
 sin(decimal_number)

Parameters
 decimal_number TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

```

Go to top

# sqrt

The "sqrt" function finds the square root of a nonnegative number.

Syntax
 sqrt(decimal_number)

Parameters
 decimal_number TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

```

Go to top

# tan

The "tan" function determines the tangent of a number that represents an angle in radians.

Syntax
 tan(decimal_number)

Parameters
 decimal_number TEIMSI variable with data type of floating point number.

Returned value
 decimal_number TEIMSI variable with data type of floating point number.

Example:

```

// _PI=3.141592654....