PHP MATHS [ Power function]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    PHP MATHS [ Power function]

    9 power can be expressed as :

    PHP Code:
    <?
    echo pow(19, 5);

    ?>
    Random numbers can be done this way
    PHP Code:
    echo rand();  //this method is slow

    echo mt_rand(); //this method is faster 4 times than the above one 
    Ronding floating points numbers to any significant digits

    PHP Code:
    echo round("20.937353",2);
    //we rounded the floating number to 2 significants digits 
Working...
X