Operators
Division (/)
Matches all 198 recorded answers
Recorded: 198 workbook cells. How we measure this · See the Rust code
No local names are recorded for this entry.
What it does
number1 / number2
A / B converts each operand to a number and returns the IEEE-754 binary64 quotient, rounded
once to nearest with ties to even — except that a zero divisor does not produce an IEEE
infinity but a worksheet error.
Everything else is the shared story: / never sees a cell, and each operand is converted by
the to-number rules of coercion and lifting.
Arguments
| Position | Name | Meaning |
|---|---|---|
| 0 | A | Dividend (numerator). Required. |
| 1 | B | Divisor (denominator). Required. |
Arity is exactly 2; no optional arguments, no defaults. Order is load-bearing. In the array
case, the divisor position is where the interesting failures live: a single zero anywhere in
a broadcast divisor array produces #DIV/0! in exactly the coordinates it reaches, not in
the whole result — per-cell failures stay per-cell under the lifting rule of chapter 02.
Try it
Quirks
Result and edge cases
- Zero divisor.
#DIV/0!, including the0/0case. Chapter 01 also lists division by an empty cell as a documented cause of#DIV/0!, which is a useful hint about the family's Empty policy — but the Handbook has not recorded that behaviour for/against Excel and does not assert it here. - Text and logical operands. Shared to-number rules.
- Exactness. Division is exact only when the quotient is representable — mainly powers of
two and small integer ratios.
1/3,1/10and most currency ratios are not exact, which is the root of the classic "my totals are off by a cent" report. The operator is not at fault; binary64 has no exact tenth.
How to implement
Notes for implementers
- Check the divisor after coercion, not before.
"0"as text coerces to zero and must reach the same#DIV/0!lane as numeric zero; a pre-coercion check on the raw value misses it. - Do not strength-reduce
a/bintoa * (1/b). The reciprocal introduces a second rounding and changes results in the last bit. Compilers do this under fast-math flags; a compatibility implementation must forbid them. - A negative zero divisor is still a zero divisor.
x / -0must take the#DIV/0!lane, not produce a negative infinity. - In the array case, produce the error per coordinate. Collapsing the whole result to
#DIV/0!because one cell divided by zero contradicts the per-cell failure rule of chapter 02.
Rust code
Show the CalcFunc source of this function
Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.
/ infix · 1 lines · calc-func/src/catalogue/arithmetic.rs on GitHubCatalogueEntry::operator(DIVIDE, "/", Notation::Infix, NUMBERS, divide)
Kernels shared with other functions
dividecatalogue/arithmeticflushedcatalogue/arithmeticbinarycatalogue/arithmeticoperandscatalogue/arithmetic
Argument and result plumbing
CatalogueEntry::operatorcatalogue
No implementation has been published with a Handbook test suite for this function.
Version differences
No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.
Alternatives
Relationships
FUNC.OP_MULTIPLY— the inverse operation.a/banda*(1/b)are not the same double in general: the second rounds twice.QUOTIENT— integer division, returning the truncated integer part. Different function, different error surface.MOD— the remainder companion.MODhas its own sign convention (it follows the divisor) which does not match the truncation implied byQUOTIENT; do not assumea = b*QUOTIENT(a,b) + MOD(a,b)without checking.IFERROR,IFNA— the usual wrappers readers reach for when a divisor may be zero.IFERRORmasks every error, not only#DIV/0!, which is a common source of hidden bugs.IMDIV— complex division over text-encoded complex numbers.
Named variants
No named variants are recorded yet.
Suggest a correction or contribute an implementation · For agents