@@ -2832,8 +2832,7 @@ long_add_would_overflow(long a, long b)
2832
2832
}
2833
2833
2834
2834
/*
2835
- Double and triple length extended precision floating point arithmetic
2836
- based on:
2835
+ Double and triple length extended precision algorithms from:
2837
2836
2838
2837
Accurate Sum and Dot Product
2839
2838
by Takeshi Ogita, Siegfried M. Rump, and Shin’Ichi Oishi
@@ -2847,7 +2846,7 @@ typedef struct{ double hi; double lo; } DoubleLength;
2847
2846
static DoubleLength
2848
2847
dl_sum (double a , double b )
2849
2848
{
2850
- // Algorithm 3.1 Error-free transformation of the sum
2849
+ /* Algorithm 3.1 Error-free transformation of the sum */
2851
2850
double x = a + b ;
2852
2851
double z = x - a ;
2853
2852
double y = (a - (x - z )) + (b - z );
@@ -2857,7 +2856,7 @@ dl_sum(double a, double b)
2857
2856
static DoubleLength
2858
2857
dl_mul (double x , double y )
2859
2858
{
2860
- // Algorithm 3.5. Error-free transformation of a product
2859
+ /* Algorithm 3.5. Error-free transformation of a product */
2861
2860
double z = x * y ;
2862
2861
double zz = fma (x , y , - z );
2863
2862
return (DoubleLength ) {z , zz };
@@ -2870,7 +2869,7 @@ static const TripleLength tl_zero = {0.0, 0.0, 0.0};
2870
2869
static TripleLength
2871
2870
tl_fma (double x , double y , TripleLength total )
2872
2871
{
2873
- // Algorithm 5.10 with SumKVert for K=3
2872
+ /* Algorithm 5.10 with SumKVert for K=3 */
2874
2873
DoubleLength pr = dl_mul (x , y );
2875
2874
DoubleLength sm = dl_sum (total .hi , pr .hi );
2876
2875
DoubleLength r1 = dl_sum (total .lo , pr .lo );
0 commit comments