Commit 75543a7
committed
test(java): give the float primitive assertion a value that discriminates
Thirteenth full-range review: APPROVE, 0 blocking. The one important finding is a
test with no teeth rather than a code defect, which is a first for this range.
floatShapesAllUseTheGoFormatter claimed to cover all three float carriers but
pinned only two: FloatHolder.getPrimitive() returned 0.1f, and Jackson's default
writeNumber(float) also emits "0.1", so the assertion could not tell the
registered path from the default one. Deleting the Float.TYPE registration left
all 336 tests green. The reviewer established the registration is load-bearing
before blaming the test — with 1e20f the output is 1.0E20 without it — which is
the right order of inference. Now 1e-7f, where Go gives "1e-7" and Jackson gives
"1.0E-7", and the case goes red when the registration is removed.
Two counts corrected, both mine:
- "11 low subnormals" is 9. Re-counted exhaustively over float32 subnormals,
bits 1..0x7FFFFF, by output bytes changing — the same convention the
double-side figure uses: patterns 1, 2, 3, 4, 6, 7, 21, 29, 71. The javadoc
now names the range and the convention, which the double figure already did
and this one did not.
- The main-code comment still said "over 50 divergences in a 200k random sweep"
after the test comment and llmdoc had both been corrected to 11-13 for uniform
sampling. Three places quoting one measurement, two updated, one missed.
Also recorded a forward-looking warning the reviewer raised beyond its findings:
pine-cpp has no float32 path today (Variant::value_t holds only double), so no
divergence exists — but adding one by widening to double and calling
go_format_json_number would reproduce exactly the trap the Java side just
handled, including that the threshold must be compared against the shortened
decimal rather than the widened value.
336 Java tests, 247 C++ cases, lint, codegen-check, cross-validate 55/55,
differential-fuzz 1000/1000. The reviewer additionally ran real Go and Java
servers against fixture 06 and got cmp-identical bodies, and swept 8,388,607
float32 subnormals plus 2,000,000 double subnormals with zero divergences.1 parent 03a98de commit 75543a7
3 files changed
Lines changed: 36 additions & 4 deletions
File tree
- llmdoc/reference
- pine-java/src
- main/java/page/liam/pine
- test/java/page/liam/pine
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
| |||
197 | 200 | | |
198 | 201 | | |
199 | 202 | | |
200 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
201 | 207 | | |
202 | 208 | | |
203 | 209 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
276 | 280 | | |
277 | 281 | | |
278 | 282 | | |
| |||
284 | 288 | | |
285 | 289 | | |
286 | 290 | | |
287 | | - | |
| 291 | + | |
288 | 292 | | |
289 | 293 | | |
290 | 294 | | |
| |||
0 commit comments