-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
logarithm with base 0 should raise an error #38971
Comments
Probably because We do have On the other hand the behavior is not entirely consistent either:
But:
And:
Meanwhile the documentation of
|
Because of the limit interpretation, the value of 0 probably makes sense to a physicist (or engineer), but I think it is clearly incorrect from a mathematical point of view, because the definition of If anyone thinks this may be controversial, we should ask for opinions on sage-devel. |
Actually, since the change could break code (and the bug has been around for a long time, so fixing it is not urgent), I think the first step would be to deprecate the use of 0 as a base. (I expect 10.5 to be released soon, so I think this will have to wait for 10.6.) A year later, we can make it raise an error. Probably the deprecation should be mentioned on sage-devel, to see if there are any objections. |
There's also the issue that testing if a symbolic expression is zero is a very nontrivial problem, but I'm not sure this is a serious roadblock here. |
Steps To Reproduce
No response
Expected Behavior
Logarithms with a base of 0 do not exist, so trying to calculate one should raise a
ValueError
.Actual Behavior
Sagemath seems to think that logarithms with a base of 0 are equal to 0:
Additional Information
No response
Environment
Checklist
The text was updated successfully, but these errors were encountered: