Repository navigation
Commit 04e9cc5
committed
compiler: Keep a real literal at a half-precision Operator's precision
`_prec` floors an untyped real literal at `float32` so that an integer
default doesn't degrade the arithmetic around it. That floor also caught
`float16`, which is never a fallback but an explicit request, so every
literal in a half-precision Operator printed one type too wide.
Only apply the floor when the default is not already a real type.1 parent 32b54e9 commit 04e9cc5
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
82 | 89 | | |
83 | 90 | | |
84 | 91 | | |
| |||
0 commit comments