summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-12-29 22:41:47 +0000
committerSam James <sam@gentoo.org>2022-12-29 22:42:01 +0000
commit40937d5af20e7e4d82592013d254a00d54c245c9 (patch)
tree4ab4d745ba3c6b737cd720e3b1505da26343b870 /sci-libs/libqalculate/files
parentdev-cpp/asio: Stabilize 1.24.0 ppc, #888902 (diff)
downloadgentoo-40937d5af20e7e4d82592013d254a00d54c245c9.tar.gz
gentoo-40937d5af20e7e4d82592013d254a00d54c245c9.tar.bz2
gentoo-40937d5af20e7e4d82592013d254a00d54c245c9.zip
sci-libs/libqalculate: add 4.5.0
Bug: https://bugs.gentoo.org/887369 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs/libqalculate/files')
-rw-r--r--sci-libs/libqalculate/files/libqalculate-4.5.0-tests.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/sci-libs/libqalculate/files/libqalculate-4.5.0-tests.patch b/sci-libs/libqalculate/files/libqalculate-4.5.0-tests.patch
new file mode 100644
index 000000000000..102b245a56b1
--- /dev/null
+++ b/sci-libs/libqalculate/files/libqalculate-4.5.0-tests.patch
@@ -0,0 +1,81 @@
+https://github.com/Qalculate/libqalculate/commit/e4c86b6124a3c8732f03dc1dfc8be9fac14a40eb
+
+From e4c86b6124a3c8732f03dc1dfc8be9fac14a40eb Mon Sep 17 00:00:00 2001
+From: Hanna K <hanna.knutsson@protonmail.com>
+Date: Wed, 28 Dec 2022 09:44:40 +0100
+Subject: [PATCH] Fix unit tests (issue #499); Fix some limits broken by
+ countTotalChildren() update
+
+--- a/libqalculate/MathStructure-limit.cc
++++ b/libqalculate/MathStructure-limit.cc
+@@ -595,7 +595,7 @@ bool calculate_limit_sub(MathStructure &mstruct, const MathStructure &x_var, con
+ }
+ }
+ }
+- if(!b_possible_zero && !b_fail && lhop_depth < 5 && !mzero.isOne() && !minfp.isOne() && mzero.countTotalChildren(false) + minfp.countTotalChildren(false) < 50) {
++ if(!b_possible_zero && !b_fail && lhop_depth < 5 && !mzero.isOne() && !minfp.isOne() && mzero.countTotalChildren(false) + minfp.countTotalChildren(false) < 250) {
+ //L'Hôpital's rule
+ MathStructure mden, mnum;
+ for(size_t i2 = 0; i2 < 2; i2++) {
+--- a/tests/calculus.batch
++++ b/tests/calculus.batch
+@@ -1,7 +1,7 @@
+ diff(6x^2)
+ 12x
+ diff(sinh(x^2)/(5x) + 3xy/sqrt(x))
+- 0.4 * cosh(x^2) - sinh(x^2) / (5x^2) + (3y) / (2 * sqrt(x))
++ 0.4 * cosh(x^2) + (3y) / (2 * sqrt(x)) - sinh(x^2) / (5x^2)
+
+ integrate(6x^2)
+ 2x^3 + C
+--- a/tests/solver.batch
++++ b/tests/solver.batch
+@@ -23,37 +23,37 @@ x^(-3x) = 2
+ x = e^lambertw(-ln(2) / 3) or x = e^lambertw(-ln(2) / 3, -1)
+
+ 1/3 * sin(3x) - 1/3 = 0
+- x = pi / 6 + (2/3) * pi * n
++ x = (2/3) * pi * n + pi / 6
+
+ 2/3 * sin(3x) - 1/3 = 0
+- x = (5/18) * pi + (2/3) * pi * n or x = pi / 18 + (2/3) * pi * n
++ x = (2/3) * pi * n + (5/18) * pi or x = (2/3) * pi * n + pi / 18
+
+ sin(x) + cos(x) = 1
+- x = 2 pi * n or x = pi / 2 + 2 pi * n
++ x = 2 pi * n or x = 2 pi * n + pi / 2
+
+ sin(x) = 1 + cos(x)
+- x = pi + 2 pi * n or x = pi / 2 + 2 pi * n
++ x = 2 pi * n + pi or x = 2 pi * n + pi / 2
+
+ sqrt(2) * cos(3x + pi/6) = 1
+- x = (2/3) * pi * n - (5/36) * pi or x = pi / 36 + (2/3) * pi * n
++ x = (2/3) * pi * n + pi / 36 or x = (2/3) * pi * n - (5/36) * pi
+
+ 2 * sin(3x/4) = 1
+- x = (10/9) * pi + (8/3) * pi * n or x = (2/9) * pi + (8/3) * pi * n
++ x = (8/3) * pi * n + (10/9) * pi or x = (8/3) * pi * n + (2/9) * pi
+
+ tan(x/4 + pi/3) = sqrt(3)
+ x = 4 pi * n
+
+ sqrt(3) * sin(x) + cos(x) = sqrt(3)
+- x = pi / 2 + 2 pi * n or x = pi / 6 + 2 pi * n
++ x = 2 pi * n + pi / 2 or x = 2 pi * n + pi / 6
+
+ sin(x)^2 = sin(x)^3
+- x = pi * n or x = pi / 2 + 2 pi * n
++ x = pi * n or x = 2 pi * n + pi / 2
+
+ sin(x) = sin(x/2)
+- x = 2 pi * n or x = 4 pi * n - (2/3) * pi or x = (2/3) * pi + 4 pi * n
++ x = 2 pi * n or x = 4 pi * n + (2/3) * pi or x = 4 pi * n - (2/3) * pi
+
+ sin(4x) + cos(2x) = 0
+- x = pi * n - pi / 12 or x = (7/12) * pi + pi * n or x = (pi * n) / 2 - pi / 4
++ x = pi * n + (7/12) * pi or x = pi * n - pi / 12 or x = (pi * n) / 2 - pi / 4
+
+ /set approximation try exact
+
+