-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Substitute with fold=true
does not preserve rationals
#1299
Substitute with fold=true
does not preserve rationals
#1299
Comments
@shashi is this intended? |
well it's incidental like the OP said. Maybe fold could call a |
How about if
Then r(7.0) # outputs 7 If you think this would work, can you point me to where I should add it for it to work on nested expressions? Like
I am not familiar enough with |
That's a nice idea. It would probably go in https://github.com/JuliaSymbolics/SymbolicUtils.jl/blob/master/src/simplify_rules.jl |
It is annoying that
gives
0.5
and not1//2
.The reason is natural:
cos(0)
evaluates to1.0
(not1
), giving(1//2) * 1.0
, which is converted to0.5
.Is there a way to fix this?
The text was updated successfully, but these errors were encountered: