What are the mathematical functions of perl
This article mainly shows you "what are perl mathematical functions", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "what are perl mathematical functions" this article?
Perl mathematical function
Perl mathematical function
Perl Mathematical function name sin
Call syntax retval=sin (value)
The explanation parameter is the arc value.
Perl Mathematical function name cos
Call syntax retval=cos (value)
The explanation parameter is the arc value.
Perl Mathematical function name atan2
Call syntax retval=atan2 (value1,value2)
Explains the operation and returns the arctan value of value1 divided by value2, in radians, in the range of-PI~PI.
Application example:
The angle is converted into a Radian subroutine. Subdegrees_to_radians {
Local ($degrees) = @ _
Local ($radians); 11:
$radians=atan2 (1BI 1) * $degrees/45
}
Perl Mathematical function name sqrt
Call syntax retval=sqrt (value)
Explain the square root function. Value is a nonnegative number.
Perl Mathematical function name exp
Call syntax retval=exp (value)
The explanation returns to the value power of e.
Perl Mathematical function name log
Call syntax retval=log (value)
Explain the natural logarithm with e as the base.
Perl Mathematical function name abs
Call syntax retval=abs (value)
Explains the absolute value function. (not in Perl4)
Perl Mathematical function name rand
Call syntax retval=rand (num)
Explains the random number function and returns a floating-point number between 0 and the integer num.
Perl Mathematical function name srand
Call syntax srand (value)
Commentary initializes the random number generator. Make sure that each call to rand is truly random.
These are all the contents of the article "what are the mathematical functions of perl?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!