
(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 14 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 y 5.0 (* x (fma (+ y z) 2.0 t))))
double code(double x, double y, double z, double t) {
return fma(y, 5.0, (x * fma((y + z), 2.0, t)));
}
function code(x, y, z, t) return fma(y, 5.0, Float64(x * fma(Float64(y + z), 2.0, t))) end
code[x_, y_, z_, t_] := N[(y * 5.0 + N[(x * N[(N[(y + z), $MachinePrecision] * 2.0 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, 5, x \cdot \mathsf{fma}\left(y + z, 2, t\right)\right)
\end{array}
Initial program 99.9%
+-commutative99.9%
fma-def100.0%
distribute-rgt-in95.7%
associate-+l+95.7%
+-commutative95.7%
count-295.7%
distribute-rgt-in100.0%
*-commutative100.0%
fma-def100.0%
Applied egg-rr100.0%
Final simplification100.0%
(FPCore (x y z t) :precision binary64 (fma x (+ t (* (+ y z) 2.0)) (* y 5.0)))
double code(double x, double y, double z, double t) {
return fma(x, (t + ((y + z) * 2.0)), (y * 5.0));
}
function code(x, y, z, t) return fma(x, Float64(t + Float64(Float64(y + z) * 2.0)), Float64(y * 5.0)) end
code[x_, y_, z_, t_] := N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, t + \left(y + z\right) \cdot 2, y \cdot 5\right)
\end{array}
Initial program 99.9%
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 (+ (* y 5.0) (* x t))) (t_2 (* x (+ t (* (+ y z) 2.0)))))
(if (<= x -8.5e-10)
t_2
(if (<= x -4.1e-248)
t_1
(if (<= x 1.3e-193)
(+ (* y 5.0) (* 2.0 (* x z)))
(if (<= x 1.2e-8) 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 + ((y + z) * 2.0));
double tmp;
if (x <= -8.5e-10) {
tmp = t_2;
} else if (x <= -4.1e-248) {
tmp = t_1;
} else if (x <= 1.3e-193) {
tmp = (y * 5.0) + (2.0 * (x * z));
} else if (x <= 1.2e-8) {
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 + ((y + z) * 2.0d0))
if (x <= (-8.5d-10)) then
tmp = t_2
else if (x <= (-4.1d-248)) then
tmp = t_1
else if (x <= 1.3d-193) then
tmp = (y * 5.0d0) + (2.0d0 * (x * z))
else if (x <= 1.2d-8) 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 + ((y + z) * 2.0));
double tmp;
if (x <= -8.5e-10) {
tmp = t_2;
} else if (x <= -4.1e-248) {
tmp = t_1;
} else if (x <= 1.3e-193) {
tmp = (y * 5.0) + (2.0 * (x * z));
} else if (x <= 1.2e-8) {
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 + ((y + z) * 2.0)) tmp = 0 if x <= -8.5e-10: tmp = t_2 elif x <= -4.1e-248: tmp = t_1 elif x <= 1.3e-193: tmp = (y * 5.0) + (2.0 * (x * z)) elif x <= 1.2e-8: 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(Float64(y + z) * 2.0))) tmp = 0.0 if (x <= -8.5e-10) tmp = t_2; elseif (x <= -4.1e-248) tmp = t_1; elseif (x <= 1.3e-193) tmp = Float64(Float64(y * 5.0) + Float64(2.0 * Float64(x * z))); elseif (x <= 1.2e-8) 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 + ((y + z) * 2.0)); tmp = 0.0; if (x <= -8.5e-10) tmp = t_2; elseif (x <= -4.1e-248) tmp = t_1; elseif (x <= 1.3e-193) tmp = (y * 5.0) + (2.0 * (x * z)); elseif (x <= 1.2e-8) 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[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.5e-10], t$95$2, If[LessEqual[x, -4.1e-248], t$95$1, If[LessEqual[x, 1.3e-193], N[(N[(y * 5.0), $MachinePrecision] + N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.2e-8], 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 + \left(y + z\right) \cdot 2\right)\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{-10}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -4.1 \cdot 10^{-248}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-193}:\\
\;\;\;\;y \cdot 5 + 2 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -8.4999999999999996e-10 or 1.19999999999999999e-8 < 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 99.0%
if -8.4999999999999996e-10 < x < -4.10000000000000033e-248 or 1.30000000000000004e-193 < x < 1.19999999999999999e-8Initial program 99.9%
+-commutative99.9%
fma-def100.0%
distribute-rgt-in100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
distribute-rgt-in100.0%
*-commutative100.0%
fma-def100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 85.7%
*-commutative85.7%
Simplified85.7%
fma-udef85.6%
Applied egg-rr85.6%
if -4.10000000000000033e-248 < x < 1.30000000000000004e-193Initial program 99.9%
fma-def99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in t around 0 96.2%
Taylor expanded in y around 0 96.2%
Final simplification94.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 2.0 (* x z))))
(if (<= t -6.1e+106)
(* x t)
(if (<= t -2.95e-167)
(* y 5.0)
(if (<= t 9.2e-189)
t_1
(if (<= t 6e-136) (* y 5.0) (if (<= t 1.15e+46) t_1 (* x t))))))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 * (x * z);
double tmp;
if (t <= -6.1e+106) {
tmp = x * t;
} else if (t <= -2.95e-167) {
tmp = y * 5.0;
} else if (t <= 9.2e-189) {
tmp = t_1;
} else if (t <= 6e-136) {
tmp = y * 5.0;
} else if (t <= 1.15e+46) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (x * z)
if (t <= (-6.1d+106)) then
tmp = x * t
else if (t <= (-2.95d-167)) then
tmp = y * 5.0d0
else if (t <= 9.2d-189) then
tmp = t_1
else if (t <= 6d-136) then
tmp = y * 5.0d0
else if (t <= 1.15d+46) then
tmp = t_1
else
tmp = x * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 2.0 * (x * z);
double tmp;
if (t <= -6.1e+106) {
tmp = x * t;
} else if (t <= -2.95e-167) {
tmp = y * 5.0;
} else if (t <= 9.2e-189) {
tmp = t_1;
} else if (t <= 6e-136) {
tmp = y * 5.0;
} else if (t <= 1.15e+46) {
tmp = t_1;
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 * (x * z) tmp = 0 if t <= -6.1e+106: tmp = x * t elif t <= -2.95e-167: tmp = y * 5.0 elif t <= 9.2e-189: tmp = t_1 elif t <= 6e-136: tmp = y * 5.0 elif t <= 1.15e+46: tmp = t_1 else: tmp = x * t return tmp
function code(x, y, z, t) t_1 = Float64(2.0 * Float64(x * z)) tmp = 0.0 if (t <= -6.1e+106) tmp = Float64(x * t); elseif (t <= -2.95e-167) tmp = Float64(y * 5.0); elseif (t <= 9.2e-189) tmp = t_1; elseif (t <= 6e-136) tmp = Float64(y * 5.0); elseif (t <= 1.15e+46) tmp = t_1; else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 * (x * z); tmp = 0.0; if (t <= -6.1e+106) tmp = x * t; elseif (t <= -2.95e-167) tmp = y * 5.0; elseif (t <= 9.2e-189) tmp = t_1; elseif (t <= 6e-136) tmp = y * 5.0; elseif (t <= 1.15e+46) tmp = t_1; else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.1e+106], N[(x * t), $MachinePrecision], If[LessEqual[t, -2.95e-167], N[(y * 5.0), $MachinePrecision], If[LessEqual[t, 9.2e-189], t$95$1, If[LessEqual[t, 6e-136], N[(y * 5.0), $MachinePrecision], If[LessEqual[t, 1.15e+46], t$95$1, N[(x * t), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;t \leq -6.1 \cdot 10^{+106}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;t \leq -2.95 \cdot 10^{-167}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{-189}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-136}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if t < -6.10000000000000001e106 or 1.15e46 < t Initial program 100.0%
Taylor expanded in t around inf 73.8%
if -6.10000000000000001e106 < t < -2.95000000000000011e-167 or 9.1999999999999993e-189 < t < 5.9999999999999996e-136Initial program 99.9%
Taylor expanded in x around 0 46.8%
if -2.95000000000000011e-167 < t < 9.1999999999999993e-189 or 5.9999999999999996e-136 < t < 1.15e46Initial program 99.9%
Taylor expanded in z around inf 51.1%
Final simplification58.8%
(FPCore (x y z t)
:precision binary64
(if (or (<= y -1.65e+153)
(and (not (<= y -4.2e+148)) (or (<= y -4e+27) (not (<= y 2.9e+29)))))
(* 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 <= -1.65e+153) || (!(y <= -4.2e+148) && ((y <= -4e+27) || !(y <= 2.9e+29)))) {
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 <= (-1.65d+153)) .or. (.not. (y <= (-4.2d+148))) .and. (y <= (-4d+27)) .or. (.not. (y <= 2.9d+29))) 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 <= -1.65e+153) || (!(y <= -4.2e+148) && ((y <= -4e+27) || !(y <= 2.9e+29)))) {
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 <= -1.65e+153) or (not (y <= -4.2e+148) and ((y <= -4e+27) or not (y <= 2.9e+29))): 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 <= -1.65e+153) || (!(y <= -4.2e+148) && ((y <= -4e+27) || !(y <= 2.9e+29)))) 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 <= -1.65e+153) || (~((y <= -4.2e+148)) && ((y <= -4e+27) || ~((y <= 2.9e+29))))) 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, -1.65e+153], And[N[Not[LessEqual[y, -4.2e+148]], $MachinePrecision], Or[LessEqual[y, -4e+27], N[Not[LessEqual[y, 2.9e+29]], $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 -1.65 \cdot 10^{+153} \lor \neg \left(y \leq -4.2 \cdot 10^{+148}\right) \land \left(y \leq -4 \cdot 10^{+27} \lor \neg \left(y \leq 2.9 \cdot 10^{+29}\right)\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 < -1.64999999999999997e153 or -4.19999999999999998e148 < y < -4.0000000000000001e27 or 2.8999999999999999e29 < y Initial program 99.9%
Taylor expanded in y around inf 82.0%
Simplified82.0%
if -1.64999999999999997e153 < y < -4.19999999999999998e148 or -4.0000000000000001e27 < y < 2.8999999999999999e29Initial program 100.0%
Taylor expanded in y around 0 87.3%
Final simplification84.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ t (* z 2.0)))))
(if (<= x -1.95e+77)
t_1
(if (<= x -13600000000.0)
(* x (+ t (* y 2.0)))
(if (or (<= x -2.55e-66) (not (<= x 5.8e-92))) t_1 (* y 5.0))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t + (z * 2.0));
double tmp;
if (x <= -1.95e+77) {
tmp = t_1;
} else if (x <= -13600000000.0) {
tmp = x * (t + (y * 2.0));
} else if ((x <= -2.55e-66) || !(x <= 5.8e-92)) {
tmp = t_1;
} else {
tmp = y * 5.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) :: t_1
real(8) :: tmp
t_1 = x * (t + (z * 2.0d0))
if (x <= (-1.95d+77)) then
tmp = t_1
else if (x <= (-13600000000.0d0)) then
tmp = x * (t + (y * 2.0d0))
else if ((x <= (-2.55d-66)) .or. (.not. (x <= 5.8d-92))) then
tmp = t_1
else
tmp = y * 5.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (t + (z * 2.0));
double tmp;
if (x <= -1.95e+77) {
tmp = t_1;
} else if (x <= -13600000000.0) {
tmp = x * (t + (y * 2.0));
} else if ((x <= -2.55e-66) || !(x <= 5.8e-92)) {
tmp = t_1;
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t + (z * 2.0)) tmp = 0 if x <= -1.95e+77: tmp = t_1 elif x <= -13600000000.0: tmp = x * (t + (y * 2.0)) elif (x <= -2.55e-66) or not (x <= 5.8e-92): tmp = t_1 else: tmp = y * 5.0 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t + Float64(z * 2.0))) tmp = 0.0 if (x <= -1.95e+77) tmp = t_1; elseif (x <= -13600000000.0) tmp = Float64(x * Float64(t + Float64(y * 2.0))); elseif ((x <= -2.55e-66) || !(x <= 5.8e-92)) tmp = t_1; else tmp = Float64(y * 5.0); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t + (z * 2.0)); tmp = 0.0; if (x <= -1.95e+77) tmp = t_1; elseif (x <= -13600000000.0) tmp = x * (t + (y * 2.0)); elseif ((x <= -2.55e-66) || ~((x <= 5.8e-92))) tmp = t_1; else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.95e+77], t$95$1, If[LessEqual[x, -13600000000.0], N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -2.55e-66], N[Not[LessEqual[x, 5.8e-92]], $MachinePrecision]], t$95$1, N[(y * 5.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(t + z \cdot 2\right)\\
\mathbf{if}\;x \leq -1.95 \cdot 10^{+77}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -13600000000:\\
\;\;\;\;x \cdot \left(t + y \cdot 2\right)\\
\mathbf{elif}\;x \leq -2.55 \cdot 10^{-66} \lor \neg \left(x \leq 5.8 \cdot 10^{-92}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -1.9499999999999999e77 or -1.36e10 < x < -2.55000000000000011e-66 or 5.79999999999999969e-92 < x Initial program 100.0%
Taylor expanded in y around 0 73.7%
if -1.9499999999999999e77 < x < -1.36e10Initial program 100.0%
fma-def100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 97.6%
Taylor expanded in z around 0 82.6%
if -2.55000000000000011e-66 < x < 5.79999999999999969e-92Initial program 99.9%
Taylor expanded in x around 0 66.6%
Final simplification71.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (+ 5.0 (* x 2.0)))))
(if (<= y -1.3e+206)
t_1
(if (<= y -4.2e+67)
(+ (* y 5.0) (* x t))
(if (or (<= y -4e+27) (not (<= y 3.4e+31)))
t_1
(* x (+ t (* z 2.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (5.0 + (x * 2.0));
double tmp;
if (y <= -1.3e+206) {
tmp = t_1;
} else if (y <= -4.2e+67) {
tmp = (y * 5.0) + (x * t);
} else if ((y <= -4e+27) || !(y <= 3.4e+31)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = y * (5.0d0 + (x * 2.0d0))
if (y <= (-1.3d+206)) then
tmp = t_1
else if (y <= (-4.2d+67)) then
tmp = (y * 5.0d0) + (x * t)
else if ((y <= (-4d+27)) .or. (.not. (y <= 3.4d+31))) then
tmp = t_1
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 t_1 = y * (5.0 + (x * 2.0));
double tmp;
if (y <= -1.3e+206) {
tmp = t_1;
} else if (y <= -4.2e+67) {
tmp = (y * 5.0) + (x * t);
} else if ((y <= -4e+27) || !(y <= 3.4e+31)) {
tmp = t_1;
} else {
tmp = x * (t + (z * 2.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (5.0 + (x * 2.0)) tmp = 0 if y <= -1.3e+206: tmp = t_1 elif y <= -4.2e+67: tmp = (y * 5.0) + (x * t) elif (y <= -4e+27) or not (y <= 3.4e+31): tmp = t_1 else: tmp = x * (t + (z * 2.0)) return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(5.0 + Float64(x * 2.0))) tmp = 0.0 if (y <= -1.3e+206) tmp = t_1; elseif (y <= -4.2e+67) tmp = Float64(Float64(y * 5.0) + Float64(x * t)); elseif ((y <= -4e+27) || !(y <= 3.4e+31)) tmp = t_1; else tmp = Float64(x * Float64(t + Float64(z * 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (5.0 + (x * 2.0)); tmp = 0.0; if (y <= -1.3e+206) tmp = t_1; elseif (y <= -4.2e+67) tmp = (y * 5.0) + (x * t); elseif ((y <= -4e+27) || ~((y <= 3.4e+31))) tmp = t_1; else tmp = x * (t + (z * 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.3e+206], t$95$1, If[LessEqual[y, -4.2e+67], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -4e+27], N[Not[LessEqual[y, 3.4e+31]], $MachinePrecision]], t$95$1, N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{+206}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{+67}:\\
\;\;\;\;y \cdot 5 + x \cdot t\\
\mathbf{elif}\;y \leq -4 \cdot 10^{+27} \lor \neg \left(y \leq 3.4 \cdot 10^{+31}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\end{array}
\end{array}
if y < -1.29999999999999994e206 or -4.2000000000000003e67 < y < -4.0000000000000001e27 or 3.3999999999999998e31 < y Initial program 99.9%
Taylor expanded in y around inf 85.1%
Simplified85.1%
if -1.29999999999999994e206 < y < -4.2000000000000003e67Initial program 99.9%
+-commutative99.9%
fma-def100.0%
distribute-rgt-in94.4%
associate-+l+94.4%
+-commutative94.4%
count-294.4%
distribute-rgt-in100.0%
*-commutative100.0%
fma-def100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 83.5%
*-commutative83.5%
Simplified83.5%
fma-udef83.5%
Applied egg-rr83.5%
if -4.0000000000000001e27 < y < 3.3999999999999998e31Initial program 100.0%
Taylor expanded in y around 0 86.8%
Final simplification85.7%
(FPCore (x y z t)
:precision binary64
(if (<= t -1.32e+109)
(+ (* y 5.0) (* x t))
(if (<= t 1.25e+118)
(+ (* 2.0 (* x (+ y z))) (* y 5.0))
(* x (+ t (* (+ y z) 2.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.32e+109) {
tmp = (y * 5.0) + (x * t);
} else if (t <= 1.25e+118) {
tmp = (2.0 * (x * (y + z))) + (y * 5.0);
} else {
tmp = x * (t + ((y + 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 (t <= (-1.32d+109)) then
tmp = (y * 5.0d0) + (x * t)
else if (t <= 1.25d+118) then
tmp = (2.0d0 * (x * (y + z))) + (y * 5.0d0)
else
tmp = x * (t + ((y + z) * 2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.32e+109) {
tmp = (y * 5.0) + (x * t);
} else if (t <= 1.25e+118) {
tmp = (2.0 * (x * (y + z))) + (y * 5.0);
} else {
tmp = x * (t + ((y + z) * 2.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.32e+109: tmp = (y * 5.0) + (x * t) elif t <= 1.25e+118: tmp = (2.0 * (x * (y + z))) + (y * 5.0) else: tmp = x * (t + ((y + z) * 2.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.32e+109) tmp = Float64(Float64(y * 5.0) + Float64(x * t)); elseif (t <= 1.25e+118) tmp = Float64(Float64(2.0 * Float64(x * Float64(y + z))) + Float64(y * 5.0)); else tmp = Float64(x * Float64(t + Float64(Float64(y + z) * 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.32e+109) tmp = (y * 5.0) + (x * t); elseif (t <= 1.25e+118) tmp = (2.0 * (x * (y + z))) + (y * 5.0); else tmp = x * (t + ((y + z) * 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.32e+109], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+118], N[(N[(2.0 * N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.32 \cdot 10^{+109}:\\
\;\;\;\;y \cdot 5 + x \cdot t\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+118}:\\
\;\;\;\;2 \cdot \left(x \cdot \left(y + z\right)\right) + y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\end{array}
\end{array}
if t < -1.32000000000000008e109Initial program 99.9%
+-commutative99.9%
fma-def100.0%
distribute-rgt-in86.7%
associate-+l+86.7%
+-commutative86.7%
count-286.7%
distribute-rgt-in100.0%
*-commutative100.0%
fma-def100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 93.3%
*-commutative93.3%
Simplified93.3%
fma-udef93.3%
Applied egg-rr93.3%
if -1.32000000000000008e109 < t < 1.24999999999999993e118Initial program 99.9%
fma-def100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in t around 0 92.7%
if 1.24999999999999993e118 < t Initial program 100.0%
fma-def100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 91.4%
Final simplification92.6%
(FPCore (x y z t)
:precision binary64
(if (<= t -2.4e+107)
(+ (* x (+ t (+ y y))) (* y 5.0))
(if (<= t 2.95e+118)
(+ (* 2.0 (* x (+ y z))) (* y 5.0))
(* x (+ t (* (+ y z) 2.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.4e+107) {
tmp = (x * (t + (y + y))) + (y * 5.0);
} else if (t <= 2.95e+118) {
tmp = (2.0 * (x * (y + z))) + (y * 5.0);
} else {
tmp = x * (t + ((y + 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 (t <= (-2.4d+107)) then
tmp = (x * (t + (y + y))) + (y * 5.0d0)
else if (t <= 2.95d+118) then
tmp = (2.0d0 * (x * (y + z))) + (y * 5.0d0)
else
tmp = x * (t + ((y + z) * 2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.4e+107) {
tmp = (x * (t + (y + y))) + (y * 5.0);
} else if (t <= 2.95e+118) {
tmp = (2.0 * (x * (y + z))) + (y * 5.0);
} else {
tmp = x * (t + ((y + z) * 2.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -2.4e+107: tmp = (x * (t + (y + y))) + (y * 5.0) elif t <= 2.95e+118: tmp = (2.0 * (x * (y + z))) + (y * 5.0) else: tmp = x * (t + ((y + z) * 2.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -2.4e+107) tmp = Float64(Float64(x * Float64(t + Float64(y + y))) + Float64(y * 5.0)); elseif (t <= 2.95e+118) tmp = Float64(Float64(2.0 * Float64(x * Float64(y + z))) + Float64(y * 5.0)); else tmp = Float64(x * Float64(t + Float64(Float64(y + z) * 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -2.4e+107) tmp = (x * (t + (y + y))) + (y * 5.0); elseif (t <= 2.95e+118) tmp = (2.0 * (x * (y + z))) + (y * 5.0); else tmp = x * (t + ((y + z) * 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -2.4e+107], N[(N[(x * N[(t + N[(y + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.95e+118], N[(N[(2.0 * N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+107}:\\
\;\;\;\;x \cdot \left(t + \left(y + y\right)\right) + y \cdot 5\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{+118}:\\
\;\;\;\;2 \cdot \left(x \cdot \left(y + z\right)\right) + y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\end{array}
\end{array}
if t < -2.4000000000000001e107Initial program 99.9%
Taylor expanded in y around inf 97.7%
if -2.4000000000000001e107 < t < 2.9499999999999999e118Initial program 99.9%
fma-def100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in t around 0 92.7%
if 2.9499999999999999e118 < t Initial program 100.0%
fma-def100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 91.4%
Final simplification93.4%
(FPCore (x y z t) :precision binary64 (+ (* x (+ t (+ y (+ z (+ y z))))) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * (t + (y + (z + (y + z))))) + (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 * (t + (y + (z + (y + z))))) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * (t + (y + (z + (y + z))))) + (y * 5.0);
}
def code(x, y, z, t): return (x * (t + (y + (z + (y + z))))) + (y * 5.0)
function code(x, y, z, t) return Float64(Float64(x * Float64(t + Float64(y + Float64(z + Float64(y + z))))) + Float64(y * 5.0)) end
function tmp = code(x, y, z, t) tmp = (x * (t + (y + (z + (y + z))))) + (y * 5.0); end
code[x_, y_, z_, t_] := N[(N[(x * N[(t + N[(y + N[(z + N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(t + \left(y + \left(z + \left(y + z\right)\right)\right)\right) + y \cdot 5
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (if (or (<= x -5.6e-11) (not (<= x 3.7e-11))) (* x (+ t (* (+ y z) 2.0))) (+ (* y 5.0) (* x t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -5.6e-11) || !(x <= 3.7e-11)) {
tmp = x * (t + ((y + z) * 2.0));
} 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 <= (-5.6d-11)) .or. (.not. (x <= 3.7d-11))) then
tmp = x * (t + ((y + z) * 2.0d0))
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 <= -5.6e-11) || !(x <= 3.7e-11)) {
tmp = x * (t + ((y + z) * 2.0));
} else {
tmp = (y * 5.0) + (x * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -5.6e-11) or not (x <= 3.7e-11): tmp = x * (t + ((y + z) * 2.0)) else: tmp = (y * 5.0) + (x * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -5.6e-11) || !(x <= 3.7e-11)) tmp = Float64(x * Float64(t + Float64(Float64(y + z) * 2.0))); 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 <= -5.6e-11) || ~((x <= 3.7e-11))) tmp = x * (t + ((y + z) * 2.0)); else tmp = (y * 5.0) + (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -5.6e-11], N[Not[LessEqual[x, 3.7e-11]], $MachinePrecision]], N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.6 \cdot 10^{-11} \lor \neg \left(x \leq 3.7 \cdot 10^{-11}\right):\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot t\\
\end{array}
\end{array}
if x < -5.6e-11 or 3.7000000000000001e-11 < 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 99.0%
if -5.6e-11 < x < 3.7000000000000001e-11Initial program 99.9%
+-commutative99.9%
fma-def100.0%
distribute-rgt-in100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
distribute-rgt-in100.0%
*-commutative100.0%
fma-def100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 82.5%
*-commutative82.5%
Simplified82.5%
fma-udef82.5%
Applied egg-rr82.5%
Final simplification91.7%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.6e-8) (not (<= x 9.6e-43))) (* x (+ t (* y 2.0))) (* y 5.0)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.6e-8) || !(x <= 9.6e-43)) {
tmp = x * (t + (y * 2.0));
} else {
tmp = y * 5.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 <= (-2.6d-8)) .or. (.not. (x <= 9.6d-43))) then
tmp = x * (t + (y * 2.0d0))
else
tmp = y * 5.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.6e-8) || !(x <= 9.6e-43)) {
tmp = x * (t + (y * 2.0));
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2.6e-8) or not (x <= 9.6e-43): tmp = x * (t + (y * 2.0)) else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -2.6e-8) || !(x <= 9.6e-43)) tmp = Float64(x * Float64(t + Float64(y * 2.0))); else tmp = Float64(y * 5.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -2.6e-8) || ~((x <= 9.6e-43))) tmp = x * (t + (y * 2.0)); else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.6e-8], N[Not[LessEqual[x, 9.6e-43]], $MachinePrecision]], N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{-8} \lor \neg \left(x \leq 9.6 \cdot 10^{-43}\right):\\
\;\;\;\;x \cdot \left(t + y \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -2.6000000000000001e-8 or 9.6000000000000007e-43 < 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 97.8%
Taylor expanded in z around 0 66.2%
if -2.6000000000000001e-8 < x < 9.6000000000000007e-43Initial program 99.9%
Taylor expanded in x around 0 62.8%
Final simplification64.7%
(FPCore (x y z t) :precision binary64 (if (<= t -1.2e+107) (* x t) (if (<= t 7.6e+75) (* y 5.0) (* x t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.2e+107) {
tmp = x * t;
} else if (t <= 7.6e+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 (t <= (-1.2d+107)) then
tmp = x * t
else if (t <= 7.6d+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 (t <= -1.2e+107) {
tmp = x * t;
} else if (t <= 7.6e+75) {
tmp = y * 5.0;
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.2e+107: tmp = x * t elif t <= 7.6e+75: tmp = y * 5.0 else: tmp = x * t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.2e+107) tmp = Float64(x * t); elseif (t <= 7.6e+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 (t <= -1.2e+107) tmp = x * t; elseif (t <= 7.6e+75) tmp = y * 5.0; else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.2e+107], N[(x * t), $MachinePrecision], If[LessEqual[t, 7.6e+75], N[(y * 5.0), $MachinePrecision], N[(x * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+107}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{+75}:\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if t < -1.2e107 or 7.6000000000000005e75 < t Initial program 100.0%
Taylor expanded in t around inf 74.3%
if -1.2e107 < t < 7.6000000000000005e75Initial program 99.9%
Taylor expanded in x around 0 36.1%
Final simplification50.7%
(FPCore (x y z t) :precision binary64 (* y 5.0))
double code(double x, double y, double z, double t) {
return 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 = y * 5.0d0
end function
public static double code(double x, double y, double z, double t) {
return y * 5.0;
}
def code(x, y, z, t): return y * 5.0
function code(x, y, z, t) return Float64(y * 5.0) end
function tmp = code(x, y, z, t) tmp = y * 5.0; end
code[x_, y_, z_, t_] := N[(y * 5.0), $MachinePrecision]
\begin{array}{l}
\\
y \cdot 5
\end{array}
Initial program 99.9%
Taylor expanded in x around 0 28.6%
Final simplification28.6%
herbie shell --seed 2023275
(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)))