You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.
nerdamer('sqrt(2)').simplify().toString()->'sqrt(2)'nerdamer('sqrt(a)/a').simplify().toString()->'a^(-1/2)'nerdamer('sqrt(2*a)/a').simplify().toString()->'a^(-1)*sqrt(2)*sqrt(a)'// should be sqrt(2/a)nerdamer.simplify('sqrt(2)').toString()->'131836323/93222358'nerdamer.simplify('sqrt(a)/a').toString()->'sqrt(a)^(-1)'nerdamer.simplify('sqrt(2*a)/a').toString()->'sqrt((131836323/93222358)*a)^(-1)'// this is wrong sqrt(sqrt(2)*a)^(-1) is not equal to sqrt(2*a)^(-1)
So I've found three problems:
.simplify() does not simplify sqrt(n*a)/a to sqrt(n/a)
nerdamer.simplify converts irrational numbers into confusing fractional approximations.
nerdamer.simplify makes a mistake in my specific example in converting sqrt(sqrt(2)*a) not sqrt(2*a)
The text was updated successfully, but these errors were encountered:
To your second point, it is not simplify() that does that, it is simply how Nerdamer represents numbers internally. .text("decimals") or simply .text() is your friend if that is what you want, instead of .toString(). As for the rest, yeah, I have given up on simplify(). Perhaps one of use should take the time to debug that, as a community contribution.
Also, if you want functions like sqrt(2) evaluated, you need to say "evaluate()". I agree with the concept of keeping things symbolic as long as one can.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Review the following code examples:
So I've found three problems:
sqrt(n*a)/a
tosqrt(n/a)
sqrt(sqrt(2)*a)
notsqrt(2*a)
The text was updated successfully, but these errors were encountered: