Additional tests Hacktoberfest (#77)
* Additional tests Co-authored-by: diman3210 <diman-3210@mail.ru>
This commit is contained in:
parent
e28c1bf9e7
commit
761ac50344
1 changed files with 30 additions and 8 deletions
|
@ -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],
|
||||
];
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue