\[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\]
↓
\[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\]
(FPCore (x y z t a b c i)
:precision binary64
(+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
↓
(FPCore (x y z t a b c i)
:precision binary64
(+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
↓
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((x * y) + (z * t)) + (a * b)) + (c * i)
end function
↓
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((x * y) + (z * t)) + (a * b)) + (c * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
↓
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
def code(x, y, z, t, a, b, c, i):
return (((x * y) + (z * t)) + (a * b)) + (c * i)
↓
def code(x, y, z, t, a, b, c, i):
return (((x * y) + (z * t)) + (a * b)) + (c * i)
function code(x, y, z, t, a, b, c, i)
return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i))
end
↓
function code(x, y, z, t, a, b, c, i)
return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i))
end
function tmp = code(x, y, z, t, a, b, c, i)
tmp = (((x * y) + (z * t)) + (a * b)) + (c * i);
end
↓
function tmp = code(x, y, z, t, a, b, c, i)
tmp = (((x * y) + (z * t)) + (a * b)) + (c * i);
end
\[\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -4.2 \cdot 10^{+46}:\\
\;\;\;\;\left(a \cdot b + t \cdot z\right) + c \cdot i\\
\mathbf{elif}\;a \cdot b \leq 2.1 \cdot 10^{+21}:\\
\;\;\;\;\left(y \cdot x + t \cdot z\right) + c \cdot i\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot b + y \cdot x\right) + c \cdot i\\
\end{array}
\]
Alternative 10
Error
10.8
Cost
968
\[\begin{array}{l}
t_1 := \left(a \cdot b + t \cdot z\right) + c \cdot i\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{-93}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{+79}:\\
\;\;\;\;\left(a \cdot b + y \cdot x\right) + c \cdot i\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
herbie shell --seed 2023064
(FPCore (x y z t a b c i)
:name "Linear.V4:$cdot from linear-1.19.1.3, C"
:precision binary64
(+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))