FN-TBILLEQ-001: For bills longer than 182 days TBILLEQ is a quadratic, not the documented formula
Documentation differs from behaviour · measured · recorded 2026-11-04
When DSM is above 182, TBILLEQ does not use the documented formula. It uses the bond-equivalent quadratic (-t + sqrt(t^2 - (2t-1)(1 - 1/p))) / (t - 1/2), with t = DSM/365 and p = price/100. At DSM 366, a bill across a 29 February, t is 1 and not 366/365. The square root is taken in extended precision and stored, RN53(RN64(sqrt)); the rest is binary64. For the row below, DSM 203, the documented formula gives 0.244038 and Excel 0.241103. Excel's bits are 22 units below the correctly rounded quadratic because of that staging.
Documentation: TBILLEQ is calculated as TBILLEQ = (365 x rate)/(360-(rate x DSM)); the page does not mention 182 days. Source documentation
| Call and input route | Inputs | Excel | Correct value | Recorded in |
|---|---|---|---|---|
TBILLEQ(40633.25, 40836.25, 0.21193100748125787)cell-value2 | settlement: 40633.250x40e3d72800000000maturity: 40836.250x40e3f08800000000discount: 0.211931007481257870x3fcb208e2511f676 | 0.241103264184507920x3fcedc78c550cec1 | 0.241103264184508530x3fcedc78c550ced7 | Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H |
TBILLEQ(53886, 54252, 0.4522540814812992)cell-value2 | settlement: 538860x40ea4fc000000000maturity: 542520x40ea7d8000000000discount: 0.45225408148129920x3fdcf1bb1a5c75f4 | 0.72113036774069130x3fe7137ffe3328bc | — | Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H |
Correct value: mpmath at 800 bits: the exact quadratic at the binary64 inputs, correctly rounded.
Basis: 2,400 of 2,400 recorded rows with the stored square root; 2,399 without it. All 33 recorded rows with a number answer at DSM 366 fit t = 1, and none of the 17 of them in the run below fits 366/365.
Evidence and capture sources
- DnaCalc · crates/calc-func/tests/f3_financial.rs 26bb1800d3b349e44d594bed5f8bb589b528ef10 · lines 435-466 recorded answers pinned
- DnaCalc-Research · evidence/round23/tbilleq-hard/summary.json f1774082865e3a5ab7dec27ead7aeebb73b078c2 · counts staged square root against alternatives
- DnaCalc · crates/calc-func/src/ported/discount_bill_yearfrac_family.rs 26bb1800d3b349e44d594bed5f8bb589b528ef10 · lines 388-410 the arithmetic in the product
- CalcFunc-Evidence · runs/w111-5-20260924/answers/answers-w1115-tbilleq.json.gz 4d5320dfdc385354469b4d506153357bb932ab08 · w1115-TBILLEQ-01109
- CalcFunc-Evidence · runs/w111-5-20260924/answers/answers-w1115-tbilleq.json.gz 4d5320dfdc385354469b4d506153357bb932ab08 · w1115-TBILLEQ-00179