63 lines
2.5 KiB
Diff
63 lines
2.5 KiB
Diff
From 9ac7840134054155545e24fa3e66402d42b91c0f Mon Sep 17 00:00:00 2001
|
|
From: Antonio Rojas <arojas@archlinux.org>
|
|
Date: Fri, 20 Jan 2023 21:36:27 +0100
|
|
Subject: [PATCH] Fix tests with giac 1.9.0.35
|
|
|
|
---
|
|
src/sage/libs/giac/giac.pyx | 3 +--
|
|
src/sage/symbolic/relation.py | 15 +++++----------
|
|
2 files changed, 6 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/src/sage/libs/giac/giac.pyx b/src/sage/libs/giac/giac.pyx
|
|
index 4e451dba5e7..ccad5169836 100644
|
|
--- a/src/sage/libs/giac/giac.pyx
|
|
+++ b/src/sage/libs/giac/giac.pyx
|
|
@@ -374,8 +374,7 @@ def _giac(s):
|
|
|
|
sage: x = libgiac('x')
|
|
sage: (1+2*sin(3*x)).solve(x).simplify()
|
|
- Warning, argument is not an equation, solving 1+2*sin(3*x)=0
|
|
- list[-pi/18,7*pi/18]
|
|
+ ...list[-pi/18,7*pi/18]
|
|
|
|
sage: libgiac.solve('sin(3*x)>2*sin(x)',x)
|
|
Traceback (most recent call last):
|
|
diff --git a/src/sage/symbolic/relation.py b/src/sage/symbolic/relation.py
|
|
index e9dbc0fea30..b8896a94be9 100644
|
|
--- a/src/sage/symbolic/relation.py
|
|
+++ b/src/sage/symbolic/relation.py
|
|
@@ -935,8 +935,7 @@ def solve(f, *args, **kwds):
|
|
|
|
sage: f = (sin(x) - 8*cos(x)*sin(x))*(sin(x)^2 + cos(x)) - (2*cos(x)*sin(x) - sin(x))*(-2*sin(x)^2 + 2*cos(x)^2 - cos(x))
|
|
sage: solve(f, x, algorithm='giac')
|
|
- ...
|
|
- [-2*arctan(sqrt(2)), 0, 2*arctan(sqrt(2)), pi]
|
|
+ ...[-2*arctan(sqrt(2)), 0, 2*arctan(sqrt(2)), pi]
|
|
|
|
sage: x, y = SR.var('x,y')
|
|
sage: solve([x+y-4,x*y-3],[x,y],algorithm='giac')
|
|
@@ -1440,19 +1439,15 @@ def _giac_solver(f, x, solution_dict=False):
|
|
EXAMPLES::
|
|
|
|
sage: solve([(2/3)^x-2], [x], algorithm='giac')
|
|
- ...
|
|
- [[-log(2)/(log(3) - log(2))]]
|
|
+ ...[[-log(2)/(log(3) - log(2))]]
|
|
sage: solve([(2/3)^x-2], [x], algorithm='giac', solution_dict=True)
|
|
- ...
|
|
- [{x: -log(2)/(log(3) - log(2))}]
|
|
+ ...[{x: -log(2)/(log(3) - log(2))}]
|
|
|
|
sage: f = (sin(x) - 8*cos(x)*sin(x))*(sin(x)^2 + cos(x)) - (2*cos(x)*sin(x) - sin(x))*(-2*sin(x)^2 + 2*cos(x)^2 - cos(x))
|
|
sage: solve(f, x, algorithm='giac')
|
|
- ...
|
|
- [-2*arctan(sqrt(2)), 0, 2*arctan(sqrt(2)), pi]
|
|
+ ...[-2*arctan(sqrt(2)), 0, 2*arctan(sqrt(2)), pi]
|
|
sage: solve(f, x, algorithm='giac', solution_dict=True)
|
|
- ...
|
|
- [{x: -2*arctan(sqrt(2))}, {x: 0}, {x: 2*arctan(sqrt(2))}, {x: pi}]
|
|
+ ...[{x: -2*arctan(sqrt(2))}, {x: 0}, {x: 2*arctan(sqrt(2))}, {x: pi}]
|
|
|
|
sage: x, y = SR.var('x,y')
|
|
sage: solve([x+y-7,x*y-10],[x,y],algorithm='giac')
|