Floor
The greatest integer less than or equal to x: .
✓ checked against that system · ! checked, with disagreements (hover a chip)Wikipedia
Floor and ceiling functionsFloor functionMathWorldFloorFunctionWikidataQ56860783FungrimFloor✓Fungrim entryWolfram LanguageFloor!Floor(x)the greatest integer , .Floor(x, step)the greatest multiple of step at or below x.Typed signatures
| Type | Package | Applies |
|---|---|---|
(x: real | signed_infinity | ~oo, step: real?) -> real | signed_infinity | ~oo | analyticreplaces compute-engine | always |
(x: real | signed_infinity | ~oo, step: real?) -> real | signed_infinity | ~oo | compute-engine | always |
(any, any?) -> any | structuresreplaces analytic | always |
Details
- The greatest integer : .
- Rounds toward , not toward 0 -- so , not .
- For a non-integer x, . See Ceil.
- .
- Threads element-wise over a list.
- A second argument floors to the nearest multiple of it -- the step needn't be an integer.
- The second argument is a step, a multiple to floor to, as in Wolfram's
Floor[x, a]: . Round's second argument is a step too. Round breaks ties to even, as Wolfram does (see Round).
Examples
4 more kept as data, checked against the oraclesScope #
Two-argument floor to a multiple of 2: a branch per multiple, the zero stretch the default
live ↗InOut
live ↗
InOut
Applications #
Properties #
The imaginary part is already an integer
live ↗InOut
Known value · Wolfram MathematicalFunctionData, Floor
Complex input: each part rounds down,
live ↗InOut
Known value · Wolfram MathematicalFunctionData, Floor
Possible issues #
About
| Examples | 48 |
|---|---|
| Checked against | Wolfram Language 46 agree2 differSageMath 38 agree1 unevaluated1 errorSymPy 39 agree1 differ1 unevaluatedmpmath 21 agree1 errorOscar 19 agreeJulia 32 agree4 errorRust 29 agree2 error |
| Crosswalk | Wikipedia ×2MathWorldWikidataFungrimFungrim entry ×12Wolfram LanguageSageMathSymPympmathOscarJuliaRust |
Implementation
mapped
oscarpackages/oracle/src/mappings.tsmapped
wolframpackages/oracle/src/mappings.tsmapped
sympypackages/oracle/src/mappings.tsmapped
mpmathpackages/oracle/src/mappings.tsmapped
sagepackages/oracle/src/mappings.tsmapped
rustpackages/oracle/src/mappings.tsmapped
juliapackages/oracle/src/mappings.ts