Opened 2 months ago
Last modified 4 weeks ago
#27314 new defect
Can't solve symbolic equations containing inexact (e.g. RIF, RBF) numbers
Reported by: | rburing | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.8 |
Component: | symbolics | Keywords: | RIF, RBF, solve |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
There are (undocumented?) symbolic wrappers around RIF
, RBF
objects, but solving equations with them
sage: var('x') sage: solve(x + RIF(0.999,1.001) == 0, x)
fails because the inexact objects cannot be converted to Maxima objects.
This is confusing to new users; see Ask SageMath: long traceback when calling solve().
Specifying algorithm='sympy'
gives a solution but loses information about precision.
The least thing that could be done is for solve(eqn, x)
to check eqn.is_exact()
and give a warning.
Change History (2)
comment:1 Changed 2 months ago by
comment:2 Changed 4 weeks ago by
- Milestone changed from sage-8.7 to sage-8.8
Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually)
One notes that numerical root seeking via
find_root
also fails for both RIF and RBF :Extending
find_root
to handle RIF and RBF expressions would allow to handle the cases where no explicit form of a root solution is known (e. g. implicit expressions resulting ofsolve
), wherefind_root
allows to compute a numerical approxomation.This would certainly be handy (but is probably a significant project in itself !).
It might also be useful to check which of the optimization functions in Sage support such uncertainty handling...