
(FPCore (x y z t) :precision binary64 (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * ((((y + z) + z) + y) + t)) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
def code(x, y, z, t): return (x * ((((y + z) + z) + y) + t)) + (y * 5.0)
function code(x, y, z, t) return Float64(Float64(x * Float64(Float64(Float64(Float64(y + z) + z) + y) + t)) + Float64(y * 5.0)) end
function tmp = code(x, y, z, t) tmp = (x * ((((y + z) + z) + y) + t)) + (y * 5.0); end
code[x_, y_, z_, t_] := N[(N[(x * N[(N[(N[(N[(y + z), $MachinePrecision] + z), $MachinePrecision] + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * ((((y + z) + z) + y) + t)) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
def code(x, y, z, t): return (x * ((((y + z) + z) + y) + t)) + (y * 5.0)
function code(x, y, z, t) return Float64(Float64(x * Float64(Float64(Float64(Float64(y + z) + z) + y) + t)) + Float64(y * 5.0)) end
function tmp = code(x, y, z, t) tmp = (x * ((((y + z) + z) + y) + t)) + (y * 5.0); end
code[x_, y_, z_, t_] := N[(N[(x * N[(N[(N[(N[(y + z), $MachinePrecision] + z), $MachinePrecision] + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
\end{array}
(FPCore (x y z t) :precision binary64 (fma x (+ (+ y (+ z z)) (+ y t)) (* y 5.0)))
double code(double x, double y, double z, double t) {
return fma(x, ((y + (z + z)) + (y + t)), (y * 5.0));
}
function code(x, y, z, t) return fma(x, Float64(Float64(y + Float64(z + z)) + Float64(y + t)), Float64(y * 5.0)) end
code[x_, y_, z_, t_] := N[(x * N[(N[(y + N[(z + z), $MachinePrecision]), $MachinePrecision] + N[(y + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, \left(y + \left(z + z\right)\right) + \left(y + t\right), y \cdot 5\right)
\end{array}
Initial program 100.0%
fma-def100.0%
associate-+l+100.0%
associate-+l+100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t) :precision binary64 (fma x (+ t (* 2.0 (+ y z))) (* y 5.0)))
double code(double x, double y, double z, double t) {
return fma(x, (t + (2.0 * (y + z))), (y * 5.0));
}
function code(x, y, z, t) return fma(x, Float64(t + Float64(2.0 * Float64(y + z))), Float64(y * 5.0)) end
code[x_, y_, z_, t_] := N[(x * N[(t + N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, t + 2 \cdot \left(y + z\right), y \cdot 5\right)
\end{array}
Initial program 100.0%
fma-def100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (* x 2.0))) (t_2 (* y (+ x 5.0))))
(if (<= y -5e+86)
t_2
(if (<= y -2.9e-122)
(* x t)
(if (<= y 1.08e-302)
t_1
(if (<= y 3.8e-217)
(* x t)
(if (<= y 6.3e-74)
t_1
(if (<= y 8e-52) (* x t) (if (<= y 1.45e-22) t_1 t_2)))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x * 2.0);
double t_2 = y * (x + 5.0);
double tmp;
if (y <= -5e+86) {
tmp = t_2;
} else if (y <= -2.9e-122) {
tmp = x * t;
} else if (y <= 1.08e-302) {
tmp = t_1;
} else if (y <= 3.8e-217) {
tmp = x * t;
} else if (y <= 6.3e-74) {
tmp = t_1;
} else if (y <= 8e-52) {
tmp = x * t;
} else if (y <= 1.45e-22) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * (x * 2.0d0)
t_2 = y * (x + 5.0d0)
if (y <= (-5d+86)) then
tmp = t_2
else if (y <= (-2.9d-122)) then
tmp = x * t
else if (y <= 1.08d-302) then
tmp = t_1
else if (y <= 3.8d-217) then
tmp = x * t
else if (y <= 6.3d-74) then
tmp = t_1
else if (y <= 8d-52) then
tmp = x * t
else if (y <= 1.45d-22) 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 t_1 = z * (x * 2.0);
double t_2 = y * (x + 5.0);
double tmp;
if (y <= -5e+86) {
tmp = t_2;
} else if (y <= -2.9e-122) {
tmp = x * t;
} else if (y <= 1.08e-302) {
tmp = t_1;
} else if (y <= 3.8e-217) {
tmp = x * t;
} else if (y <= 6.3e-74) {
tmp = t_1;
} else if (y <= 8e-52) {
tmp = x * t;
} else if (y <= 1.45e-22) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x * 2.0) t_2 = y * (x + 5.0) tmp = 0 if y <= -5e+86: tmp = t_2 elif y <= -2.9e-122: tmp = x * t elif y <= 1.08e-302: tmp = t_1 elif y <= 3.8e-217: tmp = x * t elif y <= 6.3e-74: tmp = t_1 elif y <= 8e-52: tmp = x * t elif y <= 1.45e-22: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x * 2.0)) t_2 = Float64(y * Float64(x + 5.0)) tmp = 0.0 if (y <= -5e+86) tmp = t_2; elseif (y <= -2.9e-122) tmp = Float64(x * t); elseif (y <= 1.08e-302) tmp = t_1; elseif (y <= 3.8e-217) tmp = Float64(x * t); elseif (y <= 6.3e-74) tmp = t_1; elseif (y <= 8e-52) tmp = Float64(x * t); elseif (y <= 1.45e-22) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x * 2.0); t_2 = y * (x + 5.0); tmp = 0.0; if (y <= -5e+86) tmp = t_2; elseif (y <= -2.9e-122) tmp = x * t; elseif (y <= 1.08e-302) tmp = t_1; elseif (y <= 3.8e-217) tmp = x * t; elseif (y <= 6.3e-74) tmp = t_1; elseif (y <= 8e-52) tmp = x * t; elseif (y <= 1.45e-22) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(x + 5.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5e+86], t$95$2, If[LessEqual[y, -2.9e-122], N[(x * t), $MachinePrecision], If[LessEqual[y, 1.08e-302], t$95$1, If[LessEqual[y, 3.8e-217], N[(x * t), $MachinePrecision], If[LessEqual[y, 6.3e-74], t$95$1, If[LessEqual[y, 8e-52], N[(x * t), $MachinePrecision], If[LessEqual[y, 1.45e-22], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x \cdot 2\right)\\
t_2 := y \cdot \left(x + 5\right)\\
\mathbf{if}\;y \leq -5 \cdot 10^{+86}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{-122}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;y \leq 1.08 \cdot 10^{-302}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-217}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;y \leq 6.3 \cdot 10^{-74}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-52}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-22}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -4.9999999999999998e86 or 1.4500000000000001e-22 < y Initial program 99.9%
associate-+r+99.9%
add-cube-cbrt99.7%
pow399.7%
+-commutative99.7%
count-299.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 71.9%
+-commutative71.9%
Simplified71.9%
if -4.9999999999999998e86 < y < -2.9000000000000002e-122 or 1.07999999999999994e-302 < y < 3.79999999999999987e-217 or 6.30000000000000003e-74 < y < 8.0000000000000001e-52Initial program 100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in t around inf 55.6%
*-commutative55.6%
Simplified55.6%
if -2.9000000000000002e-122 < y < 1.07999999999999994e-302 or 3.79999999999999987e-217 < y < 6.30000000000000003e-74 or 8.0000000000000001e-52 < y < 1.4500000000000001e-22Initial program 100.0%
Taylor expanded in z around inf 68.7%
Simplified68.7%
Taylor expanded in z around inf 58.8%
associate-*r*58.8%
*-commutative58.8%
Simplified58.8%
Final simplification63.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (* y 5.0) (* x t))) (t_2 (* x (+ t (* 2.0 (+ y z))))))
(if (<= x -2.1e-76)
t_2
(if (<= x -9.5e-169)
t_1
(if (<= x 1.3e-252)
(+ (* y 5.0) (* 2.0 (* x z)))
(if (<= x 8.5e-162) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = (y * 5.0) + (x * t);
double t_2 = x * (t + (2.0 * (y + z)));
double tmp;
if (x <= -2.1e-76) {
tmp = t_2;
} else if (x <= -9.5e-169) {
tmp = t_1;
} else if (x <= 1.3e-252) {
tmp = (y * 5.0) + (2.0 * (x * z));
} else if (x <= 8.5e-162) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * 5.0d0) + (x * t)
t_2 = x * (t + (2.0d0 * (y + z)))
if (x <= (-2.1d-76)) then
tmp = t_2
else if (x <= (-9.5d-169)) then
tmp = t_1
else if (x <= 1.3d-252) then
tmp = (y * 5.0d0) + (2.0d0 * (x * z))
else if (x <= 8.5d-162) 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 t_1 = (y * 5.0) + (x * t);
double t_2 = x * (t + (2.0 * (y + z)));
double tmp;
if (x <= -2.1e-76) {
tmp = t_2;
} else if (x <= -9.5e-169) {
tmp = t_1;
} else if (x <= 1.3e-252) {
tmp = (y * 5.0) + (2.0 * (x * z));
} else if (x <= 8.5e-162) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y * 5.0) + (x * t) t_2 = x * (t + (2.0 * (y + z))) tmp = 0 if x <= -2.1e-76: tmp = t_2 elif x <= -9.5e-169: tmp = t_1 elif x <= 1.3e-252: tmp = (y * 5.0) + (2.0 * (x * z)) elif x <= 8.5e-162: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y * 5.0) + Float64(x * t)) t_2 = Float64(x * Float64(t + Float64(2.0 * Float64(y + z)))) tmp = 0.0 if (x <= -2.1e-76) tmp = t_2; elseif (x <= -9.5e-169) tmp = t_1; elseif (x <= 1.3e-252) tmp = Float64(Float64(y * 5.0) + Float64(2.0 * Float64(x * z))); elseif (x <= 8.5e-162) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y * 5.0) + (x * t); t_2 = x * (t + (2.0 * (y + z))); tmp = 0.0; if (x <= -2.1e-76) tmp = t_2; elseif (x <= -9.5e-169) tmp = t_1; elseif (x <= 1.3e-252) tmp = (y * 5.0) + (2.0 * (x * z)); elseif (x <= 8.5e-162) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(t + N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.1e-76], t$95$2, If[LessEqual[x, -9.5e-169], t$95$1, If[LessEqual[x, 1.3e-252], N[(N[(y * 5.0), $MachinePrecision] + N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.5e-162], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot 5 + x \cdot t\\
t_2 := x \cdot \left(t + 2 \cdot \left(y + z\right)\right)\\
\mathbf{if}\;x \leq -2.1 \cdot 10^{-76}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -9.5 \cdot 10^{-169}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-252}:\\
\;\;\;\;y \cdot 5 + 2 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-162}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -2.09999999999999992e-76 or 8.49999999999999955e-162 < x Initial program 99.9%
fma-def99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in x around inf 93.6%
if -2.09999999999999992e-76 < x < -9.5000000000000001e-169 or 1.3e-252 < x < 8.49999999999999955e-162Initial program 100.0%
Taylor expanded in t around inf 85.5%
Simplified85.5%
if -9.5000000000000001e-169 < x < 1.3e-252Initial program 100.0%
Taylor expanded in z around inf 83.5%
Simplified83.5%
Final simplification90.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (* 2.0 (+ y z)))))
(if (<= x -2.5e+24)
t_1
(if (<= x -2.9e-8)
(* x t)
(if (<= x -1.35e-104)
(* z (* x 2.0))
(if (<= x 1.05e-161) (* y 5.0) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (2.0 * (y + z));
double tmp;
if (x <= -2.5e+24) {
tmp = t_1;
} else if (x <= -2.9e-8) {
tmp = x * t;
} else if (x <= -1.35e-104) {
tmp = z * (x * 2.0);
} else if (x <= 1.05e-161) {
tmp = y * 5.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * (2.0d0 * (y + z))
if (x <= (-2.5d+24)) then
tmp = t_1
else if (x <= (-2.9d-8)) then
tmp = x * t
else if (x <= (-1.35d-104)) then
tmp = z * (x * 2.0d0)
else if (x <= 1.05d-161) then
tmp = y * 5.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (2.0 * (y + z));
double tmp;
if (x <= -2.5e+24) {
tmp = t_1;
} else if (x <= -2.9e-8) {
tmp = x * t;
} else if (x <= -1.35e-104) {
tmp = z * (x * 2.0);
} else if (x <= 1.05e-161) {
tmp = y * 5.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (2.0 * (y + z)) tmp = 0 if x <= -2.5e+24: tmp = t_1 elif x <= -2.9e-8: tmp = x * t elif x <= -1.35e-104: tmp = z * (x * 2.0) elif x <= 1.05e-161: tmp = y * 5.0 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(2.0 * Float64(y + z))) tmp = 0.0 if (x <= -2.5e+24) tmp = t_1; elseif (x <= -2.9e-8) tmp = Float64(x * t); elseif (x <= -1.35e-104) tmp = Float64(z * Float64(x * 2.0)); elseif (x <= 1.05e-161) tmp = Float64(y * 5.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (2.0 * (y + z)); tmp = 0.0; if (x <= -2.5e+24) tmp = t_1; elseif (x <= -2.9e-8) tmp = x * t; elseif (x <= -1.35e-104) tmp = z * (x * 2.0); elseif (x <= 1.05e-161) tmp = y * 5.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5e+24], t$95$1, If[LessEqual[x, -2.9e-8], N[(x * t), $MachinePrecision], If[LessEqual[x, -1.35e-104], N[(z * N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e-161], N[(y * 5.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(2 \cdot \left(y + z\right)\right)\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{+24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.9 \cdot 10^{-8}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-104}:\\
\;\;\;\;z \cdot \left(x \cdot 2\right)\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-161}:\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -2.50000000000000023e24 or 1.05e-161 < x Initial program 100.0%
fma-def100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 95.9%
Taylor expanded in t around 0 69.6%
*-commutative69.6%
+-commutative69.6%
associate-*r*69.6%
*-commutative69.6%
+-commutative69.6%
Simplified69.6%
if -2.50000000000000023e24 < x < -2.9000000000000002e-8Initial program 99.6%
Taylor expanded in y around 0 100.0%
Taylor expanded in t around inf 75.6%
*-commutative75.6%
Simplified75.6%
if -2.9000000000000002e-8 < x < -1.3499999999999999e-104Initial program 99.9%
Taylor expanded in z around inf 73.5%
Simplified73.5%
Taylor expanded in z around inf 58.7%
associate-*r*58.7%
*-commutative58.7%
Simplified58.7%
if -1.3499999999999999e-104 < x < 1.05e-161Initial program 100.0%
Taylor expanded in x around 0 57.7%
Simplified57.7%
Final simplification64.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 2.0 (+ y z))))
(if (or (<= y -5e+86) (not (<= y 1.95e-46)))
(+ (* y 5.0) (* x t_1))
(* x (+ t t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 * (y + z);
double tmp;
if ((y <= -5e+86) || !(y <= 1.95e-46)) {
tmp = (y * 5.0) + (x * t_1);
} else {
tmp = x * (t + t_1);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (y + z)
if ((y <= (-5d+86)) .or. (.not. (y <= 1.95d-46))) then
tmp = (y * 5.0d0) + (x * t_1)
else
tmp = x * (t + t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 2.0 * (y + z);
double tmp;
if ((y <= -5e+86) || !(y <= 1.95e-46)) {
tmp = (y * 5.0) + (x * t_1);
} else {
tmp = x * (t + t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 * (y + z) tmp = 0 if (y <= -5e+86) or not (y <= 1.95e-46): tmp = (y * 5.0) + (x * t_1) else: tmp = x * (t + t_1) return tmp
function code(x, y, z, t) t_1 = Float64(2.0 * Float64(y + z)) tmp = 0.0 if ((y <= -5e+86) || !(y <= 1.95e-46)) tmp = Float64(Float64(y * 5.0) + Float64(x * t_1)); else tmp = Float64(x * Float64(t + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 * (y + z); tmp = 0.0; if ((y <= -5e+86) || ~((y <= 1.95e-46))) tmp = (y * 5.0) + (x * t_1); else tmp = x * (t + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y, -5e+86], N[Not[LessEqual[y, 1.95e-46]], $MachinePrecision]], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t$95$1), $MachinePrecision]), $MachinePrecision], N[(x * N[(t + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(y + z\right)\\
\mathbf{if}\;y \leq -5 \cdot 10^{+86} \lor \neg \left(y \leq 1.95 \cdot 10^{-46}\right):\\
\;\;\;\;y \cdot 5 + x \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + t_1\right)\\
\end{array}
\end{array}
if y < -4.9999999999999998e86 or 1.9500000000000001e-46 < y Initial program 99.9%
Taylor expanded in t around 0 94.3%
Simplified94.3%
if -4.9999999999999998e86 < y < 1.9500000000000001e-46Initial program 100.0%
fma-def100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 87.0%
Final simplification89.9%
(FPCore (x y z t) :precision binary64 (if (or (<= x -3.1e+41) (not (<= x 2.5))) (* x (+ t (* 2.0 (+ y z)))) (+ (* y 5.0) (* x (+ t (* z 2.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3.1e+41) || !(x <= 2.5)) {
tmp = x * (t + (2.0 * (y + z)));
} else {
tmp = (y * 5.0) + (x * (t + (z * 2.0)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-3.1d+41)) .or. (.not. (x <= 2.5d0))) then
tmp = x * (t + (2.0d0 * (y + z)))
else
tmp = (y * 5.0d0) + (x * (t + (z * 2.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3.1e+41) || !(x <= 2.5)) {
tmp = x * (t + (2.0 * (y + z)));
} else {
tmp = (y * 5.0) + (x * (t + (z * 2.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -3.1e+41) or not (x <= 2.5): tmp = x * (t + (2.0 * (y + z))) else: tmp = (y * 5.0) + (x * (t + (z * 2.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -3.1e+41) || !(x <= 2.5)) tmp = Float64(x * Float64(t + Float64(2.0 * Float64(y + z)))); else tmp = Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(z * 2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -3.1e+41) || ~((x <= 2.5))) tmp = x * (t + (2.0 * (y + z))); else tmp = (y * 5.0) + (x * (t + (z * 2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -3.1e+41], N[Not[LessEqual[x, 2.5]], $MachinePrecision]], N[(x * N[(t + N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.1 \cdot 10^{+41} \lor \neg \left(x \leq 2.5\right):\\
\;\;\;\;x \cdot \left(t + 2 \cdot \left(y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot \left(t + z \cdot 2\right)\\
\end{array}
\end{array}
if x < -3.1e41 or 2.5 < x Initial program 99.9%
fma-def99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in x around inf 99.9%
if -3.1e41 < x < 2.5Initial program 100.0%
Taylor expanded in y around 0 98.7%
Simplified98.7%
Final simplification99.2%
(FPCore (x y z t) :precision binary64 (if (<= x -4e+99) (* x (+ t (* 2.0 (+ y z)))) (+ (* x (+ t (* z 2.0))) (* y (+ 5.0 (* x 2.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4e+99) {
tmp = x * (t + (2.0 * (y + z)));
} else {
tmp = (x * (t + (z * 2.0))) + (y * (5.0 + (x * 2.0)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-4d+99)) then
tmp = x * (t + (2.0d0 * (y + z)))
else
tmp = (x * (t + (z * 2.0d0))) + (y * (5.0d0 + (x * 2.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4e+99) {
tmp = x * (t + (2.0 * (y + z)));
} else {
tmp = (x * (t + (z * 2.0))) + (y * (5.0 + (x * 2.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4e+99: tmp = x * (t + (2.0 * (y + z))) else: tmp = (x * (t + (z * 2.0))) + (y * (5.0 + (x * 2.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4e+99) tmp = Float64(x * Float64(t + Float64(2.0 * Float64(y + z)))); else tmp = Float64(Float64(x * Float64(t + Float64(z * 2.0))) + Float64(y * Float64(5.0 + Float64(x * 2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -4e+99) tmp = x * (t + (2.0 * (y + z))); else tmp = (x * (t + (z * 2.0))) + (y * (5.0 + (x * 2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4e+99], N[(x * N[(t + N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+99}:\\
\;\;\;\;x \cdot \left(t + 2 \cdot \left(y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right) + y \cdot \left(5 + x \cdot 2\right)\\
\end{array}
\end{array}
if x < -3.9999999999999999e99Initial program 100.0%
fma-def100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if -3.9999999999999999e99 < x Initial program 99.9%
Taylor expanded in y around 0 99.0%
Final simplification99.2%
(FPCore (x y z t) :precision binary64 (if (or (<= x -3.5e-86) (not (<= x 1.8e-164))) (* x (+ t (* 2.0 (+ y z)))) (+ (* y 5.0) (* x t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3.5e-86) || !(x <= 1.8e-164)) {
tmp = x * (t + (2.0 * (y + z)));
} else {
tmp = (y * 5.0) + (x * t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-3.5d-86)) .or. (.not. (x <= 1.8d-164))) then
tmp = x * (t + (2.0d0 * (y + z)))
else
tmp = (y * 5.0d0) + (x * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3.5e-86) || !(x <= 1.8e-164)) {
tmp = x * (t + (2.0 * (y + z)));
} else {
tmp = (y * 5.0) + (x * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -3.5e-86) or not (x <= 1.8e-164): tmp = x * (t + (2.0 * (y + z))) else: tmp = (y * 5.0) + (x * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -3.5e-86) || !(x <= 1.8e-164)) tmp = Float64(x * Float64(t + Float64(2.0 * Float64(y + z)))); else tmp = Float64(Float64(y * 5.0) + Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -3.5e-86) || ~((x <= 1.8e-164))) tmp = x * (t + (2.0 * (y + z))); else tmp = (y * 5.0) + (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -3.5e-86], N[Not[LessEqual[x, 1.8e-164]], $MachinePrecision]], N[(x * N[(t + N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{-86} \lor \neg \left(x \leq 1.8 \cdot 10^{-164}\right):\\
\;\;\;\;x \cdot \left(t + 2 \cdot \left(y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot t\\
\end{array}
\end{array}
if x < -3.50000000000000021e-86 or 1.79999999999999997e-164 < x Initial program 99.9%
fma-def99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in x around inf 93.6%
if -3.50000000000000021e-86 < x < 1.79999999999999997e-164Initial program 100.0%
Taylor expanded in t around inf 80.1%
Simplified80.1%
Final simplification88.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5e+86) (not (<= y 2.8e+89))) (* y (+ x 5.0)) (* x (+ t (* z 2.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5e+86) || !(y <= 2.8e+89)) {
tmp = y * (x + 5.0);
} else {
tmp = x * (t + (z * 2.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-5d+86)) .or. (.not. (y <= 2.8d+89))) then
tmp = y * (x + 5.0d0)
else
tmp = x * (t + (z * 2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5e+86) || !(y <= 2.8e+89)) {
tmp = y * (x + 5.0);
} else {
tmp = x * (t + (z * 2.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5e+86) or not (y <= 2.8e+89): tmp = y * (x + 5.0) else: tmp = x * (t + (z * 2.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5e+86) || !(y <= 2.8e+89)) tmp = Float64(y * Float64(x + 5.0)); else tmp = Float64(x * Float64(t + Float64(z * 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -5e+86) || ~((y <= 2.8e+89))) tmp = y * (x + 5.0); else tmp = x * (t + (z * 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5e+86], N[Not[LessEqual[y, 2.8e+89]], $MachinePrecision]], N[(y * N[(x + 5.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+86} \lor \neg \left(y \leq 2.8 \cdot 10^{+89}\right):\\
\;\;\;\;y \cdot \left(x + 5\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\end{array}
\end{array}
if y < -4.9999999999999998e86 or 2.7999999999999998e89 < y Initial program 99.9%
associate-+r+99.9%
add-cube-cbrt99.7%
pow399.7%
+-commutative99.7%
count-299.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 78.4%
+-commutative78.4%
Simplified78.4%
if -4.9999999999999998e86 < y < 2.7999999999999998e89Initial program 100.0%
Taylor expanded in y around 0 94.7%
Simplified94.7%
Taylor expanded in x around inf 80.1%
Final simplification79.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.5e+86) (not (<= y 2.3e-19))) (* y (+ 5.0 (* x 2.0))) (* x (+ t (* z 2.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.5e+86) || !(y <= 2.3e-19)) {
tmp = y * (5.0 + (x * 2.0));
} else {
tmp = x * (t + (z * 2.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-5.5d+86)) .or. (.not. (y <= 2.3d-19))) then
tmp = y * (5.0d0 + (x * 2.0d0))
else
tmp = x * (t + (z * 2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.5e+86) || !(y <= 2.3e-19)) {
tmp = y * (5.0 + (x * 2.0));
} else {
tmp = x * (t + (z * 2.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5.5e+86) or not (y <= 2.3e-19): tmp = y * (5.0 + (x * 2.0)) else: tmp = x * (t + (z * 2.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5.5e+86) || !(y <= 2.3e-19)) tmp = Float64(y * Float64(5.0 + Float64(x * 2.0))); else tmp = Float64(x * Float64(t + Float64(z * 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -5.5e+86) || ~((y <= 2.3e-19))) tmp = y * (5.0 + (x * 2.0)); else tmp = x * (t + (z * 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.5e+86], N[Not[LessEqual[y, 2.3e-19]], $MachinePrecision]], N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+86} \lor \neg \left(y \leq 2.3 \cdot 10^{-19}\right):\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\end{array}
\end{array}
if y < -5.5000000000000002e86 or 2.2999999999999998e-19 < y Initial program 99.9%
Taylor expanded in y around inf 79.8%
if -5.5000000000000002e86 < y < 2.2999999999999998e-19Initial program 100.0%
Taylor expanded in y around 0 96.0%
Simplified96.0%
Taylor expanded in x around inf 83.0%
Final simplification81.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -7e+86) (not (<= y 1.38e-58))) (* y (+ x 5.0)) (* x t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7e+86) || !(y <= 1.38e-58)) {
tmp = y * (x + 5.0);
} else {
tmp = x * t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-7d+86)) .or. (.not. (y <= 1.38d-58))) then
tmp = y * (x + 5.0d0)
else
tmp = x * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7e+86) || !(y <= 1.38e-58)) {
tmp = y * (x + 5.0);
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -7e+86) or not (y <= 1.38e-58): tmp = y * (x + 5.0) else: tmp = x * t return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -7e+86) || !(y <= 1.38e-58)) tmp = Float64(y * Float64(x + 5.0)); else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -7e+86) || ~((y <= 1.38e-58))) tmp = y * (x + 5.0); else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -7e+86], N[Not[LessEqual[y, 1.38e-58]], $MachinePrecision]], N[(y * N[(x + 5.0), $MachinePrecision]), $MachinePrecision], N[(x * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+86} \lor \neg \left(y \leq 1.38 \cdot 10^{-58}\right):\\
\;\;\;\;y \cdot \left(x + 5\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if y < -7.00000000000000038e86 or 1.37999999999999996e-58 < y Initial program 99.9%
associate-+r+99.9%
add-cube-cbrt99.6%
pow399.6%
+-commutative99.6%
count-299.6%
fma-def99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 68.1%
+-commutative68.1%
Simplified68.1%
if -7.00000000000000038e86 < y < 1.37999999999999996e-58Initial program 100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in t around inf 43.7%
*-commutative43.7%
Simplified43.7%
Final simplification54.2%
(FPCore (x y z t) :precision binary64 (+ (* y 5.0) (* x (+ t (+ y (+ z (+ y z)))))))
double code(double x, double y, double z, double t) {
return (y * 5.0) + (x * (t + (y + (z + (y + z)))));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (y * 5.0d0) + (x * (t + (y + (z + (y + z)))))
end function
public static double code(double x, double y, double z, double t) {
return (y * 5.0) + (x * (t + (y + (z + (y + z)))));
}
def code(x, y, z, t): return (y * 5.0) + (x * (t + (y + (z + (y + z)))))
function code(x, y, z, t) return Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(y + Float64(z + Float64(y + z)))))) end
function tmp = code(x, y, z, t) tmp = (y * 5.0) + (x * (t + (y + (z + (y + z))))); end
code[x_, y_, z_, t_] := N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(y + N[(z + N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot 5 + x \cdot \left(t + \left(y + \left(z + \left(y + z\right)\right)\right)\right)
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -8e+86) (not (<= y 2.1e+75))) (* y 5.0) (* x t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -8e+86) || !(y <= 2.1e+75)) {
tmp = y * 5.0;
} else {
tmp = x * t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-8d+86)) .or. (.not. (y <= 2.1d+75))) then
tmp = y * 5.0d0
else
tmp = x * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -8e+86) || !(y <= 2.1e+75)) {
tmp = y * 5.0;
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -8e+86) or not (y <= 2.1e+75): tmp = y * 5.0 else: tmp = x * t return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -8e+86) || !(y <= 2.1e+75)) tmp = Float64(y * 5.0); else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -8e+86) || ~((y <= 2.1e+75))) tmp = y * 5.0; else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -8e+86], N[Not[LessEqual[y, 2.1e+75]], $MachinePrecision]], N[(y * 5.0), $MachinePrecision], N[(x * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+86} \lor \neg \left(y \leq 2.1 \cdot 10^{+75}\right):\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if y < -8.0000000000000001e86 or 2.09999999999999999e75 < y Initial program 99.9%
Taylor expanded in x around 0 45.7%
Simplified45.7%
if -8.0000000000000001e86 < y < 2.09999999999999999e75Initial program 100.0%
Taylor expanded in y around 0 98.8%
Taylor expanded in t around inf 41.8%
*-commutative41.8%
Simplified41.8%
Final simplification43.1%
(FPCore (x y z t) :precision binary64 (* x t))
double code(double x, double y, double z, double t) {
return x * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x * t
end function
public static double code(double x, double y, double z, double t) {
return x * t;
}
def code(x, y, z, t): return x * t
function code(x, y, z, t) return Float64(x * t) end
function tmp = code(x, y, z, t) tmp = x * t; end
code[x_, y_, z_, t_] := N[(x * t), $MachinePrecision]
\begin{array}{l}
\\
x \cdot t
\end{array}
Initial program 100.0%
Taylor expanded in y around 0 96.1%
Taylor expanded in t around inf 30.6%
*-commutative30.6%
Simplified30.6%
Final simplification30.6%
herbie shell --seed 2024020
(FPCore (x y z t)
:name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, B"
:precision binary64
(+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))