Implements the mathematical floor function, i.e. returns the input value if it is an integer, otherwise returns the largest integer below the input value.
Implements the mathematical floor function, i.e. returns the input value if it is an integer, otherwise returns the largest integer below the input value.
For positive numbers, the decimals will be simply dropped. For negative numbers, it will also truncate the displayed decimals but the integer part of the absolute value displayed is incremented. This is the mathematical definition of the IEEE rounding mode toward minus infinite.
| num | floor | ceil |
|---|---|---|
| -0.999999999999998334665463062265 | -2 | 0 |
| -0.999999999999998334665463062266 | -2 | 0 |
| -0.999999999999998334665463062267 | -2 | 0 |
| -0.999999999999999444888487687420 | -2 | 0 |
| -0.999999999999999444888487687421 | -2 | 0 |
| -0.999999999999999444888487687422 | -1 | -1 |
| 0.(322)01 | -1 | 1 |
| 0.(323)01 | 0 | 0 |
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.