Opened 4 years ago
Last modified 4 months ago
#24354 needs_review defect
RBF(expr) has the wrong parent
Reported by: | mmezzarobba | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | numerical | Keywords: | |
Cc: | slelievre | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
sage: RBF(psi(1,1/3)).parent() Symbolic Ring
Change History (5)
comment:1 Changed 14 months ago by
- Milestone changed from sage-8.2 to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
comment:2 follow-up: ↓ 3 Changed 12 months ago by
The generic symbolic evaluation is making at least two mistakes here. The code is at lines 1562-1568 of expression.pyx
try: res = self.operator()(*[R(a) for a in args]) except (TypeError, ValueError): pass else: if res.parent() is R: return res
With the input provided in the ticket description, it produces
sage: psi(RBF(1), RBF(1/3)) psi(1.000000000000000, [0.3333333333333333 +/- 7.04e-17])
This is bad since the proper way to make the call should have been psi(1, RBF(1/3))
.
Secondly, psi(1, RBF(1/3))
is broken as it should produce a ball
sage: psi(1, RBF(1/3)) psi(1, [0.3333333333333333 +/- 7.04e-17])
Is there a ticket to improve the RBF(expression)
?
comment:3 in reply to: ↑ 2 Changed 12 months ago by
Replying to vdelecroix:
Is there a ticket to improve the
RBF(expression)
?
None that I know of. (I started fixing the worst issues in #28517 and its dependencies, but didn't have the courage to handle all cases.)
comment:4 follow-up: ↓ 5 Changed 5 months ago by
- Cc slelievre added
- Component changed from PLEASE CHANGE to numerical
Should we close this ticket as invalid
or repurpose it to improve RBF(expr)
?
comment:5 in reply to: ↑ 4 Changed 4 months ago by
Replying to slelievre:
Should we close this ticket as invalid or repurpose it to improve
RBF(expr)
?
Close it, IMO. Improving RBF(expr)
will take several tickets, and this one provides no clear roadmap.
Now raises an error (thanks to #28517, I think). That's okay, though it would be even better to have a mechanism that makes this evaluation boil down to something like
RBF(CBF(1/3).psi(1))
.