PHP數學函數試題

來源:互聯網
上載者:User

標籤:

1.求絕對值的函數是什嗎?

2.在任意進位之間轉換數位函數是什嗎?

3.二進位轉換為十進位,十進位轉換為二進位,十六進位轉換為十進位,十進位轉換為十六進位,八進位轉換為十進位,十進位轉換為八進位的函數分別是什嗎?

4.向上取值,向下取值,四捨五入的函數分別是什嗎?

5.找出某數組中最大值和最小值的函數是什嗎?

6.產生隨機數的兩個函數分別是什嗎?哪個更快,快多少?

7.得到圓周率值π的函數是什嗎?

8.x的y次方怎麼表示?x的平方根怎麼表示?

 

 

答案

1.number abs ( mixed $number )

2.string base_convert ( string $number , int $frombase , int $tobase )

3.bindec(),decbin(),hexdec(),dechex(),octdec(),decoct()

4.ceil($number),floor($number),round($number [,$precision)

5.max($array),min($array)

6.mt_rand($min,$max),rand($min,$max);mt_rand函數比rand快4倍

7.pi();

8.pow(x,y); sqrt(x);

PHP數學函數試題

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.