Skip to content

Commit e6afe2a

Browse files
authored
[libc] Fix temporary types for fputil::split template. (#163813)
Fix #163711.
1 parent ccf5b3e commit e6afe2a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libc/src/__support/FPUtil/double_double.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ LIBC_INLINE constexpr NumberPair<T> split(T a) {
7777
NumberPair<T> r{0.0, 0.0};
7878
// CN = 2^N.
7979
constexpr T CN = static_cast<T>(1 << N);
80-
constexpr T C = CN + 1.0;
81-
double t1 = C * a;
82-
double t2 = a - t1;
80+
constexpr T C = CN + T(1);
81+
T t1 = C * a;
82+
T t2 = a - t1;
8383
r.hi = t1 + t2;
8484
r.lo = a - r.hi;
8585
return r;

0 commit comments

Comments
 (0)