Skip to content

Handle successive conditions in SetDelayed - #1219

Merged
mmatera merged 5 commits into
masterfrom
iteratedconditionset
Apr 1, 2021
Merged

Handle successive conditions in SetDelayed#1219
mmatera merged 5 commits into
masterfrom
iteratedconditionset

Conversation

@mmatera

Copy link
Copy Markdown
Contributor

This PR allows to handle the situation involving assignments with several conditions:

F[x_,y_]/; x>0 /; x<y:= x/y
F[x_,y_]/; x<0 := 0
F[x_,y_]:=y/x

@mmaterammatera mentioned this pull request Apr 1, 2021
Comment threadmathics/builtin/assignment.py Outdated
lhs = condition._leaves[0]
# This handle the case of many sucesive conditions:
# f[x_]/; cond1 /; cond2 ...
# is resumed to a single condition

@rockyrockyApr 1, 2021

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

resumed -> reduced or combined?

@rockyrocky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM (but see small typo)

@rockyrocky changed the title handling several sucesive conditions in SetDelayedhandling successive conditions in SetDelayedApr 1, 2021
@rockyrocky changed the title handling successive conditions in SetDelayedHandle successive conditions in SetDelayedApr 1, 2021
@mmatera
mmatera merged commit 2c1dc75 into masterApr 1, 2021
@mmatera
mmatera deleted the iteratedconditionset branch April 1, 2021 22:04
Sign up for freeto 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.

2 participants

@mmatera@rocky