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
The expected answer above is 0. Sage documents unit_step as evaluating to 1 for all nonnegative inputs, so unit_step expressions should only simplify to 0 when the input is known to be strictly negative.
Granted -- when one is truly using unit_step as a distribution (that is, integrating against it), Sage should be allowed to ignore the edge case.
Actual Behavior
Sage is simplifying unit_step(t) to 0 anytime it can deduce t <= 0.
Additional Information
I suspect the problem could be unintended semantics here -- but I don't understand Sage internals/dependencies well enough to be sure.
Thanks!
Environment
Tested with `SageMath version 10.1, Release Date: 2023-08-20`, `Using Python 3.11.5`, on Arch Linux.
Checklist
I have searched the existing issues for a bug report that matches the one I want to file, without success.
I have read the documentation and troubleshoot guide
The text was updated successfully, but these errors were encountered:
I think the problem is that (by default) simplify is performed by maxima, and maxima's convention is that the function is 0 at 0. The easiest fix would be to change our definition of unit_step to be consistent with maxima, but I'm not sure that's a good idea, especially if (has been discussed) we are thinking of moving away from using maxima as the default in the long run.
Steps To Reproduce
Sage gives this paradoxical simplification:
Expected Behavior
The expected answer above is
0
. Sage documentsunit_step
as evaluating to1
for all nonnegative inputs, sounit_step
expressions should only simplify to0
when the input is known to be strictly negative.Granted -- when one is truly using
unit_step
as a distribution (that is, integrating against it), Sage should be allowed to ignore the edge case.Actual Behavior
Sage is simplifying
unit_step(t)
to0
anytime it can deducet <= 0
.Additional Information
I suspect the problem could be unintended semantics here -- but I don't understand Sage internals/dependencies well enough to be sure.
Thanks!
Environment
Checklist
The text was updated successfully, but these errors were encountered: