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

inconsistency for variables method, leads to errors in differentiation #3779

Closed
robertwb opened this issue Aug 6, 2008 · 6 comments
Closed

Comments

@robertwb
Copy link
Contributor

robertwb commented Aug 6, 2008


Hi William:

I was running Sage 3.0.2 on Linux when the error occurred.  Just now i
upgraded to 'sage-3.0.6-i686-Linux-debian-intel' without problems, ran
the same code (in a notebook and on the command line), and got the
same error.  Hmm, i don't understand why Sage can do 'diff(f*SR(2),x)'
but not 'diff(f*SR(1),x)'.

Alex

This boils down to the fact that some symbolic objects take an extra argument in their variables method. It is unclear what the meaning of this argument is (couldn't find any examples) and if it should be removed, or added, to make things consistent. (I'd guess removed, but I don't want to break things.)

Component: calculus

Issue created by migration from https://trac.sagemath.org/ticket/3779

@garyfurnish
Copy link
Mannequin

garyfurnish mannequin commented Aug 6, 2008

comment:1

The argument doesn't exist in symbolics, so I'm in favor of removal (and I have no idea what it does either)

@mwhansen
Copy link
Contributor

mwhansen commented Aug 6, 2008

comment:2

The argument was used to pass in additional variables to the variables method which would then be subsequently returned. This functionality was never used, and I can't / couldn't think of a case where it would be needed. So, I do think the correct fix is to remove it. I've attached a patch which does that and passes tests.

@mwhansen mwhansen assigned mwhansen and unassigned garyfurnish Aug 6, 2008
@mwhansen mwhansen modified the milestones: sage-3.1.1, sage-3.1 Aug 6, 2008
@robertwb
Copy link
Contributor Author

robertwb commented Aug 7, 2008

comment:3

Attachment: trac_3779.patch.gz

Looks good to me, and fixes the bug. The only question I had is why you wrote tuple([]) rather than (), but I'm OK with that.

@mwhansen
Copy link
Contributor

mwhansen commented Aug 7, 2008

comment:4

There's no real reason -- it's just what I happened to type :-)

@mwhansen
Copy link
Contributor

Attachment: trac_3779-2.patch.gz

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Aug 10, 2008

comment:5

Merged both patches in Sage 3.1.alpha1

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Aug 10, 2008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants