public final class LinearCombination extends Object
ai bi
to high accuracy.
It does so by using specific multiplication and addition algorithms to
preserve accuracy and reduce cancellation effects.
It is based on the 2005 paper
Accurate Sum and Dot Product by Takeshi Ogita, Siegfried M. Rump,
and Shin'ichi Oishi published in SIAM J. Sci. Comput.Modifier and Type | Method and Description |
---|---|
static double |
value(double[] a,
double[] b) |
static double |
value(double a1,
double b1,
double a2,
double b2) |
static double |
value(double a1,
double b1,
double a2,
double b2,
double a3,
double b3) |
static double |
value(double a1,
double b1,
double a2,
double b2,
double a3,
double b3,
double a4,
double b4) |
public static double value(double[] a, double[] b)
a
- Factors.b
- Factors.IllegalArgumentException
- if the sizes of the arrays are different.public static double value(double a1, double b1, double a2, double b2)
a1
- First factor of the first term.b1
- Second factor of the first term.a2
- First factor of the second term.b2
- Second factor of the second term.value(double, double, double, double, double, double)
,
value(double, double, double, double, double, double, double, double)
,
value(double[], double[])
public static double value(double a1, double b1, double a2, double b2, double a3, double b3)
a1
- First factor of the first term.b1
- Second factor of the first term.a2
- First factor of the second term.b2
- Second factor of the second term.a3
- First factor of the third term.b3
- Second factor of the third term.value(double, double, double, double)
,
value(double, double, double, double, double, double, double, double)
,
value(double[], double[])
public static double value(double a1, double b1, double a2, double b2, double a3, double b3, double a4, double b4)
a1
- First factor of the first term.b1
- Second factor of the first term.a2
- First factor of the second term.b2
- Second factor of the second term.a3
- First factor of the third term.b3
- Second factor of the third term.a4
- First factor of the fourth term.b4
- Second factor of the fourth term.value(double, double, double, double)
,
value(double, double, double, double, double, double)
,
value(double[], double[])
Copyright © 2017–2020 The Apache Software Foundation. All rights reserved.