endtoend-test-psl/tests/Psl/Math/ExpTest.php
2019-12-26 21:03:29 +01:00

40 lines
665 B
PHP

<?php
declare(strict_types=1);
namespace Psl\Tests\Math;
use PHPUnit\Framework\TestCase;
use Psl\Math;
class ExpTest extends TestCase
{
/**
* @dataProvider provideData
*/
public function testExp(float $expected, float $number): void
{
self::assertSame($expected, Math\exp($number));
}
public function provideData(): array
{
return [
[
162754.79141900392,
12.0,
],
[
298.8674009670603,
5.7,
],
[
Math\INFINITY,
1000000,
]
];
}
}