Quotient
The integer quotient of by — for Gaussian integers, rounded to the nearest lattice point.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
Quotient!Quotient(m, n) for integers; rounded half-even in each part for Gaussian integersSageMath
floor((m) / (n))✓Oscarfld(ZZ(m), ZZ(n))Juliafloor(ZZRingElem, QQ(m) / QQ(n))Rustquotient(m, n)Typed signatures
| Type | Package | Applies |
|---|---|---|
(number, number, number?) -> number | number-theory | always |
Details
- For integers, , so with the remainder taking the sign of .
- For Gaussian integers the quotient rounds instead, ties to even, which is what makes Euclidean: the remainder then has smaller norm than .
- compute-engine has no Quotient; this follows Wolfram's.
Plot
Examples
27 more kept as data, checked against the oraclesScope #
About
| Examples | 38 |
|---|---|
| Checked against | Wolfram Language 35 agree2 differSageMath 11 agree26 errorSymPy 24 agree8 differ4 unevaluated1 errorOscar 5 agreeJulia 10 agree27 errorRust 5 agree6 error |
| Crosswalk | Wolfram LanguageSageMathOscarJuliaRust |
Implementation
mapped
oscarpackages/oracle/src/mappings.tsmapped
wolframpackages/oracle/src/mappings.tsmapped
wolframpackages/oracle/src/mappings.tsmapped
sympypackages/oracle/src/mappings.tsSymPy has no Quotient: // on SymPy numbers is the floor of the exact quotient, so a Gaussian integer is floored part by part where ours rounds each part to the nearest.
mapped
sagepackages/oracle/src/mappings.tsmapped
juliapackages/oracle/src/mappings.tsmapped
rustpackages/oracle/src/mappings.ts