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
Wolfram language reference for Condition states that a condition within the Module, Block, and With statements:
lhs:=Module[{vars},rhs/;test]
applies to the lhs, i.e., it's added as a condition to the lhs. Presently, the condition is not added to the lhs in Mathics. See also the additional qualification in Additional context.
This workaround returns Indeterminate when the condition is false. Also, it only works when Condition is the only statement within the With block. It's a bad hack, but works for Rubi for now.
Description
Wolfram language reference for Condition states that a condition within the
Module
,Block
, andWith
statements:applies to the
lhs
, i.e., it's added as a condition to thelhs
. Presently, the condition is not added to thelhs
in Mathics. See also the additional qualification in Additional context.How to Reproduce
Mathics:
and Mathematica:
Output Given
Expected behavior
Your Environment
Workarounds
This workaround returns
Indeterminate
when the condition is false. Also, it only works whenCondition
is the only statement within theWith
block. It's a bad hack, but works for Rubi for now.Priority
Medium; results in
Indeterminate
results when a rule is picked, but eventually the condition withinWith
is false.Additional context
Note that the condition is considered for$14.1.0$ .
lhs
only if it's a part of the last statement, as shown below for MathematicaThe text was updated successfully, but these errors were encountered: