
(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 (+ t (* (+ y z) 2.0)))))
double code(double x, double y, double z, double t) {
return fma(y, 5.0, (x * (t + ((y + z) * 2.0))));
}
function code(x, y, z, t) return fma(y, 5.0, Float64(x * Float64(t + Float64(Float64(y + z) * 2.0)))) end
code[x_, y_, z_, t_] := N[(y * 5.0 + N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, 5, x \cdot \left(t + \left(y + z\right) \cdot 2\right)\right)
\end{array}
Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Final simplification100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ t (* z 2.0)))) (t_2 (* y (+ 5.0 (* x 2.0)))))
(if (<= y -2.9e+32)
t_2
(if (<= y -3.9e-29)
t_1
(if (<= y -3.8e-29)
(* y 5.0)
(if (<= y -1e-80)
t_1
(if (<= y -2.2e-94)
t_2
(if (<= y 2.95e+58)
t_1
(if (<= y 2e+107)
t_2
(if (<= y 1.18e+123)
(* x (* (+ y z) 2.0))
(if (<= y 3.2e+128) (* x (+ t (* y 2.0))) t_2)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t + (z * 2.0));
double t_2 = y * (5.0 + (x * 2.0));
double tmp;
if (y <= -2.9e+32) {
tmp = t_2;
} else if (y <= -3.9e-29) {
tmp = t_1;
} else if (y <= -3.8e-29) {
tmp = y * 5.0;
} else if (y <= -1e-80) {
tmp = t_1;
} else if (y <= -2.2e-94) {
tmp = t_2;
} else if (y <= 2.95e+58) {
tmp = t_1;
} else if (y <= 2e+107) {
tmp = t_2;
} else if (y <= 1.18e+123) {
tmp = x * ((y + z) * 2.0);
} else if (y <= 3.2e+128) {
tmp = x * (t + (y * 2.0));
} 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 = x * (t + (z * 2.0d0))
t_2 = y * (5.0d0 + (x * 2.0d0))
if (y <= (-2.9d+32)) then
tmp = t_2
else if (y <= (-3.9d-29)) then
tmp = t_1
else if (y <= (-3.8d-29)) then
tmp = y * 5.0d0
else if (y <= (-1d-80)) then
tmp = t_1
else if (y <= (-2.2d-94)) then
tmp = t_2
else if (y <= 2.95d+58) then
tmp = t_1
else if (y <= 2d+107) then
tmp = t_2
else if (y <= 1.18d+123) then
tmp = x * ((y + z) * 2.0d0)
else if (y <= 3.2d+128) then
tmp = x * (t + (y * 2.0d0))
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 = x * (t + (z * 2.0));
double t_2 = y * (5.0 + (x * 2.0));
double tmp;
if (y <= -2.9e+32) {
tmp = t_2;
} else if (y <= -3.9e-29) {
tmp = t_1;
} else if (y <= -3.8e-29) {
tmp = y * 5.0;
} else if (y <= -1e-80) {
tmp = t_1;
} else if (y <= -2.2e-94) {
tmp = t_2;
} else if (y <= 2.95e+58) {
tmp = t_1;
} else if (y <= 2e+107) {
tmp = t_2;
} else if (y <= 1.18e+123) {
tmp = x * ((y + z) * 2.0);
} else if (y <= 3.2e+128) {
tmp = x * (t + (y * 2.0));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t + (z * 2.0)) t_2 = y * (5.0 + (x * 2.0)) tmp = 0 if y <= -2.9e+32: tmp = t_2 elif y <= -3.9e-29: tmp = t_1 elif y <= -3.8e-29: tmp = y * 5.0 elif y <= -1e-80: tmp = t_1 elif y <= -2.2e-94: tmp = t_2 elif y <= 2.95e+58: tmp = t_1 elif y <= 2e+107: tmp = t_2 elif y <= 1.18e+123: tmp = x * ((y + z) * 2.0) elif y <= 3.2e+128: tmp = x * (t + (y * 2.0)) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t + Float64(z * 2.0))) t_2 = Float64(y * Float64(5.0 + Float64(x * 2.0))) tmp = 0.0 if (y <= -2.9e+32) tmp = t_2; elseif (y <= -3.9e-29) tmp = t_1; elseif (y <= -3.8e-29) tmp = Float64(y * 5.0); elseif (y <= -1e-80) tmp = t_1; elseif (y <= -2.2e-94) tmp = t_2; elseif (y <= 2.95e+58) tmp = t_1; elseif (y <= 2e+107) tmp = t_2; elseif (y <= 1.18e+123) tmp = Float64(x * Float64(Float64(y + z) * 2.0)); elseif (y <= 3.2e+128) tmp = Float64(x * Float64(t + Float64(y * 2.0))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t + (z * 2.0)); t_2 = y * (5.0 + (x * 2.0)); tmp = 0.0; if (y <= -2.9e+32) tmp = t_2; elseif (y <= -3.9e-29) tmp = t_1; elseif (y <= -3.8e-29) tmp = y * 5.0; elseif (y <= -1e-80) tmp = t_1; elseif (y <= -2.2e-94) tmp = t_2; elseif (y <= 2.95e+58) tmp = t_1; elseif (y <= 2e+107) tmp = t_2; elseif (y <= 1.18e+123) tmp = x * ((y + z) * 2.0); elseif (y <= 3.2e+128) tmp = x * (t + (y * 2.0)); else tmp = t_2; 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]}, Block[{t$95$2 = N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.9e+32], t$95$2, If[LessEqual[y, -3.9e-29], t$95$1, If[LessEqual[y, -3.8e-29], N[(y * 5.0), $MachinePrecision], If[LessEqual[y, -1e-80], t$95$1, If[LessEqual[y, -2.2e-94], t$95$2, If[LessEqual[y, 2.95e+58], t$95$1, If[LessEqual[y, 2e+107], t$95$2, If[LessEqual[y, 1.18e+123], N[(x * N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+128], N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(t + z \cdot 2\right)\\
t_2 := y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3.9 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-29}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;y \leq -1 \cdot 10^{-80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{-94}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 2.95 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+107}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.18 \cdot 10^{+123}:\\
\;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2\right)\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+128}:\\
\;\;\;\;x \cdot \left(t + y \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.90000000000000003e32 or -9.99999999999999961e-81 < y < -2.20000000000000001e-94 or 2.94999999999999986e58 < y < 1.9999999999999999e107 or 3.19999999999999986e128 < y Initial program 100.0%
Taylor expanded in y around inf 75.2%
Simplified75.2%
if -2.90000000000000003e32 < y < -3.8999999999999998e-29 or -3.79999999999999976e-29 < y < -9.99999999999999961e-81 or -2.20000000000000001e-94 < y < 2.94999999999999986e58Initial program 99.9%
+-commutative99.9%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 99.8%
fma-define99.8%
associate-*r/99.9%
*-commutative99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 75.9%
if -3.8999999999999998e-29 < y < -3.79999999999999976e-29Initial program 100.0%
Taylor expanded in x around 0 100.0%
Simplified100.0%
if 1.9999999999999999e107 < y < 1.18000000000000006e123Initial program 100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in x around inf 80.2%
associate-*r*80.2%
*-commutative80.2%
+-commutative80.2%
associate-*r*80.2%
Simplified80.2%
if 1.18000000000000006e123 < y < 3.19999999999999986e128Initial program 100.0%
Taylor expanded in y around inf 100.0%
Taylor expanded in x around inf 94.6%
Final simplification76.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (* x 2.0))) (t_2 (* x (* z 2.0))))
(if (<= x -4.8e+219)
t_1
(if (<= x -4.8e+178)
t_2
(if (<= x -4.5e+22)
t_1
(if (<= x 1.15e-76)
(* y 5.0)
(if (<= x 1.65e+39)
(* x t)
(if (<= x 8.5e+89)
t_2
(if (<= x 3.1e+129) t_1 (if (<= x 2e+153) (* x t) t_2))))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (x * 2.0);
double t_2 = x * (z * 2.0);
double tmp;
if (x <= -4.8e+219) {
tmp = t_1;
} else if (x <= -4.8e+178) {
tmp = t_2;
} else if (x <= -4.5e+22) {
tmp = t_1;
} else if (x <= 1.15e-76) {
tmp = y * 5.0;
} else if (x <= 1.65e+39) {
tmp = x * t;
} else if (x <= 8.5e+89) {
tmp = t_2;
} else if (x <= 3.1e+129) {
tmp = t_1;
} else if (x <= 2e+153) {
tmp = x * t;
} 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 * (x * 2.0d0)
t_2 = x * (z * 2.0d0)
if (x <= (-4.8d+219)) then
tmp = t_1
else if (x <= (-4.8d+178)) then
tmp = t_2
else if (x <= (-4.5d+22)) then
tmp = t_1
else if (x <= 1.15d-76) then
tmp = y * 5.0d0
else if (x <= 1.65d+39) then
tmp = x * t
else if (x <= 8.5d+89) then
tmp = t_2
else if (x <= 3.1d+129) then
tmp = t_1
else if (x <= 2d+153) then
tmp = x * t
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 * (x * 2.0);
double t_2 = x * (z * 2.0);
double tmp;
if (x <= -4.8e+219) {
tmp = t_1;
} else if (x <= -4.8e+178) {
tmp = t_2;
} else if (x <= -4.5e+22) {
tmp = t_1;
} else if (x <= 1.15e-76) {
tmp = y * 5.0;
} else if (x <= 1.65e+39) {
tmp = x * t;
} else if (x <= 8.5e+89) {
tmp = t_2;
} else if (x <= 3.1e+129) {
tmp = t_1;
} else if (x <= 2e+153) {
tmp = x * t;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (x * 2.0) t_2 = x * (z * 2.0) tmp = 0 if x <= -4.8e+219: tmp = t_1 elif x <= -4.8e+178: tmp = t_2 elif x <= -4.5e+22: tmp = t_1 elif x <= 1.15e-76: tmp = y * 5.0 elif x <= 1.65e+39: tmp = x * t elif x <= 8.5e+89: tmp = t_2 elif x <= 3.1e+129: tmp = t_1 elif x <= 2e+153: tmp = x * t else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(x * 2.0)) t_2 = Float64(x * Float64(z * 2.0)) tmp = 0.0 if (x <= -4.8e+219) tmp = t_1; elseif (x <= -4.8e+178) tmp = t_2; elseif (x <= -4.5e+22) tmp = t_1; elseif (x <= 1.15e-76) tmp = Float64(y * 5.0); elseif (x <= 1.65e+39) tmp = Float64(x * t); elseif (x <= 8.5e+89) tmp = t_2; elseif (x <= 3.1e+129) tmp = t_1; elseif (x <= 2e+153) tmp = Float64(x * t); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (x * 2.0); t_2 = x * (z * 2.0); tmp = 0.0; if (x <= -4.8e+219) tmp = t_1; elseif (x <= -4.8e+178) tmp = t_2; elseif (x <= -4.5e+22) tmp = t_1; elseif (x <= 1.15e-76) tmp = y * 5.0; elseif (x <= 1.65e+39) tmp = x * t; elseif (x <= 8.5e+89) tmp = t_2; elseif (x <= 3.1e+129) tmp = t_1; elseif (x <= 2e+153) tmp = x * t; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(z * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.8e+219], t$95$1, If[LessEqual[x, -4.8e+178], t$95$2, If[LessEqual[x, -4.5e+22], t$95$1, If[LessEqual[x, 1.15e-76], N[(y * 5.0), $MachinePrecision], If[LessEqual[x, 1.65e+39], N[(x * t), $MachinePrecision], If[LessEqual[x, 8.5e+89], t$95$2, If[LessEqual[x, 3.1e+129], t$95$1, If[LessEqual[x, 2e+153], N[(x * t), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(x \cdot 2\right)\\
t_2 := x \cdot \left(z \cdot 2\right)\\
\mathbf{if}\;x \leq -4.8 \cdot 10^{+219}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -4.8 \cdot 10^{+178}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -4.5 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-76}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{+39}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{+89}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{+129}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+153}:\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -4.8000000000000001e219 or -4.8e178 < x < -4.4999999999999998e22 or 8.50000000000000045e89 < x < 3.1e129Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 45.4%
+-commutative45.4%
*-commutative45.4%
Simplified45.4%
Taylor expanded in x around inf 43.6%
*-commutative43.6%
*-commutative43.6%
associate-*r*45.4%
Simplified45.4%
if -4.8000000000000001e219 < x < -4.8e178 or 1.6500000000000001e39 < x < 8.50000000000000045e89 or 2e153 < x Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 100.0%
fma-define100.0%
associate-*r/100.0%
*-commutative100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 55.3%
*-commutative55.3%
associate-*l*55.3%
*-commutative55.3%
Simplified55.3%
if -4.4999999999999998e22 < x < 1.15000000000000003e-76Initial program 99.9%
Taylor expanded in x around 0 61.9%
Simplified61.9%
if 1.15000000000000003e-76 < x < 1.6500000000000001e39 or 3.1e129 < x < 2e153Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 97.1%
fma-define97.1%
associate-*r/97.2%
*-commutative97.2%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in t around inf 50.1%
*-commutative50.1%
Simplified50.1%
Final simplification55.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (* y 5.0) (* 2.0 (* x z))))
(t_2 (* x (+ t (* (+ y z) 2.0))))
(t_3 (+ (* y 5.0) (* x t))))
(if (<= x -1.56e-9)
t_2
(if (<= x -7.6e-83)
t_1
(if (<= x -3.4e-156)
t_3
(if (<= x -6.5e-247)
t_1
(if (<= x 9.6e-260)
t_3
(if (<= x 9.5e-173) t_1 (if (<= x 5e-118) t_3 t_2)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (y * 5.0) + (2.0 * (x * z));
double t_2 = x * (t + ((y + z) * 2.0));
double t_3 = (y * 5.0) + (x * t);
double tmp;
if (x <= -1.56e-9) {
tmp = t_2;
} else if (x <= -7.6e-83) {
tmp = t_1;
} else if (x <= -3.4e-156) {
tmp = t_3;
} else if (x <= -6.5e-247) {
tmp = t_1;
} else if (x <= 9.6e-260) {
tmp = t_3;
} else if (x <= 9.5e-173) {
tmp = t_1;
} else if (x <= 5e-118) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = (y * 5.0d0) + (2.0d0 * (x * z))
t_2 = x * (t + ((y + z) * 2.0d0))
t_3 = (y * 5.0d0) + (x * t)
if (x <= (-1.56d-9)) then
tmp = t_2
else if (x <= (-7.6d-83)) then
tmp = t_1
else if (x <= (-3.4d-156)) then
tmp = t_3
else if (x <= (-6.5d-247)) then
tmp = t_1
else if (x <= 9.6d-260) then
tmp = t_3
else if (x <= 9.5d-173) then
tmp = t_1
else if (x <= 5d-118) then
tmp = t_3
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) + (2.0 * (x * z));
double t_2 = x * (t + ((y + z) * 2.0));
double t_3 = (y * 5.0) + (x * t);
double tmp;
if (x <= -1.56e-9) {
tmp = t_2;
} else if (x <= -7.6e-83) {
tmp = t_1;
} else if (x <= -3.4e-156) {
tmp = t_3;
} else if (x <= -6.5e-247) {
tmp = t_1;
} else if (x <= 9.6e-260) {
tmp = t_3;
} else if (x <= 9.5e-173) {
tmp = t_1;
} else if (x <= 5e-118) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y * 5.0) + (2.0 * (x * z)) t_2 = x * (t + ((y + z) * 2.0)) t_3 = (y * 5.0) + (x * t) tmp = 0 if x <= -1.56e-9: tmp = t_2 elif x <= -7.6e-83: tmp = t_1 elif x <= -3.4e-156: tmp = t_3 elif x <= -6.5e-247: tmp = t_1 elif x <= 9.6e-260: tmp = t_3 elif x <= 9.5e-173: tmp = t_1 elif x <= 5e-118: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y * 5.0) + Float64(2.0 * Float64(x * z))) t_2 = Float64(x * Float64(t + Float64(Float64(y + z) * 2.0))) t_3 = Float64(Float64(y * 5.0) + Float64(x * t)) tmp = 0.0 if (x <= -1.56e-9) tmp = t_2; elseif (x <= -7.6e-83) tmp = t_1; elseif (x <= -3.4e-156) tmp = t_3; elseif (x <= -6.5e-247) tmp = t_1; elseif (x <= 9.6e-260) tmp = t_3; elseif (x <= 9.5e-173) tmp = t_1; elseif (x <= 5e-118) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y * 5.0) + (2.0 * (x * z)); t_2 = x * (t + ((y + z) * 2.0)); t_3 = (y * 5.0) + (x * t); tmp = 0.0; if (x <= -1.56e-9) tmp = t_2; elseif (x <= -7.6e-83) tmp = t_1; elseif (x <= -3.4e-156) tmp = t_3; elseif (x <= -6.5e-247) tmp = t_1; elseif (x <= 9.6e-260) tmp = t_3; elseif (x <= 9.5e-173) tmp = t_1; elseif (x <= 5e-118) tmp = t_3; 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[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.56e-9], t$95$2, If[LessEqual[x, -7.6e-83], t$95$1, If[LessEqual[x, -3.4e-156], t$95$3, If[LessEqual[x, -6.5e-247], t$95$1, If[LessEqual[x, 9.6e-260], t$95$3, If[LessEqual[x, 9.5e-173], t$95$1, If[LessEqual[x, 5e-118], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot 5 + 2 \cdot \left(x \cdot z\right)\\
t_2 := x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
t_3 := y \cdot 5 + x \cdot t\\
\mathbf{if}\;x \leq -1.56 \cdot 10^{-9}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -7.6 \cdot 10^{-83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3.4 \cdot 10^{-156}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{-247}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 9.6 \cdot 10^{-260}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-173}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-118}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.56e-9 or 5.00000000000000015e-118 < x Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 98.7%
fma-define98.7%
associate-*r/98.8%
*-commutative98.8%
associate-/l*98.7%
Simplified98.7%
Taylor expanded in x around inf 92.6%
if -1.56e-9 < x < -7.59999999999999953e-83 or -3.3999999999999999e-156 < x < -6.4999999999999996e-247 or 9.6000000000000002e-260 < x < 9.49999999999999967e-173Initial program 99.9%
Taylor expanded in z around inf 90.1%
if -7.59999999999999953e-83 < x < -3.3999999999999999e-156 or -6.4999999999999996e-247 < x < 9.6000000000000002e-260 or 9.49999999999999967e-173 < x < 5.00000000000000015e-118Initial program 99.9%
Taylor expanded in t around inf 90.2%
Final simplification91.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (* y 5.0) (* x t))) (t_2 (* x (* (+ y z) 2.0))))
(if (<= x -0.048)
t_2
(if (<= x -5e-34)
t_1
(if (<= x -1.8e-50)
(* x (* z 2.0))
(if (<= x 3e-8)
t_1
(if (or (<= x 2.2e+73) (not (<= x 1.85e+122)))
(* x (+ t (* z 2.0)))
t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = (y * 5.0) + (x * t);
double t_2 = x * ((y + z) * 2.0);
double tmp;
if (x <= -0.048) {
tmp = t_2;
} else if (x <= -5e-34) {
tmp = t_1;
} else if (x <= -1.8e-50) {
tmp = x * (z * 2.0);
} else if (x <= 3e-8) {
tmp = t_1;
} else if ((x <= 2.2e+73) || !(x <= 1.85e+122)) {
tmp = x * (t + (z * 2.0));
} 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 * ((y + z) * 2.0d0)
if (x <= (-0.048d0)) then
tmp = t_2
else if (x <= (-5d-34)) then
tmp = t_1
else if (x <= (-1.8d-50)) then
tmp = x * (z * 2.0d0)
else if (x <= 3d-8) then
tmp = t_1
else if ((x <= 2.2d+73) .or. (.not. (x <= 1.85d+122))) then
tmp = x * (t + (z * 2.0d0))
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 * ((y + z) * 2.0);
double tmp;
if (x <= -0.048) {
tmp = t_2;
} else if (x <= -5e-34) {
tmp = t_1;
} else if (x <= -1.8e-50) {
tmp = x * (z * 2.0);
} else if (x <= 3e-8) {
tmp = t_1;
} else if ((x <= 2.2e+73) || !(x <= 1.85e+122)) {
tmp = x * (t + (z * 2.0));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y * 5.0) + (x * t) t_2 = x * ((y + z) * 2.0) tmp = 0 if x <= -0.048: tmp = t_2 elif x <= -5e-34: tmp = t_1 elif x <= -1.8e-50: tmp = x * (z * 2.0) elif x <= 3e-8: tmp = t_1 elif (x <= 2.2e+73) or not (x <= 1.85e+122): tmp = x * (t + (z * 2.0)) 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(Float64(y + z) * 2.0)) tmp = 0.0 if (x <= -0.048) tmp = t_2; elseif (x <= -5e-34) tmp = t_1; elseif (x <= -1.8e-50) tmp = Float64(x * Float64(z * 2.0)); elseif (x <= 3e-8) tmp = t_1; elseif ((x <= 2.2e+73) || !(x <= 1.85e+122)) tmp = Float64(x * Float64(t + Float64(z * 2.0))); 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 * ((y + z) * 2.0); tmp = 0.0; if (x <= -0.048) tmp = t_2; elseif (x <= -5e-34) tmp = t_1; elseif (x <= -1.8e-50) tmp = x * (z * 2.0); elseif (x <= 3e-8) tmp = t_1; elseif ((x <= 2.2e+73) || ~((x <= 1.85e+122))) tmp = x * (t + (z * 2.0)); 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[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -0.048], t$95$2, If[LessEqual[x, -5e-34], t$95$1, If[LessEqual[x, -1.8e-50], N[(x * N[(z * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3e-8], t$95$1, If[Or[LessEqual[x, 2.2e+73], N[Not[LessEqual[x, 1.85e+122]], $MachinePrecision]], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot 5 + x \cdot t\\
t_2 := x \cdot \left(\left(y + z\right) \cdot 2\right)\\
\mathbf{if}\;x \leq -0.048:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.8 \cdot 10^{-50}:\\
\;\;\;\;x \cdot \left(z \cdot 2\right)\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{+73} \lor \neg \left(x \leq 1.85 \cdot 10^{+122}\right):\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -0.048000000000000001 or 2.2e73 < x < 1.8499999999999998e122Initial program 100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 77.8%
*-commutative77.8%
*-commutative77.8%
associate-*l*77.8%
Simplified77.8%
Taylor expanded in x around inf 77.1%
associate-*r*77.1%
*-commutative77.1%
+-commutative77.1%
associate-*r*77.1%
Simplified77.1%
if -0.048000000000000001 < x < -5.0000000000000003e-34 or -1.7999999999999999e-50 < x < 2.99999999999999973e-8Initial program 99.9%
Taylor expanded in t around inf 84.6%
if -5.0000000000000003e-34 < x < -1.7999999999999999e-50Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 100.0%
fma-define100.0%
associate-*r/100.0%
*-commutative100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
*-commutative100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
if 2.99999999999999973e-8 < x < 2.2e73 or 1.8499999999999998e122 < x Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 100.0%
fma-define100.0%
associate-*r/100.0%
*-commutative100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around 0 78.0%
Final simplification81.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ t (* y 2.0)))))
(if (<= z -1e+17)
(* x (+ t (* z 2.0)))
(if (<= z -5.7e-11)
(* y 5.0)
(if (<= z -2.5e-176)
t_1
(if (<= z -1.55e-192)
(* y 5.0)
(if (<= z 6.8e-133)
t_1
(if (<= z 1.05e-104) (* y 5.0) (* x (* (+ y z) 2.0))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t + (y * 2.0));
double tmp;
if (z <= -1e+17) {
tmp = x * (t + (z * 2.0));
} else if (z <= -5.7e-11) {
tmp = y * 5.0;
} else if (z <= -2.5e-176) {
tmp = t_1;
} else if (z <= -1.55e-192) {
tmp = y * 5.0;
} else if (z <= 6.8e-133) {
tmp = t_1;
} else if (z <= 1.05e-104) {
tmp = y * 5.0;
} else {
tmp = x * ((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) :: t_1
real(8) :: tmp
t_1 = x * (t + (y * 2.0d0))
if (z <= (-1d+17)) then
tmp = x * (t + (z * 2.0d0))
else if (z <= (-5.7d-11)) then
tmp = y * 5.0d0
else if (z <= (-2.5d-176)) then
tmp = t_1
else if (z <= (-1.55d-192)) then
tmp = y * 5.0d0
else if (z <= 6.8d-133) then
tmp = t_1
else if (z <= 1.05d-104) then
tmp = y * 5.0d0
else
tmp = x * ((y + z) * 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (t + (y * 2.0));
double tmp;
if (z <= -1e+17) {
tmp = x * (t + (z * 2.0));
} else if (z <= -5.7e-11) {
tmp = y * 5.0;
} else if (z <= -2.5e-176) {
tmp = t_1;
} else if (z <= -1.55e-192) {
tmp = y * 5.0;
} else if (z <= 6.8e-133) {
tmp = t_1;
} else if (z <= 1.05e-104) {
tmp = y * 5.0;
} else {
tmp = x * ((y + z) * 2.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t + (y * 2.0)) tmp = 0 if z <= -1e+17: tmp = x * (t + (z * 2.0)) elif z <= -5.7e-11: tmp = y * 5.0 elif z <= -2.5e-176: tmp = t_1 elif z <= -1.55e-192: tmp = y * 5.0 elif z <= 6.8e-133: tmp = t_1 elif z <= 1.05e-104: tmp = y * 5.0 else: tmp = x * ((y + z) * 2.0) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t + Float64(y * 2.0))) tmp = 0.0 if (z <= -1e+17) tmp = Float64(x * Float64(t + Float64(z * 2.0))); elseif (z <= -5.7e-11) tmp = Float64(y * 5.0); elseif (z <= -2.5e-176) tmp = t_1; elseif (z <= -1.55e-192) tmp = Float64(y * 5.0); elseif (z <= 6.8e-133) tmp = t_1; elseif (z <= 1.05e-104) tmp = Float64(y * 5.0); else tmp = Float64(x * Float64(Float64(y + z) * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t + (y * 2.0)); tmp = 0.0; if (z <= -1e+17) tmp = x * (t + (z * 2.0)); elseif (z <= -5.7e-11) tmp = y * 5.0; elseif (z <= -2.5e-176) tmp = t_1; elseif (z <= -1.55e-192) tmp = y * 5.0; elseif (z <= 6.8e-133) tmp = t_1; elseif (z <= 1.05e-104) tmp = y * 5.0; else tmp = x * ((y + z) * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+17], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.7e-11], N[(y * 5.0), $MachinePrecision], If[LessEqual[z, -2.5e-176], t$95$1, If[LessEqual[z, -1.55e-192], N[(y * 5.0), $MachinePrecision], If[LessEqual[z, 6.8e-133], t$95$1, If[LessEqual[z, 1.05e-104], N[(y * 5.0), $MachinePrecision], N[(x * N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(t + y \cdot 2\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+17}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\mathbf{elif}\;z \leq -5.7 \cdot 10^{-11}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-192}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-104}:\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2\right)\\
\end{array}
\end{array}
if z < -1e17Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 84.3%
fma-define84.3%
associate-*r/84.3%
*-commutative84.3%
associate-/l*84.3%
Simplified84.3%
Taylor expanded in y around 0 70.3%
if -1e17 < z < -5.6999999999999997e-11 or -2.5e-176 < z < -1.55e-192 or 6.80000000000000012e-133 < z < 1.04999999999999999e-104Initial program 99.9%
Taylor expanded in x around 0 94.3%
Simplified94.3%
if -5.6999999999999997e-11 < z < -2.5e-176 or -1.55e-192 < z < 6.80000000000000012e-133Initial program 100.0%
Taylor expanded in y around inf 95.8%
Taylor expanded in x around inf 68.4%
if 1.04999999999999999e-104 < z Initial program 99.9%
associate-+l+99.9%
*-un-lft-identity99.9%
+-commutative99.9%
*-un-lft-identity99.9%
distribute-rgt-out99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 87.5%
*-commutative87.5%
*-commutative87.5%
associate-*l*87.5%
Simplified87.5%
Taylor expanded in x around inf 64.4%
associate-*r*64.4%
*-commutative64.4%
+-commutative64.4%
associate-*r*64.4%
Simplified64.4%
Final simplification69.1%
(FPCore (x y z t)
:precision binary64
(if (or (<= t -3.5e+89)
(not (or (<= t -3.3e-14) (and (not (<= t -1.9e-17)) (<= t 6.2e-52)))))
(* x t)
(* y 5.0)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.5e+89) || !((t <= -3.3e-14) || (!(t <= -1.9e-17) && (t <= 6.2e-52)))) {
tmp = x * t;
} 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 ((t <= (-3.5d+89)) .or. (.not. (t <= (-3.3d-14)) .or. (.not. (t <= (-1.9d-17))) .and. (t <= 6.2d-52))) then
tmp = x * t
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 ((t <= -3.5e+89) || !((t <= -3.3e-14) || (!(t <= -1.9e-17) && (t <= 6.2e-52)))) {
tmp = x * t;
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -3.5e+89) or not ((t <= -3.3e-14) or (not (t <= -1.9e-17) and (t <= 6.2e-52))): tmp = x * t else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -3.5e+89) || !((t <= -3.3e-14) || (!(t <= -1.9e-17) && (t <= 6.2e-52)))) tmp = Float64(x * t); else tmp = Float64(y * 5.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -3.5e+89) || ~(((t <= -3.3e-14) || (~((t <= -1.9e-17)) && (t <= 6.2e-52))))) tmp = x * t; else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -3.5e+89], N[Not[Or[LessEqual[t, -3.3e-14], And[N[Not[LessEqual[t, -1.9e-17]], $MachinePrecision], LessEqual[t, 6.2e-52]]]], $MachinePrecision]], N[(x * t), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{+89} \lor \neg \left(t \leq -3.3 \cdot 10^{-14} \lor \neg \left(t \leq -1.9 \cdot 10^{-17}\right) \land t \leq 6.2 \cdot 10^{-52}\right):\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if t < -3.5000000000000001e89 or -3.2999999999999998e-14 < t < -1.9000000000000001e-17 or 6.1999999999999998e-52 < t Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 85.8%
fma-define85.8%
associate-*r/85.8%
*-commutative85.8%
associate-/l*85.8%
Simplified85.8%
Taylor expanded in t around inf 55.8%
*-commutative55.8%
Simplified55.8%
if -3.5000000000000001e89 < t < -3.2999999999999998e-14 or -1.9000000000000001e-17 < t < 6.1999999999999998e-52Initial program 100.0%
Taylor expanded in x around 0 39.4%
Simplified39.4%
Final simplification47.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (* (+ y z) 2.0))))
(if (<= x -0.22)
t_1
(if (<= x 2.3e-77)
(* y 5.0)
(if (<= x 6e+63) (* x (+ t (* y 2.0))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y + z) * 2.0);
double tmp;
if (x <= -0.22) {
tmp = t_1;
} else if (x <= 2.3e-77) {
tmp = y * 5.0;
} else if (x <= 6e+63) {
tmp = x * (t + (y * 2.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 * ((y + z) * 2.0d0)
if (x <= (-0.22d0)) then
tmp = t_1
else if (x <= 2.3d-77) then
tmp = y * 5.0d0
else if (x <= 6d+63) then
tmp = x * (t + (y * 2.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 * ((y + z) * 2.0);
double tmp;
if (x <= -0.22) {
tmp = t_1;
} else if (x <= 2.3e-77) {
tmp = y * 5.0;
} else if (x <= 6e+63) {
tmp = x * (t + (y * 2.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y + z) * 2.0) tmp = 0 if x <= -0.22: tmp = t_1 elif x <= 2.3e-77: tmp = y * 5.0 elif x <= 6e+63: tmp = x * (t + (y * 2.0)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y + z) * 2.0)) tmp = 0.0 if (x <= -0.22) tmp = t_1; elseif (x <= 2.3e-77) tmp = Float64(y * 5.0); elseif (x <= 6e+63) tmp = Float64(x * Float64(t + Float64(y * 2.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y + z) * 2.0); tmp = 0.0; if (x <= -0.22) tmp = t_1; elseif (x <= 2.3e-77) tmp = y * 5.0; elseif (x <= 6e+63) tmp = x * (t + (y * 2.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -0.22], t$95$1, If[LessEqual[x, 2.3e-77], N[(y * 5.0), $MachinePrecision], If[LessEqual[x, 6e+63], N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\left(y + z\right) \cdot 2\right)\\
\mathbf{if}\;x \leq -0.22:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{-77}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+63}:\\
\;\;\;\;x \cdot \left(t + y \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -0.220000000000000001 or 5.99999999999999998e63 < x Initial program 100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 73.4%
*-commutative73.4%
*-commutative73.4%
associate-*l*73.4%
Simplified73.4%
Taylor expanded in x around inf 73.0%
associate-*r*73.0%
*-commutative73.0%
+-commutative73.0%
associate-*r*73.0%
Simplified73.0%
if -0.220000000000000001 < x < 2.29999999999999999e-77Initial program 99.9%
Taylor expanded in x around 0 64.4%
Simplified64.4%
if 2.29999999999999999e-77 < x < 5.99999999999999998e63Initial program 99.9%
Taylor expanded in y around inf 73.6%
Taylor expanded in x around inf 54.3%
Final simplification67.0%
(FPCore (x y z t)
:precision binary64
(if (<= t -5.6e+88)
(* x t)
(if (<= t -3.1e-14)
(* y 5.0)
(if (<= t 1.25e+94) (* x (* (+ y z) 2.0)) (* x t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5.6e+88) {
tmp = x * t;
} else if (t <= -3.1e-14) {
tmp = y * 5.0;
} else if (t <= 1.25e+94) {
tmp = x * ((y + z) * 2.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 <= (-5.6d+88)) then
tmp = x * t
else if (t <= (-3.1d-14)) then
tmp = y * 5.0d0
else if (t <= 1.25d+94) then
tmp = x * ((y + z) * 2.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 <= -5.6e+88) {
tmp = x * t;
} else if (t <= -3.1e-14) {
tmp = y * 5.0;
} else if (t <= 1.25e+94) {
tmp = x * ((y + z) * 2.0);
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -5.6e+88: tmp = x * t elif t <= -3.1e-14: tmp = y * 5.0 elif t <= 1.25e+94: tmp = x * ((y + z) * 2.0) else: tmp = x * t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -5.6e+88) tmp = Float64(x * t); elseif (t <= -3.1e-14) tmp = Float64(y * 5.0); elseif (t <= 1.25e+94) tmp = Float64(x * Float64(Float64(y + z) * 2.0)); else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -5.6e+88) tmp = x * t; elseif (t <= -3.1e-14) tmp = y * 5.0; elseif (t <= 1.25e+94) tmp = x * ((y + z) * 2.0); else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -5.6e+88], N[(x * t), $MachinePrecision], If[LessEqual[t, -3.1e-14], N[(y * 5.0), $MachinePrecision], If[LessEqual[t, 1.25e+94], N[(x * N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], N[(x * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+88}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{-14}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+94}:\\
\;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if t < -5.59999999999999977e88 or 1.25000000000000003e94 < t Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 81.6%
fma-define81.6%
associate-*r/81.6%
*-commutative81.6%
associate-/l*81.6%
Simplified81.6%
Taylor expanded in t around inf 66.1%
*-commutative66.1%
Simplified66.1%
if -5.59999999999999977e88 < t < -3.10000000000000004e-14Initial program 100.0%
Taylor expanded in x around 0 55.7%
Simplified55.7%
if -3.10000000000000004e-14 < t < 1.25000000000000003e94Initial program 99.9%
associate-+l+99.9%
*-un-lft-identity99.9%
+-commutative99.9%
*-un-lft-identity99.9%
distribute-rgt-out99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 94.7%
*-commutative94.7%
*-commutative94.7%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in x around inf 64.6%
associate-*r*64.6%
*-commutative64.6%
+-commutative64.6%
associate-*r*64.6%
Simplified64.6%
Final simplification64.2%
(FPCore (x y z t) :precision binary64 (if (or (<= x -31000000.0) (not (<= x 6e-34))) (* x (+ t (* (+ y z) 2.0))) (+ (* y 5.0) (* x (+ t (* z 2.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -31000000.0) || !(x <= 6e-34)) {
tmp = x * (t + ((y + z) * 2.0));
} 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 <= (-31000000.0d0)) .or. (.not. (x <= 6d-34))) then
tmp = x * (t + ((y + z) * 2.0d0))
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 <= -31000000.0) || !(x <= 6e-34)) {
tmp = x * (t + ((y + z) * 2.0));
} else {
tmp = (y * 5.0) + (x * (t + (z * 2.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -31000000.0) or not (x <= 6e-34): tmp = x * (t + ((y + z) * 2.0)) else: tmp = (y * 5.0) + (x * (t + (z * 2.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -31000000.0) || !(x <= 6e-34)) tmp = Float64(x * Float64(t + Float64(Float64(y + z) * 2.0))); 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 <= -31000000.0) || ~((x <= 6e-34))) tmp = x * (t + ((y + z) * 2.0)); else tmp = (y * 5.0) + (x * (t + (z * 2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -31000000.0], N[Not[LessEqual[x, 6e-34]], $MachinePrecision]], N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $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 -31000000 \lor \neg \left(x \leq 6 \cdot 10^{-34}\right):\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot \left(t + z \cdot 2\right)\\
\end{array}
\end{array}
if x < -3.1e7 or 6e-34 < x Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 100.0%
fma-define100.0%
associate-*r/100.0%
*-commutative100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 97.6%
if -3.1e7 < x < 6e-34Initial program 99.9%
Taylor expanded in y around 0 98.9%
Final simplification98.2%
(FPCore (x y z t)
:precision binary64
(if (<= t -7.2e+87)
(* x t)
(if (<= t -6.3e-15)
(* y 5.0)
(if (<= t 160000000000.0) (* x (* z 2.0)) (* x t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -7.2e+87) {
tmp = x * t;
} else if (t <= -6.3e-15) {
tmp = y * 5.0;
} else if (t <= 160000000000.0) {
tmp = x * (z * 2.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 <= (-7.2d+87)) then
tmp = x * t
else if (t <= (-6.3d-15)) then
tmp = y * 5.0d0
else if (t <= 160000000000.0d0) then
tmp = x * (z * 2.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 <= -7.2e+87) {
tmp = x * t;
} else if (t <= -6.3e-15) {
tmp = y * 5.0;
} else if (t <= 160000000000.0) {
tmp = x * (z * 2.0);
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -7.2e+87: tmp = x * t elif t <= -6.3e-15: tmp = y * 5.0 elif t <= 160000000000.0: tmp = x * (z * 2.0) else: tmp = x * t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -7.2e+87) tmp = Float64(x * t); elseif (t <= -6.3e-15) tmp = Float64(y * 5.0); elseif (t <= 160000000000.0) tmp = Float64(x * Float64(z * 2.0)); else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -7.2e+87) tmp = x * t; elseif (t <= -6.3e-15) tmp = y * 5.0; elseif (t <= 160000000000.0) tmp = x * (z * 2.0); else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -7.2e+87], N[(x * t), $MachinePrecision], If[LessEqual[t, -6.3e-15], N[(y * 5.0), $MachinePrecision], If[LessEqual[t, 160000000000.0], N[(x * N[(z * 2.0), $MachinePrecision]), $MachinePrecision], N[(x * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+87}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;t \leq -6.3 \cdot 10^{-15}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;t \leq 160000000000:\\
\;\;\;\;x \cdot \left(z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if t < -7.19999999999999988e87 or 1.6e11 < t Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 83.7%
fma-define83.7%
associate-*r/83.7%
*-commutative83.7%
associate-/l*83.7%
Simplified83.7%
Taylor expanded in t around inf 61.6%
*-commutative61.6%
Simplified61.6%
if -7.19999999999999988e87 < t < -6.29999999999999982e-15Initial program 100.0%
Taylor expanded in x around 0 55.7%
Simplified55.7%
if -6.29999999999999982e-15 < t < 1.6e11Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 94.0%
fma-define94.0%
associate-*r/94.1%
*-commutative94.1%
associate-/l*94.0%
Simplified94.0%
Taylor expanded in z around inf 40.6%
*-commutative40.6%
associate-*l*40.6%
*-commutative40.6%
Simplified40.6%
Final simplification50.6%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.1e-7) (not (<= x 1.4e-76))) (* 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 <= -2.1e-7) || !(x <= 1.4e-76)) {
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 <= (-2.1d-7)) .or. (.not. (x <= 1.4d-76))) 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 <= -2.1e-7) || !(x <= 1.4e-76)) {
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 <= -2.1e-7) or not (x <= 1.4e-76): 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 <= -2.1e-7) || !(x <= 1.4e-76)) 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 <= -2.1e-7) || ~((x <= 1.4e-76))) 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, -2.1e-7], N[Not[LessEqual[x, 1.4e-76]], $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 -2.1 \cdot 10^{-7} \lor \neg \left(x \leq 1.4 \cdot 10^{-76}\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 < -2.1e-7 or 1.40000000000000005e-76 < x Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 99.3%
fma-define99.3%
associate-*r/99.3%
*-commutative99.3%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in x around inf 95.4%
if -2.1e-7 < x < 1.40000000000000005e-76Initial program 99.9%
Taylor expanded in t around inf 83.7%
Final simplification90.2%
(FPCore (x y z t) :precision binary64 (+ (* y 5.0) (* x (+ t (* (+ y z) 2.0)))))
double code(double x, double y, double z, double t) {
return (y * 5.0) + (x * (t + ((y + z) * 2.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) + (x * (t + ((y + z) * 2.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return (y * 5.0) + (x * (t + ((y + z) * 2.0)));
}
def code(x, y, z, t): return (y * 5.0) + (x * (t + ((y + z) * 2.0)))
function code(x, y, z, t) return Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(Float64(y + z) * 2.0)))) end
function tmp = code(x, y, z, t) tmp = (y * 5.0) + (x * (t + ((y + z) * 2.0))); end
code[x_, y_, z_, t_] := N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot 5 + x \cdot \left(t + \left(y + z\right) \cdot 2\right)
\end{array}
Initial program 100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Final simplification100.0%
(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%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 90.4%
fma-define90.4%
associate-*r/90.5%
*-commutative90.5%
associate-/l*90.4%
Simplified90.4%
Taylor expanded in t around inf 29.9%
*-commutative29.9%
Simplified29.9%
herbie shell --seed 2024105
(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)))