sympy.frac() method in Python
The sympy.frac(x) function represents the fractional part of x. For real numbers, it is defined as, x – [x]
Syntax : sympy.frac()
Return : Return the simplified mathematical expression.
Example #1 :
Python3
from sympy import *
gfg = frac( 5.36 )
print (gfg)
|
Output :
0.36
Example #2 :
Python3
from sympy import *
gfg = frac(Rational( 7 , 5 ))
print (gfg)
|
Output :
2 / 5
Last Updated :
29 Jul, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...