<HTML>
<HEAD>
<TITLE>
</TITLE>
</HEAD>
<BODY>

<?php

// Math functions in PHP

echo "<B>M_PI :</B> ", M_PI, "<BR>";

echo "<B>abs(-3.5):</B> ", abs(-3.5), "<BR>";
// echo abs("-3.5"), "<BR>"; // OK

echo '<B>base_convert("60",10,16): </B>',
	 base_convert("60",10,16), 
	'<BR>';
// echo base_convert(60,10,16), '<BR>'; // OK

echo "<B>pow(2.5,2):</B> ", pow(2.5,2), "<BR>";

echo "<B>exp(2):</B> ", exp(2), "<BR>";

echo "<B>25 % 7:</B> ", 25 % 7, "<BR>";
echo "<B>fmod(2.8,1.5):</B> ", fmod(2.8,1.5), "<BR>";
// echo 2.8 % 1.5, "<BR>"; // Don't do that.

echo "<B>log(2.7): </B>", log(2.7), "<BR>";
echo "<B>log(16,2):</B> ", log(16,2), "<BR>";
echo "<B>log(1000,10): </B>", log(1000,10), "<BR>";
echo "<B>log10(1000): </B>", log10(1000), "<BR>"; // Same as the above statement

echo "Now random numbers: <P><BR>\n";

echo "<B>rand(): </B>", rand(), "<BR>";
echo "<B>Another call for rand(): </B>", rand(), "<BR>";

echo "Click refresh to see if the next time you'll get the same values 
returned by rand or not.<BR>";

echo "<B>rand(150,1000): </B>", rand(150,1000), "<BR>";

echo "<B>getrandmax()</B>: ", getrandmax(), "<BR>";
echo "<B>mt_getrandmax()</B>: ", mt_getrandmax(), "<BR>";

echo "<B>lcg_value:</B>", lcg_value(), "<BR>";
echo "<B>Another call for lcg_value:</B>", lcg_value(), "<BR>";

echo "Click refresh to see if the next time you'll get the same values
returned by lcg_value or not.<BR>";

echo "<B>mt_rand(): </B>", mt_rand(), "<BR>";
echo "<B>Another call for mt_rand(): </B>", rand(), "<BR>";

echo "Click refresh to see if the next time you'll get the same values
returned by rand or not.<BR>";

echo "<B>mt_rand(150,1000): </B>", mt_rand(150,1000), "<BR>";

?>

</BODY>
</HTML>
