mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[poincare/trigonometry] Fix wrong use of pi
In Trigonometry::shallowReduceInverseFunction, the reduction of atan(1/x) used the hard value of pi instead of its equivalent in the selected angle unit. This fixes a bug causing atan(1/tan(40°)) to be equal to π/2-40 instead of 50. Change-Id: Ifd7df5cd168fadf3146eee168c0bc2136ea15a7b
This commit is contained in:
committed by
Émilie Feral
parent
91d9438421
commit
857ca4eecd
@@ -948,7 +948,9 @@ QUIZ_CASE(poincare_simplification_trigonometry_functions) {
|
||||
assert_parsed_expression_simplify_to("atan(tan(1808))", "8", User, Degree);
|
||||
assert_parsed_expression_simplify_to("atan(tan(-180/7))", "-180/7", User, Degree);
|
||||
assert_parsed_expression_simplify_to("atan(√(3))", "60", User, Degree);
|
||||
assert_parsed_expression_simplify_to("atan(1/x)", "\u0012π×sign(x)-2×atan(x)\u0013/2", User, Degree);
|
||||
assert_parsed_expression_simplify_to("atan(1/x)", "\u0012π×sign(x)-2×atan(x)\u0013/2");
|
||||
assert_parsed_expression_simplify_to("atan(1/x)", "90×sign(x)-atan(x)", User, Degree);
|
||||
assert_parsed_expression_simplify_to("atan(1/x)", "100×sign(x)-atan(x)", User, Gradian);
|
||||
|
||||
// cos(asin)
|
||||
assert_parsed_expression_simplify_to("cos(asin(x))", "√(-x^2+1)", User, Degree);
|
||||
|
||||
Reference in New Issue
Block a user