Math methods in python
Math methods used to perform the mathemetical operation like a factorial,gcd,power,log,sqrt.
S.No | Methods | Explain |
---|---|---|
math.ceil() | To get the whole number which is next to the given decimal number. | |
math.fabs() | To convert the negative number to positive number. | |
math.factorial() | To find the factorial of a given number. | |
math.floor() | To get the whole number which is smaller to the given decimal number. | |
math.fmod() | To find the remainder of the given two number. | |
math.fsum() | To add all the given elements. | |
math.gcd() | To find the greatest common divisor for the given numbers. | |
math.isqrt() | To find the square root for the given number. | |
math.log() | To find the log value for the given number. | |
math.log2() | To find the log value by using base value as 2 for the given number. | |
math.log10() | To find the log value by using base value as 10 for the given number. | |
math.pow() | To find the power of the given number. | |
math.remainder() | To find the remainder of the given two number. | |
math.sqrt() | To find the square root for the given number. | |
math.trunc() | To get the whole number which is smaller to the given decimal number. |