public function testNegativePiToDegree() { $rad = \MyOddWeb\BigNumber(\MyOddWeb\BigNumber::pi())->ToDegree(10); $rad->Mul(-1); $z = $rad->ToString(); $this->assertSame("-180", $z); }
date_default_timezone_set("UTC"); use MyOddWeb\BigNumber; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta name="author" content="FFMG" /> <meta name="website" content="http://www.myoddweb.com" /> <title>Sample Implementation of BigNumber.php</title> </head> <body> <?php set_time_limit(180); include "src/bignumber.php"; $time_pre = microtime(true); $y = new BigNumber("123456789"); $y = new BigNumber("1234567890987654321"); $y->Div("123456789"); echo $y->ToString(), "<br>"; // 10000000008.00000007290000066339 $time_post = microtime(true); $exec_time = $time_post - $time_pre; echo "{$exec_time}ms<br>"; echo "<br />"; echo "BigNumber rules!"; ?> </body> </html>