"ceil" in Chinese (Traditional)
向上取整 (數學)
Definition
將一個數字向上取整到下一個整數,即使它已經是整數。常用於數學和程式設計。
Usage Notes (Chinese (Traditional))
“Ceil” 通常用在技術、數學或程式設計領域,在日常對話中較少見。它僅向上取整,和“round”(四捨五入)不同。不要和“天花板”(ceiling)混淆。
Examples
The function will ceil 2.3 to 3.
該函數會把2.3**向上取整**到3。
If you ceil 4, you still get 4.
如果你把4**向上取整**,結果還是4。
You should ceil the price before tax is added.
你應在加稅前把價格**向上取整**。
I always ceil my calculations to avoid surprises later.
我總是**向上取整**計算結果,以免有意外。
Remember to ceil any decimal values, just in case.
記得把任何小數都**向上取整**,以防萬一。
In most programming languages, you can use a ceil function to do this automatically.
在大多數程式語言中,你可以用**向上取整**函數自動完成這個操作。