028-PHP common mathematical functions abs and acos and asin

? < PHP 
    Print (ABS ( - 13 is )); // print absolute value 

    @ -1 to a value acos print function 
    Print ( " <TABLE BORDER = \" 1 \ "> \ n- " ); 
    Print ( " <TR> <TH> X </ TH> <TH> ACOS (X) </ TH> </ TR> \ n- " );
     for ($ index = - . 1 ; $ index <= . 1 ; $ index + = 0.25 ) 
    { 
        Print ( " <TR> \ n- " ); 
        Print ( " <the TD> $ index </ the TD> \ n- " );
        print("<TD>" . acos($index) . "</TD>\n");
        print("</TR>\n");
    }
    print("</TABLE>\n");

    //  从 -1 到 1打印asin函数的值
    print("<TABLE BORDER=\"1\">\n");
    print("<TR><TH>x</TH><TH>asin(x)</TH></TR>\n");
    for($index = -1; $index <= 1; $index += 0.25)
    {
        print("<TR>\n");
        print("<TD>$index</TD>\n");
        print("<TD>" . asin($index) . "</TD>\n");
        print("</TR>\n");
    }
    print("</TABLE>\n");
?>

 

Guess you like

Origin www.cnblogs.com/tianpan2019/p/10988010.html