Scol standard library package
0.3.1
Common and usefull functions for all Scol applications
|
Functions | |
std_m2power (x) | |
Return the power of two : \(2^{f}\). More... | |
std_m2powerI (x) | |
Return the power of two : \(2^{i}\). More... | |
std_mDegToRad (f) | |
Convert degree to radian. More... | |
std_mFibonacci (n) | |
Return the nth value of the Fibonacci series (1, 1, 2, 3, 5, 8, 13, 21, ...) More... | |
std_mGCD (int1, int2) | |
Return the GCD (Greatest Common Divisor, PGCD in french) of two integers. More... | |
std_mLCM (int1, int2) | |
Return the LCM (Least Common Multiple, PPCM in french) of two integers. More... | |
std_mPow (i, n) | |
Calculate the power of an integer by a quick recursion. More... | |
std_mPrimeMRDet (iNumber) | |
Returns if an integer is a prime number or a composite number. More... | |
std_mRadToDeg (f) | |
Convert radian to degree. More... | |
Package to load : lib/std/maths.pkg
Dependancies :
std_mFibonacci | ( | n | ) |
Return the nth value of the Fibonacci series (1, 1, 2, 3, 5, 8, 13, 21, ...)
Prototype : : fun [I] I
I | : an integer (-43 to 43 included) |
std_m2power | ( | x | ) |
Return the power of two : \(2^{f}\).
Prototype : : fun [F] F
F | : a float number (0 to 127 included) |
std_m2powerI | ( | x | ) |
Return the power of two : \(2^{i}\).
Prototype : : fun [I] I
I | : a float number (0 to 29 included) |
std_mDegToRad | ( | f | ) |
Convert degree to radian.
Prototype : : fun [F] F
F | : a value in degree |
std_mRadToDeg | ( | f | ) |
Convert radian to degree.
Prototype : : fun [F] F
F | : a value in radian |
std_mGCD | ( | int1 | , |
int2 | |||
) |
Return the GCD (Greatest Common Divisor, PGCD in french) of two integers.
Prototype : : fun [I I] I
I | : a first integer |
I | : a second integer |
std_mLCM | ( | int1 | , |
int2 | |||
) |
Return the LCM (Least Common Multiple, PPCM in french) of two integers.
Prototype : : fun [I I] I
I | : a first integer |
I | : a second integer |
std_mPow | ( | i | , |
n | |||
) |
Calculate the power of an integer by a quick recursion.
Prototype : : fun [I I] I
I | : an integer |
I | : a power (should be >= 0 otherwise, nil will be returned) |
std_mPrimeMRDet | ( | iNumber | ) |
Returns if an integer is a prime number or a composite number.
This is a deterministic implementation of the Miller-Rabin primality algorithm.
Prototype : : fun [I] I
I | : an integer |