Commit 42e435c
Numeric tower: (float x) narrows to 32-bit float precision
float.cljc asserts (float r/min-double) equals (float 0.0) because
the value underflows the 32-bit float range, and (float r/max-double)
/ (float ##Inf) / (float ##-Inf) all throw because they exceed it.
mino had (float x) as an identity-on-floats / cast-on-numbers --
no precision narrowing, no range check.
Update prim_float: range-check against [-FLT_MAX, FLT_MAX] (NaN
exempt, passes through; Inf and overflow throw eval/type MTY001),
then narrow precision via (double)(float)d which routes through
the hardware float-cast.
Internal suite 1476 / 7087 / 0. float.cljc 15/0/4 -> 19/0/0.
Partial of the Group C.2 plan: narrows the cast contract without
introducing a distinct MINO_FLOAT32 value type. (float? x) /
(double? x) distinctions remain a JVM-only divergence.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent dccffad commit 42e435c
4 files changed
Lines changed: 32 additions & 11 deletions
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
1711 | 1712 | | |
1712 | 1713 | | |
1713 | 1714 | | |
| 1715 | + | |
1714 | 1716 | | |
1715 | 1717 | | |
1716 | 1718 | | |
1717 | 1719 | | |
1718 | 1720 | | |
1719 | | - | |
1720 | | - | |
1721 | | - | |
1722 | | - | |
1723 | | - | |
1724 | | - | |
1725 | | - | |
1726 | | - | |
1727 | | - | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
1728 | 1743 | | |
1729 | 1744 | | |
1730 | 1745 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| |||
0 commit comments