Skip to content
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

Simplify degenerate ifelse cases. Fix Symbolics.jl#170 #468

Merged
merged 1 commit into from
Mar 24, 2023

Conversation

Omar-Elrefaei
Copy link
Contributor

@Omar-Elrefaei Omar-Elrefaei commented Aug 31, 2022

The change was tested with the issue's reproducible sample

julia> @variables x
julia> ∂ₓ = Differential(x)
julia> expr = expand_derivatives(∂ₓ(∂ₓ(max(1,x))))
IfElse.ifelse(1 > x, 0, 0)
julia> simplify(expr)

and now we yield a 0 instead of IfElse.ifelse(1 > x, 0, 0)

@Omar-Elrefaei Omar-Elrefaei changed the title Simplify trivial ifelse cases. Fix JuliaSymbolics/Symbolics.jl#170 Simplify degenerate ifelse cases. Fix JuliaSymbolics/Symbolics.jl#170 Aug 31, 2022
Copy link
Member

@YingboMa YingboMa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test?

@shashi shashi merged commit 224e752 into JuliaSymbolics:master Mar 24, 2023
@Omar-Elrefaei Omar-Elrefaei changed the title Simplify degenerate ifelse cases. Fix JuliaSymbolics/Symbolics.jl#170 Simplify degenerate ifelse cases. Fix JuliaSymbolics/Symbolics.jl #170 Dec 5, 2024
@Omar-Elrefaei Omar-Elrefaei changed the title Simplify degenerate ifelse cases. Fix JuliaSymbolics/Symbolics.jl #170 Simplify degenerate ifelse cases. Fix JuliaSymbolics/Symbolics.jl Dec 5, 2024
@Omar-Elrefaei Omar-Elrefaei changed the title Simplify degenerate ifelse cases. Fix JuliaSymbolics/Symbolics.jl Simplify degenerate ifelse cases. Fix Symbolics.jl#170 Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants