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
 

