The toy doping model checks majority type and margin only. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
Donors make the toy majority ledger n-type
Two intrinsic electrons plus 6 donors gives 8 electrons against 2 holes, so the margin is 6.
n=2+6=8,Δ=6
Acceptors make the toy majority ledger p-type
Five acceptors with two intrinsic holes gives 7 holes against 2 electrons.
p=2+5=7
Equal donor and acceptor additions are a boundary case
Four donors and four acceptors give equal toy ledgers and margin 0.