Funkcja podłogi
Podłoga zawsze zaokrągla się w dół w kierunku ujemnej nieskończoności, co jest szczególnie ważne w przypadku liczb ujemnych.
Kalkulator zaokrągleń
Wprowadź liczbę i wybierz preferencje zaokrąglania
|
🪄 Szybkie przykłady
📋 Jak to działa
Jak to działa
1
Krok 1
Choose the target precision or place value.
2
Krok 2
Drop extra digits and move downward toward negative infinity.
3
Krok 3
Return a value that is never greater than the original at that precision.
📊 Przykłady
Sprawdzone przykłady
Examples highlight where floor and truncate differ on negatives.
| Wejście | Cel | Metoda | Wynik |
|---|---|---|---|
| 2.99 | Najbliższa liczba całkowita | Zaokrąglij w dół (podłoga) | 2 |
| -2.01 | Najbliższa liczba całkowita | Zaokrąglij w dół (podłoga) | -3 |
| 12.309 | Najbliższa setna (2 dp) | Zaokrąglij w dół (podłoga) | 12.30 |
Wskazówki
Typowe błędy
Unikaj częstych błędów zaokrąglania podczas sprawdzania poprawności wyników.
- Treating floor as simple digit cut-off.
- Expecting floor to behave like nearest rounding.
- Using floor when toward-zero behavior is required.
- Ignoring sign when validating test results.
❓ Często zadawane pytania
Często zadawane pytania
Is floor the same as truncate?
No. Floor moves toward negative infinity while truncate moves toward zero.
How does floor work for negatives?
Negative numbers become more negative whenever there is a remainder.
When is floor useful?
Floor is useful for conservative lower-bound calculations.
Can I compare floor and ceiling quickly?
Yes. Related links let you test the same inputs under both methods.