@@ -44727,7 +44727,7 @@ static JSValue js_math_sumPrecise(JSContext *ctx, JSValueConst this_val,
44727
44727
JSValue iter, next, item, ret;
44728
44728
int done;
44729
44729
double d;
44730
- xsum_large_accumulator lacc ;
44730
+ xsum_small_accumulator acc ;
44731
44731
SumPreciseStateEnum state;
44732
44732
44733
44733
iter = JS_GetIterator(ctx, argv[0], /*async*/false);
@@ -44737,7 +44737,7 @@ static JSValue js_math_sumPrecise(JSContext *ctx, JSValueConst this_val,
44737
44737
next = JS_GetProperty(ctx, iter, JS_ATOM_next);
44738
44738
if (JS_IsException(next))
44739
44739
goto fail;
44740
- xsum_large_init(&lacc );
44740
+ xsum_small_init(&acc );
44741
44741
state = SUM_PRECISE_STATE_MINUS_ZERO;
44742
44742
for (;;) {
44743
44743
item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
@@ -44773,7 +44773,7 @@ static JSValue js_math_sumPrecise(JSContext *ctx, JSValueConst this_val,
44773
44773
state = SUM_PRECISE_STATE_MINUS_INFINITY;
44774
44774
else if (!(d == 0.0 && signbit(d)) && (state == SUM_PRECISE_STATE_MINUS_ZERO || state == SUM_PRECISE_STATE_FINITE)) {
44775
44775
state = SUM_PRECISE_STATE_FINITE;
44776
- xsum_large_add1(&lacc , d);
44776
+ xsum_small_add1(&acc , d);
44777
44777
}
44778
44778
}
44779
44779
}
@@ -44792,7 +44792,7 @@ static JSValue js_math_sumPrecise(JSContext *ctx, JSValueConst this_val,
44792
44792
d = -0.0;
44793
44793
break;
44794
44794
case SUM_PRECISE_STATE_FINITE:
44795
- d = xsum_large_round(&lacc );
44795
+ d = xsum_small_round(&acc );
44796
44796
break;
44797
44797
default:
44798
44798
abort();
0 commit comments