@@ -280,7 +280,7 @@ class dd {
280
280
// move into or through the subnormal range of the high limb
281
281
hi = std::nextafter (hi, +INFINITY);
282
282
}
283
- else if (isfinite (hi)) {
283
+ else if (std:: isfinite (hi)) {
284
284
int highScale = sw::universal::scale (hi);
285
285
if (lo == 0.0 ) {
286
286
// the second limb cannot be a denorm, so we need to jump to the first normal value
@@ -292,7 +292,7 @@ class dd {
292
292
lo = std::nextafter (lo, +INFINITY);
293
293
int newLowScale = sw::universal::scale (lo);
294
294
// check for overflow: could be transitioning into the next binade, or INF in last binade
295
- if (lowScale < newLowScale || isinf (lo)) {
295
+ if (lowScale < newLowScale || std:: isinf (lo)) {
296
296
lo = 0.0 ;
297
297
hi = std::nextafter (hi, +INFINITY);
298
298
}
@@ -313,8 +313,7 @@ class dd {
313
313
// move into or through the subnormal range of the high limb
314
314
hi = std::nextafter (hi, -INFINITY);
315
315
}
316
- else if (isfinite (hi)) {
317
- int highScale = sw::universal::scale (hi);
316
+ else if (std::isfinite (hi)) {
318
317
if (lo == 0.0 ) {
319
318
// we need to drop into a lower binade, thus we need to update the high limb first
320
319
hi = std::nextafter (hi, -INFINITY);
@@ -327,7 +326,7 @@ class dd {
327
326
lo = std::nextafter (lo, -INFINITY);
328
327
int newLowScale = sw::universal::scale (lo);
329
328
// check for overflow
330
- if (lowScale < newLowScale || isinf (lo)) {
329
+ if (lowScale < newLowScale || std:: isinf (lo)) {
331
330
lo = 0.0 ;
332
331
hi = std::nextafter (hi, -INFINITY);
333
332
}
@@ -599,7 +598,7 @@ class dd {
599
598
}
600
599
else {
601
600
hi = static_cast <double >(v);
602
- lo = static_cast < double >(v - static_cast < int64_t >(hi)) ;
601
+ lo = 0.0 ;
603
602
}
604
603
return *this ;
605
604
}
@@ -610,7 +609,7 @@ class dd {
610
609
}
611
610
else {
612
611
hi = static_cast <double >(v);
613
- lo = static_cast < double >(v - static_cast < uint64_t >(hi)); // difference is always positive
612
+ lo = 0.0 ;
614
613
}
615
614
return *this ;
616
615
}
0 commit comments