Commit adb6921
Fix floating point type conversions when the result is in the denormal range (#20242)
The condition for generating a denormal (which we just flush to zero)
was incorrect. The new condition is very simple, checks that the biased
converted exponent would be <= 0 which is the definition of a denormal.
The added testcases show what is being fixed here. Prior to the fix,
these cases converted to some large values as the exponent wrapped
around!
Signed-off-by: Benoit Jacob <[email protected]>
Signed-off-by: Elias Joseph <[email protected]>1 parent 51db978 commit adb6921
2 files changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
| 399 | + | |
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
195 | 200 | | |
196 | 201 | | |
197 | 202 | | |
| |||
357 | 362 | | |
358 | 363 | | |
359 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
360 | 370 | | |
361 | 371 | | |
362 | 372 | | |
| |||
0 commit comments