aboutsummaryrefslogtreecommitdiff
path: root/tests/MathTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/MathTest.php')
-rw-r--r--tests/MathTest.php38
1 files changed, 30 insertions, 8 deletions
diff --git a/tests/MathTest.php b/tests/MathTest.php
index 65d8eac..1e5da5a 100644
--- a/tests/MathTest.php
+++ b/tests/MathTest.php
@@ -545,26 +545,48 @@ class MathTest extends TestCase
/**
* Expressions data provider
*
- * Most tests can go in here. The idea is that each expression will be evaluated by MathExecutor and by PHP with eval.
+ * Most tests can go in here. The idea is that each expression will be evaluated by MathExecutor and by PHP directly.
* The results should be the same. If they are not, then the test fails. No need to add extra test unless you are doing
* something more complex and not a simple mathmatical expression.
*/
public function providerExpressionValues()
{
return [
- ['arcsec(4)', 1.3181160716528],
+ ['arccos(0.5)', 1.0471975511966],
+ ['arccos(0.5)', acos(0.5)],
+ ['arccosec(4)', 0.2526802551421],
+ ['arccosec(4)', asin(1/4)],
+ ['arccot(3)', M_PI/2 - atan(3)],
+ ['arccotan(4)', 0.2449786631269],
+ ['arccotan(4)', M_PI/2 - atan(4)],
['arccsc(4)', 0.2526802551421],
+ ['arccsc(4)', asin(1/4)],
+ ['arcctg(3)', M_PI/2 - atan(3)],
+ ['arcsec(4)', 1.3181160716528],
+ ['arcsec(4)', acos(1/4)],
+ ['arcsin(0.5)', 0.5235987755983],
+ ['arcsin(0.5)', asin(0.5)],
+ ['arctan(0.5)', atan(0.5)],
['arctan(4)', 1.3258176636680],
+ ['arctg(0.5)', atan(0.5)],
+ ['cosec(12)', 1 / sin(12)],
['cosec(4)', -1.3213487088109],
+ ['cosh(12)', cosh(12)],
+ ['cot(12)', cos(12) / sin(12)],
+ ['cotan(12)', cos(12) / sin(12)],
['cotan(4)', 0.8636911544506],
+ ['cotg(3)', cos(3) / sin(3)],
+ ['csc(4)', 1 / sin(4)],
+ ['ctg(4)', cos(4) / sin(4)],
+ ['ctn(4)', cos(4) / sin(4)],
+ ['decbin(10)', decbin(10)],
+ ['lg(2)', 0.3010299956639],
+ ['lg(2)', log10(2)],
+ ['ln(2)', 0.6931471805599],
+ ['ln(2)', log(2)],
['sec(4)', -1.5298856564664],
['tg(4)', 1.1578212823496],
- ['arcsin(0.5)', 0.5235987755983],
- ['arccosec(4)', 0.2526802551421],
- ['arccos(0.5)', 1.0471975511966],
- ['arccotan(4)', 0.2449786631269],
- ['ln(2)', 0.6931471805599],
- ['lg(2)', 0.3010299956639],
];
}
+
} \ No newline at end of file