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

floats - sage has some potentially confusing behavior #2093

Closed
bobmoretti mannequin opened this issue Feb 8, 2008 · 3 comments
Closed

floats - sage has some potentially confusing behavior #2093

bobmoretti mannequin opened this issue Feb 8, 2008 · 3 comments

Comments

@bobmoretti
Copy link
Mannequin

bobmoretti mannequin commented Feb 8, 2008

This is really confusing to calculus level students:

sage: x(x+1)
x + 1

There may be no good fix here, but one idea is to override call() on SmybolicVariable to raise an exception.

Component: calculus

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

@bobmoretti bobmoretti mannequin added c: calculus labels Feb 8, 2008
@bobmoretti bobmoretti mannequin self-assigned this Feb 8, 2008
@mwhansen
Copy link
Contributor

mwhansen commented Feb 8, 2008

comment:1

We sort of thought about this awhile ago, and it does raise an exception in cases there the thing being called is a constant.

sage: (sqrt(2) + 17)(x+2)
---------------------------------------------------------------------------
<type 'exceptions.ValueError'>            Traceback (most recent call last)

/opt/sage-2.10.1.rc0/devel/sage-main/sage/<ipython console> in <module>()

/opt/sage-2.10.1.rc0/local/lib/python2.5/site-packages/sage/calculus/calculus.py in __call__(self, *args, **kwargs)
   3778 
   3779             if len(args) > self.number_of_arguments():
-> 3780                 raise ValueError, "the number of arguments must be less than or equal to %s"%self.number_of_arguments()
   3781             
   3782             new_ops = []

<type 'exceptions.ValueError'>: the number of arguments must be less than or equal to 0

There is a fair amount of functionality that would be lost by removing function calls on symbolic objects.

@mwhansen mwhansen assigned mwhansen and unassigned bobmoretti Feb 8, 2008
@bobmoretti bobmoretti mannequin changed the title floats - sage is inconsistant at times floats - sage has some potentially confusing behavior Feb 8, 2008
@sagetrac-mabshoff sagetrac-mabshoff mannequin added this to the sage-2.10.2 milestone Feb 8, 2008
@garyfurnish
Copy link
Mannequin

garyfurnish mannequin commented Jul 14, 2008

comment:4

Should this be closed as not a bug?

@garyfurnish garyfurnish mannequin changed the title floats - sage has some potentially confusing behavior [invalid?] floats - sage has some potentially confusing behavior Jul 14, 2008
@burcin
Copy link

burcin commented Apr 16, 2009

comment:5

This was fixed by #5413. This call behavior is deprecated in 3.4.1.

@burcin burcin changed the title [invalid?] floats - sage has some potentially confusing behavior floats - sage has some potentially confusing behavior Apr 16, 2009
@burcin burcin closed this as completed Apr 16, 2009
@sagetrac-mabshoff sagetrac-mabshoff mannequin modified the milestones: sage-3.4.2, sage-3.4.1 Apr 20, 2009
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