\[\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}
t_1 := \left(a \cdot b + t \cdot z\right) + c \cdot i\\
t_2 := y \cdot x + c \cdot i\\
\mathbf{if}\;x \leq -1.25 \cdot 10^{+177}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -2.8 \cdot 10^{+143}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{+118}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{-35}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot x + t \cdot z\\
\end{array}
\]
Alternative 11
Error
6.4
Cost
1224
\[\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -0.0042:\\
\;\;\;\;\left(a \cdot b + t \cdot z\right) + c \cdot i\\
\mathbf{elif}\;a \cdot b \leq 2.65 \cdot 10^{+70}:\\
\;\;\;\;\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}
\]
herbie shell --seed 2023068
(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)))