
(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);
}
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);
}
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 tmp = code(x, y, z, t, a, b, c, i) tmp = (((x * y) + (z * t)) + (a * b)) + (c * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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);
}
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);
}
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 tmp = code(x, y, z, t, a, b, c, i) tmp = (((x * y) + (z * t)) + (a * b)) + (c * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (fma a b (fma x y (fma c i (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(a, b, fma(x, y, fma(c, i, (z * t))));
}
function code(x, y, z, t, a, b, c, i) return fma(a, b, fma(x, y, fma(c, i, Float64(z * t)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a * b + N[(x * y + N[(c * i + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, b, \mathsf{fma}\left(x, y, \mathsf{fma}\left(c, i, z \cdot t\right)\right)\right)
\end{array}
Initial program 96.1%
+-commutative96.1%
associate-+l+96.1%
fma-def97.3%
associate-+l+97.3%
fma-def98.0%
+-commutative98.0%
fma-def98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (+ (+ (* z t) (* x y)) (* a b)) (* c i)))) (if (<= t_1 INFINITY) t_1 (fma z t (* c i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((z * t) + (x * y)) + (a * b)) + (c * i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(z, t, (c * i));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(z * t) + Float64(x * y)) + Float64(a * b)) + Float64(c * i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(z, t, Float64(c * i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(z * t + N[(c * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(z \cdot t + x \cdot y\right) + a \cdot b\right) + c \cdot i\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, t, c \cdot i\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) Initial program 0.0%
associate-+l+0.0%
+-commutative0.0%
associate-+l+0.0%
fma-def20.0%
associate-+r+20.0%
+-commutative20.0%
fma-def40.0%
fma-def40.0%
Simplified40.0%
Taylor expanded in x around 0 30.0%
Taylor expanded in a around 0 40.0%
+-commutative40.0%
*-commutative40.0%
fma-udef50.0%
Simplified50.0%
Final simplification98.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x y) (* a b)))
(t_2 (+ (* z t) (* c i)))
(t_3 (+ (* a b) (* c i))))
(if (<= (* z t) -1e+179)
t_2
(if (<= (* z t) -5e+40)
t_1
(if (<= (* z t) -1e-44)
t_3
(if (<= (* z t) -1e-108)
t_1
(if (<= (* z t) -1e-180) t_3 (if (<= (* z t) 2e+23) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (a * b);
double t_2 = (z * t) + (c * i);
double t_3 = (a * b) + (c * i);
double tmp;
if ((z * t) <= -1e+179) {
tmp = t_2;
} else if ((z * t) <= -5e+40) {
tmp = t_1;
} else if ((z * t) <= -1e-44) {
tmp = t_3;
} else if ((z * t) <= -1e-108) {
tmp = t_1;
} else if ((z * t) <= -1e-180) {
tmp = t_3;
} else if ((z * t) <= 2e+23) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
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
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (x * y) + (a * b)
t_2 = (z * t) + (c * i)
t_3 = (a * b) + (c * i)
if ((z * t) <= (-1d+179)) then
tmp = t_2
else if ((z * t) <= (-5d+40)) then
tmp = t_1
else if ((z * t) <= (-1d-44)) then
tmp = t_3
else if ((z * t) <= (-1d-108)) then
tmp = t_1
else if ((z * t) <= (-1d-180)) then
tmp = t_3
else if ((z * t) <= 2d+23) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (a * b);
double t_2 = (z * t) + (c * i);
double t_3 = (a * b) + (c * i);
double tmp;
if ((z * t) <= -1e+179) {
tmp = t_2;
} else if ((z * t) <= -5e+40) {
tmp = t_1;
} else if ((z * t) <= -1e-44) {
tmp = t_3;
} else if ((z * t) <= -1e-108) {
tmp = t_1;
} else if ((z * t) <= -1e-180) {
tmp = t_3;
} else if ((z * t) <= 2e+23) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * y) + (a * b) t_2 = (z * t) + (c * i) t_3 = (a * b) + (c * i) tmp = 0 if (z * t) <= -1e+179: tmp = t_2 elif (z * t) <= -5e+40: tmp = t_1 elif (z * t) <= -1e-44: tmp = t_3 elif (z * t) <= -1e-108: tmp = t_1 elif (z * t) <= -1e-180: tmp = t_3 elif (z * t) <= 2e+23: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * y) + Float64(a * b)) t_2 = Float64(Float64(z * t) + Float64(c * i)) t_3 = Float64(Float64(a * b) + Float64(c * i)) tmp = 0.0 if (Float64(z * t) <= -1e+179) tmp = t_2; elseif (Float64(z * t) <= -5e+40) tmp = t_1; elseif (Float64(z * t) <= -1e-44) tmp = t_3; elseif (Float64(z * t) <= -1e-108) tmp = t_1; elseif (Float64(z * t) <= -1e-180) tmp = t_3; elseif (Float64(z * t) <= 2e+23) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x * y) + (a * b); t_2 = (z * t) + (c * i); t_3 = (a * b) + (c * i); tmp = 0.0; if ((z * t) <= -1e+179) tmp = t_2; elseif ((z * t) <= -5e+40) tmp = t_1; elseif ((z * t) <= -1e-44) tmp = t_3; elseif ((z * t) <= -1e-108) tmp = t_1; elseif ((z * t) <= -1e-180) tmp = t_3; elseif ((z * t) <= 2e+23) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * t), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * t), $MachinePrecision], -1e+179], t$95$2, If[LessEqual[N[(z * t), $MachinePrecision], -5e+40], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], -1e-44], t$95$3, If[LessEqual[N[(z * t), $MachinePrecision], -1e-108], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], -1e-180], t$95$3, If[LessEqual[N[(z * t), $MachinePrecision], 2e+23], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + a \cdot b\\
t_2 := z \cdot t + c \cdot i\\
t_3 := a \cdot b + c \cdot i\\
\mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+179}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \cdot t \leq -5 \cdot 10^{+40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \cdot t \leq -1 \cdot 10^{-44}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \cdot t \leq -1 \cdot 10^{-108}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \cdot t \leq -1 \cdot 10^{-180}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 z t) < -9.9999999999999998e178 or 1.9999999999999998e23 < (*.f64 z t) Initial program 91.6%
associate-+l+91.6%
+-commutative91.6%
associate-+l+91.6%
fma-def93.7%
associate-+r+93.7%
+-commutative93.7%
fma-def95.8%
fma-def95.8%
Simplified95.8%
Taylor expanded in x around 0 84.3%
Taylor expanded in a around 0 77.3%
if -9.9999999999999998e178 < (*.f64 z t) < -5.00000000000000003e40 or -9.99999999999999953e-45 < (*.f64 z t) < -1.00000000000000004e-108 or -1e-180 < (*.f64 z t) < 1.9999999999999998e23Initial program 98.4%
+-commutative98.4%
associate-+l+98.4%
fma-def99.2%
associate-+l+99.2%
fma-def100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in z around 0 93.2%
Taylor expanded in c around 0 75.4%
if -5.00000000000000003e40 < (*.f64 z t) < -9.99999999999999953e-45 or -1.00000000000000004e-108 < (*.f64 z t) < -1e-180Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
fma-def100.0%
associate-+r+100.0%
+-commutative100.0%
fma-def100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in x around 0 88.8%
Taylor expanded in z around 0 85.9%
Final simplification77.5%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (+ (+ (* z t) (* x y)) (* a b)) (* c i)))) (if (<= t_1 INFINITY) t_1 (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((z * t) + (x * y)) + (a * b)) + (c * i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((z * t) + (x * y)) + (a * b)) + (c * i);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (((z * t) + (x * y)) + (a * b)) + (c * i) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(z * t) + Float64(x * y)) + Float64(a * b)) + Float64(c * i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (((z * t) + (x * y)) + (a * b)) + (c * i); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(z \cdot t + x \cdot y\right) + a \cdot b\right) + c \cdot i\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) Initial program 0.0%
Taylor expanded in x around inf 40.9%
Final simplification97.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -7e+97)
(* x y)
(if (<= (* x y) -1.7e-10)
(* z t)
(if (or (<= (* x y) -3.1e-19) (not (<= (* x y) 1.35e+138)))
(* x y)
(+ (* a b) (* c i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -7e+97) {
tmp = x * y;
} else if ((x * y) <= -1.7e-10) {
tmp = z * t;
} else if (((x * y) <= -3.1e-19) || !((x * y) <= 1.35e+138)) {
tmp = x * y;
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
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
real(8) :: tmp
if ((x * y) <= (-7d+97)) then
tmp = x * y
else if ((x * y) <= (-1.7d-10)) then
tmp = z * t
else if (((x * y) <= (-3.1d-19)) .or. (.not. ((x * y) <= 1.35d+138))) then
tmp = x * y
else
tmp = (a * b) + (c * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -7e+97) {
tmp = x * y;
} else if ((x * y) <= -1.7e-10) {
tmp = z * t;
} else if (((x * y) <= -3.1e-19) || !((x * y) <= 1.35e+138)) {
tmp = x * y;
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -7e+97: tmp = x * y elif (x * y) <= -1.7e-10: tmp = z * t elif ((x * y) <= -3.1e-19) or not ((x * y) <= 1.35e+138): tmp = x * y else: tmp = (a * b) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -7e+97) tmp = Float64(x * y); elseif (Float64(x * y) <= -1.7e-10) tmp = Float64(z * t); elseif ((Float64(x * y) <= -3.1e-19) || !(Float64(x * y) <= 1.35e+138)) tmp = Float64(x * y); else tmp = Float64(Float64(a * b) + Float64(c * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -7e+97) tmp = x * y; elseif ((x * y) <= -1.7e-10) tmp = z * t; elseif (((x * y) <= -3.1e-19) || ~(((x * y) <= 1.35e+138))) tmp = x * y; else tmp = (a * b) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -7e+97], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1.7e-10], N[(z * t), $MachinePrecision], If[Or[LessEqual[N[(x * y), $MachinePrecision], -3.1e-19], N[Not[LessEqual[N[(x * y), $MachinePrecision], 1.35e+138]], $MachinePrecision]], N[(x * y), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -7 \cdot 10^{+97}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -1.7 \cdot 10^{-10}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;x \cdot y \leq -3.1 \cdot 10^{-19} \lor \neg \left(x \cdot y \leq 1.35 \cdot 10^{+138}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 x y) < -7.0000000000000001e97 or -1.70000000000000007e-10 < (*.f64 x y) < -3.0999999999999999e-19 or 1.35000000000000004e138 < (*.f64 x y) Initial program 92.5%
Taylor expanded in x around inf 73.1%
if -7.0000000000000001e97 < (*.f64 x y) < -1.70000000000000007e-10Initial program 100.0%
Taylor expanded in z around inf 61.2%
if -3.0999999999999999e-19 < (*.f64 x y) < 1.35000000000000004e138Initial program 97.6%
associate-+l+97.6%
+-commutative97.6%
associate-+l+97.6%
fma-def98.2%
associate-+r+98.2%
+-commutative98.2%
fma-def98.8%
fma-def98.8%
Simplified98.8%
Taylor expanded in x around 0 91.9%
Taylor expanded in z around 0 62.8%
Final simplification65.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x y) (* a b))))
(if (<= (* x y) -7.1e+33)
t_1
(if (<= (* x y) -3.3e-9)
(* z t)
(if (or (<= (* x y) -8e-34) (not (<= (* x y) 1.9e+61)))
t_1
(+ (* a b) (* c i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (a * b);
double tmp;
if ((x * y) <= -7.1e+33) {
tmp = t_1;
} else if ((x * y) <= -3.3e-9) {
tmp = z * t;
} else if (((x * y) <= -8e-34) || !((x * y) <= 1.9e+61)) {
tmp = t_1;
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
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
real(8) :: t_1
real(8) :: tmp
t_1 = (x * y) + (a * b)
if ((x * y) <= (-7.1d+33)) then
tmp = t_1
else if ((x * y) <= (-3.3d-9)) then
tmp = z * t
else if (((x * y) <= (-8d-34)) .or. (.not. ((x * y) <= 1.9d+61))) then
tmp = t_1
else
tmp = (a * b) + (c * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (a * b);
double tmp;
if ((x * y) <= -7.1e+33) {
tmp = t_1;
} else if ((x * y) <= -3.3e-9) {
tmp = z * t;
} else if (((x * y) <= -8e-34) || !((x * y) <= 1.9e+61)) {
tmp = t_1;
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * y) + (a * b) tmp = 0 if (x * y) <= -7.1e+33: tmp = t_1 elif (x * y) <= -3.3e-9: tmp = z * t elif ((x * y) <= -8e-34) or not ((x * y) <= 1.9e+61): tmp = t_1 else: tmp = (a * b) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * y) + Float64(a * b)) tmp = 0.0 if (Float64(x * y) <= -7.1e+33) tmp = t_1; elseif (Float64(x * y) <= -3.3e-9) tmp = Float64(z * t); elseif ((Float64(x * y) <= -8e-34) || !(Float64(x * y) <= 1.9e+61)) tmp = t_1; else tmp = Float64(Float64(a * b) + Float64(c * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x * y) + (a * b); tmp = 0.0; if ((x * y) <= -7.1e+33) tmp = t_1; elseif ((x * y) <= -3.3e-9) tmp = z * t; elseif (((x * y) <= -8e-34) || ~(((x * y) <= 1.9e+61))) tmp = t_1; else tmp = (a * b) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -7.1e+33], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -3.3e-9], N[(z * t), $MachinePrecision], If[Or[LessEqual[N[(x * y), $MachinePrecision], -8e-34], N[Not[LessEqual[N[(x * y), $MachinePrecision], 1.9e+61]], $MachinePrecision]], t$95$1, N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + a \cdot b\\
\mathbf{if}\;x \cdot y \leq -7.1 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq -3.3 \cdot 10^{-9}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;x \cdot y \leq -8 \cdot 10^{-34} \lor \neg \left(x \cdot y \leq 1.9 \cdot 10^{+61}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 x y) < -7.09999999999999979e33 or -3.30000000000000018e-9 < (*.f64 x y) < -7.99999999999999942e-34 or 1.89999999999999998e61 < (*.f64 x y) Initial program 93.3%
+-commutative93.3%
associate-+l+93.3%
fma-def95.2%
associate-+l+95.2%
fma-def97.1%
+-commutative97.1%
fma-def97.1%
Simplified97.1%
Taylor expanded in z around 0 83.8%
Taylor expanded in c around 0 73.7%
if -7.09999999999999979e33 < (*.f64 x y) < -3.30000000000000018e-9Initial program 100.0%
Taylor expanded in z around inf 75.6%
if -7.99999999999999942e-34 < (*.f64 x y) < 1.89999999999999998e61Initial program 97.9%
associate-+l+97.9%
+-commutative97.9%
associate-+l+97.9%
fma-def97.9%
associate-+r+97.9%
+-commutative97.9%
fma-def98.6%
fma-def98.6%
Simplified98.6%
Taylor expanded in x around 0 95.3%
Taylor expanded in z around 0 65.8%
Final simplification69.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* a b) -1.62e+31)
(* a b)
(if (<= (* a b) 0.0)
(* x y)
(if (<= (* a b) 95000000000.0)
(* z t)
(if (<= (* a b) 8.2e+138) (* x y) (* a b))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((a * b) <= -1.62e+31) {
tmp = a * b;
} else if ((a * b) <= 0.0) {
tmp = x * y;
} else if ((a * b) <= 95000000000.0) {
tmp = z * t;
} else if ((a * b) <= 8.2e+138) {
tmp = x * y;
} else {
tmp = a * b;
}
return tmp;
}
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
real(8) :: tmp
if ((a * b) <= (-1.62d+31)) then
tmp = a * b
else if ((a * b) <= 0.0d0) then
tmp = x * y
else if ((a * b) <= 95000000000.0d0) then
tmp = z * t
else if ((a * b) <= 8.2d+138) then
tmp = x * y
else
tmp = a * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((a * b) <= -1.62e+31) {
tmp = a * b;
} else if ((a * b) <= 0.0) {
tmp = x * y;
} else if ((a * b) <= 95000000000.0) {
tmp = z * t;
} else if ((a * b) <= 8.2e+138) {
tmp = x * y;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (a * b) <= -1.62e+31: tmp = a * b elif (a * b) <= 0.0: tmp = x * y elif (a * b) <= 95000000000.0: tmp = z * t elif (a * b) <= 8.2e+138: tmp = x * y else: tmp = a * b return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(a * b) <= -1.62e+31) tmp = Float64(a * b); elseif (Float64(a * b) <= 0.0) tmp = Float64(x * y); elseif (Float64(a * b) <= 95000000000.0) tmp = Float64(z * t); elseif (Float64(a * b) <= 8.2e+138) tmp = Float64(x * y); else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((a * b) <= -1.62e+31) tmp = a * b; elseif ((a * b) <= 0.0) tmp = x * y; elseif ((a * b) <= 95000000000.0) tmp = z * t; elseif ((a * b) <= 8.2e+138) tmp = x * y; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(a * b), $MachinePrecision], -1.62e+31], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 0.0], N[(x * y), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 95000000000.0], N[(z * t), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 8.2e+138], N[(x * y), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -1.62 \cdot 10^{+31}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \cdot b \leq 0:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;a \cdot b \leq 95000000000:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;a \cdot b \leq 8.2 \cdot 10^{+138}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 a b) < -1.6199999999999999e31 or 8.19999999999999961e138 < (*.f64 a b) Initial program 92.5%
Taylor expanded in a around inf 60.5%
if -1.6199999999999999e31 < (*.f64 a b) < -0.0 or 9.5e10 < (*.f64 a b) < 8.19999999999999961e138Initial program 98.9%
Taylor expanded in x around inf 41.3%
if -0.0 < (*.f64 a b) < 9.5e10Initial program 97.2%
Taylor expanded in z around inf 48.6%
Final simplification50.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -2.7e+96)
(+ (* x y) (* c i))
(if (<= (* x y) 1.65e+123)
(+ (* c i) (+ (* z t) (* a b)))
(+ (* x y) (* a b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2.7e+96) {
tmp = (x * y) + (c * i);
} else if ((x * y) <= 1.65e+123) {
tmp = (c * i) + ((z * t) + (a * b));
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
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
real(8) :: tmp
if ((x * y) <= (-2.7d+96)) then
tmp = (x * y) + (c * i)
else if ((x * y) <= 1.65d+123) then
tmp = (c * i) + ((z * t) + (a * b))
else
tmp = (x * y) + (a * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2.7e+96) {
tmp = (x * y) + (c * i);
} else if ((x * y) <= 1.65e+123) {
tmp = (c * i) + ((z * t) + (a * b));
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -2.7e+96: tmp = (x * y) + (c * i) elif (x * y) <= 1.65e+123: tmp = (c * i) + ((z * t) + (a * b)) else: tmp = (x * y) + (a * b) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -2.7e+96) tmp = Float64(Float64(x * y) + Float64(c * i)); elseif (Float64(x * y) <= 1.65e+123) tmp = Float64(Float64(c * i) + Float64(Float64(z * t) + Float64(a * b))); else tmp = Float64(Float64(x * y) + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -2.7e+96) tmp = (x * y) + (c * i); elseif ((x * y) <= 1.65e+123) tmp = (c * i) + ((z * t) + (a * b)); else tmp = (x * y) + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2.7e+96], N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.65e+123], N[(N[(c * i), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2.7 \cdot 10^{+96}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\mathbf{elif}\;x \cdot y \leq 1.65 \cdot 10^{+123}:\\
\;\;\;\;c \cdot i + \left(z \cdot t + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\end{array}
\end{array}
if (*.f64 x y) < -2.70000000000000022e96Initial program 92.5%
+-commutative92.5%
associate-+l+92.5%
fma-def95.0%
associate-+l+95.0%
fma-def97.5%
+-commutative97.5%
fma-def97.5%
Simplified97.5%
Taylor expanded in z around 0 87.8%
Taylor expanded in a around 0 83.0%
if -2.70000000000000022e96 < (*.f64 x y) < 1.65000000000000001e123Initial program 97.7%
Taylor expanded in x around 0 91.1%
if 1.65000000000000001e123 < (*.f64 x y) Initial program 93.0%
+-commutative93.0%
associate-+l+93.0%
fma-def95.3%
associate-+l+95.3%
fma-def97.7%
+-commutative97.7%
fma-def97.7%
Simplified97.7%
Taylor expanded in z around 0 86.1%
Taylor expanded in c around 0 79.5%
Final simplification87.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* z t) -5e+133) (+ (* c i) (+ (* z t) (* a b))) (if (<= (* z t) 4e+240) (+ (* c i) (+ (* x y) (* a b))) (* z t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((z * t) <= -5e+133) {
tmp = (c * i) + ((z * t) + (a * b));
} else if ((z * t) <= 4e+240) {
tmp = (c * i) + ((x * y) + (a * b));
} else {
tmp = z * t;
}
return tmp;
}
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
real(8) :: tmp
if ((z * t) <= (-5d+133)) then
tmp = (c * i) + ((z * t) + (a * b))
else if ((z * t) <= 4d+240) then
tmp = (c * i) + ((x * y) + (a * b))
else
tmp = z * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((z * t) <= -5e+133) {
tmp = (c * i) + ((z * t) + (a * b));
} else if ((z * t) <= 4e+240) {
tmp = (c * i) + ((x * y) + (a * b));
} else {
tmp = z * t;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (z * t) <= -5e+133: tmp = (c * i) + ((z * t) + (a * b)) elif (z * t) <= 4e+240: tmp = (c * i) + ((x * y) + (a * b)) else: tmp = z * t return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(z * t) <= -5e+133) tmp = Float64(Float64(c * i) + Float64(Float64(z * t) + Float64(a * b))); elseif (Float64(z * t) <= 4e+240) tmp = Float64(Float64(c * i) + Float64(Float64(x * y) + Float64(a * b))); else tmp = Float64(z * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((z * t) <= -5e+133) tmp = (c * i) + ((z * t) + (a * b)); elseif ((z * t) <= 4e+240) tmp = (c * i) + ((x * y) + (a * b)); else tmp = z * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(z * t), $MachinePrecision], -5e+133], N[(N[(c * i), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 4e+240], N[(N[(c * i), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -5 \cdot 10^{+133}:\\
\;\;\;\;c \cdot i + \left(z \cdot t + a \cdot b\right)\\
\mathbf{elif}\;z \cdot t \leq 4 \cdot 10^{+240}:\\
\;\;\;\;c \cdot i + \left(x \cdot y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot t\\
\end{array}
\end{array}
if (*.f64 z t) < -4.99999999999999961e133Initial program 95.7%
Taylor expanded in x around 0 87.4%
if -4.99999999999999961e133 < (*.f64 z t) < 4.00000000000000006e240Initial program 97.9%
Taylor expanded in z around 0 91.8%
if 4.00000000000000006e240 < (*.f64 z t) Initial program 81.0%
Taylor expanded in z around inf 91.0%
Final simplification90.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* a b) -4e+62)
(* a b)
(if (<= (* a b) 0.0)
(* c i)
(if (<= (* a b) 80000000000.0) (* z t) (* a b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((a * b) <= -4e+62) {
tmp = a * b;
} else if ((a * b) <= 0.0) {
tmp = c * i;
} else if ((a * b) <= 80000000000.0) {
tmp = z * t;
} else {
tmp = a * b;
}
return tmp;
}
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
real(8) :: tmp
if ((a * b) <= (-4d+62)) then
tmp = a * b
else if ((a * b) <= 0.0d0) then
tmp = c * i
else if ((a * b) <= 80000000000.0d0) then
tmp = z * t
else
tmp = a * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((a * b) <= -4e+62) {
tmp = a * b;
} else if ((a * b) <= 0.0) {
tmp = c * i;
} else if ((a * b) <= 80000000000.0) {
tmp = z * t;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (a * b) <= -4e+62: tmp = a * b elif (a * b) <= 0.0: tmp = c * i elif (a * b) <= 80000000000.0: tmp = z * t else: tmp = a * b return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(a * b) <= -4e+62) tmp = Float64(a * b); elseif (Float64(a * b) <= 0.0) tmp = Float64(c * i); elseif (Float64(a * b) <= 80000000000.0) tmp = Float64(z * t); else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((a * b) <= -4e+62) tmp = a * b; elseif ((a * b) <= 0.0) tmp = c * i; elseif ((a * b) <= 80000000000.0) tmp = z * t; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(a * b), $MachinePrecision], -4e+62], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 0.0], N[(c * i), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 80000000000.0], N[(z * t), $MachinePrecision], N[(a * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -4 \cdot 10^{+62}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \cdot b \leq 0:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;a \cdot b \leq 80000000000:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 a b) < -4.00000000000000014e62 or 8e10 < (*.f64 a b) Initial program 93.2%
Taylor expanded in a around inf 56.9%
if -4.00000000000000014e62 < (*.f64 a b) < -0.0Initial program 98.8%
Taylor expanded in c around inf 37.2%
if -0.0 < (*.f64 a b) < 8e10Initial program 97.2%
Taylor expanded in z around inf 48.6%
Final simplification48.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* a b) -1.25e+63) (not (<= (* a b) 1.8e+35))) (* a b) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((a * b) <= -1.25e+63) || !((a * b) <= 1.8e+35)) {
tmp = a * b;
} else {
tmp = c * i;
}
return tmp;
}
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
real(8) :: tmp
if (((a * b) <= (-1.25d+63)) .or. (.not. ((a * b) <= 1.8d+35))) then
tmp = a * b
else
tmp = c * i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((a * b) <= -1.25e+63) || !((a * b) <= 1.8e+35)) {
tmp = a * b;
} else {
tmp = c * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((a * b) <= -1.25e+63) or not ((a * b) <= 1.8e+35): tmp = a * b else: tmp = c * i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(a * b) <= -1.25e+63) || !(Float64(a * b) <= 1.8e+35)) tmp = Float64(a * b); else tmp = Float64(c * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((a * b) <= -1.25e+63) || ~(((a * b) <= 1.8e+35))) tmp = a * b; else tmp = c * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -1.25e+63], N[Not[LessEqual[N[(a * b), $MachinePrecision], 1.8e+35]], $MachinePrecision]], N[(a * b), $MachinePrecision], N[(c * i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -1.25 \cdot 10^{+63} \lor \neg \left(a \cdot b \leq 1.8 \cdot 10^{+35}\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;c \cdot i\\
\end{array}
\end{array}
if (*.f64 a b) < -1.25000000000000003e63 or 1.8e35 < (*.f64 a b) Initial program 93.1%
Taylor expanded in a around inf 57.9%
if -1.25000000000000003e63 < (*.f64 a b) < 1.8e35Initial program 98.0%
Taylor expanded in c around inf 31.9%
Final simplification42.2%
(FPCore (x y z t a b c i) :precision binary64 (* a b))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a * b;
}
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 = a * b
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a * b;
}
def code(x, y, z, t, a, b, c, i): return a * b
function code(x, y, z, t, a, b, c, i) return Float64(a * b) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a * b; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a * b), $MachinePrecision]
\begin{array}{l}
\\
a \cdot b
\end{array}
Initial program 96.1%
Taylor expanded in a around inf 27.3%
Final simplification27.3%
herbie shell --seed 2023302
(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)))