Is there a way to have fractions with roots?
As a comment suggested, I found sqrt in the sympy package. For example sympy.sqrt(8) produces 2*sqrt(2), so it doesn't just keep the number under the root as not to lose precision, it also lets me make operations with it and simplifies it.
Is there a way to have fractions (in python) with roots? When I write Fraction(np.sqrt(2), 2), it gives me 1/2, because Fraction takes ints as arguments. I want to have square root of 2 divided by 2, and keep the 2 under the root as to not lose precision while calculating.
Edit: I am using the package "fraction". I couldn't find "fractions" anywhere when I searched for the package to install.