
(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 (+ (* x (+ (+ y (+ z (+ y z))) t)) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * ((y + (z + (y + z))) + 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 + (y + z))) + t)) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * ((y + (z + (y + z))) + t)) + (y * 5.0);
}
def code(x, y, z, t): return (x * ((y + (z + (y + z))) + t)) + (y * 5.0)
function code(x, y, z, t) return Float64(Float64(x * Float64(Float64(y + Float64(z + Float64(y + z))) + t)) + Float64(y * 5.0)) end
function tmp = code(x, y, z, t) tmp = (x * ((y + (z + (y + z))) + t)) + (y * 5.0); end
code[x_, y_, z_, t_] := N[(N[(x * N[(N[(y + N[(z + N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\left(y + \left(z + \left(y + z\right)\right)\right) + t\right) + y \cdot 5
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (* y (+ 5.0 (* x 2.0))) (* x t)))
(t_2 (* x (+ t (* (+ y z) 2.0)))))
(if (<= x -0.08)
t_2
(if (<= x -2.4e-60)
t_1
(if (<= x 2.45e-288)
(+ (* y 5.0) (* 2.0 (* x z)))
(if (<= x 720.0) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = (y * (5.0 + (x * 2.0))) + (x * t);
double t_2 = x * (t + ((y + z) * 2.0));
double tmp;
if (x <= -0.08) {
tmp = t_2;
} else if (x <= -2.4e-60) {
tmp = t_1;
} else if (x <= 2.45e-288) {
tmp = (y * 5.0) + (2.0 * (x * z));
} else if (x <= 720.0) {
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 * 2.0d0))) + (x * t)
t_2 = x * (t + ((y + z) * 2.0d0))
if (x <= (-0.08d0)) then
tmp = t_2
else if (x <= (-2.4d-60)) then
tmp = t_1
else if (x <= 2.45d-288) then
tmp = (y * 5.0d0) + (2.0d0 * (x * z))
else if (x <= 720.0d0) 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 * 2.0))) + (x * t);
double t_2 = x * (t + ((y + z) * 2.0));
double tmp;
if (x <= -0.08) {
tmp = t_2;
} else if (x <= -2.4e-60) {
tmp = t_1;
} else if (x <= 2.45e-288) {
tmp = (y * 5.0) + (2.0 * (x * z));
} else if (x <= 720.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y * (5.0 + (x * 2.0))) + (x * t) t_2 = x * (t + ((y + z) * 2.0)) tmp = 0 if x <= -0.08: tmp = t_2 elif x <= -2.4e-60: tmp = t_1 elif x <= 2.45e-288: tmp = (y * 5.0) + (2.0 * (x * z)) elif x <= 720.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y * Float64(5.0 + Float64(x * 2.0))) + Float64(x * t)) t_2 = Float64(x * Float64(t + Float64(Float64(y + z) * 2.0))) tmp = 0.0 if (x <= -0.08) tmp = t_2; elseif (x <= -2.4e-60) tmp = t_1; elseif (x <= 2.45e-288) tmp = Float64(Float64(y * 5.0) + Float64(2.0 * Float64(x * z))); elseif (x <= 720.0) 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 * 2.0))) + (x * t); t_2 = x * (t + ((y + z) * 2.0)); tmp = 0.0; if (x <= -0.08) tmp = t_2; elseif (x <= -2.4e-60) tmp = t_1; elseif (x <= 2.45e-288) tmp = (y * 5.0) + (2.0 * (x * z)); elseif (x <= 720.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $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, -0.08], t$95$2, If[LessEqual[x, -2.4e-60], t$95$1, If[LessEqual[x, 2.45e-288], N[(N[(y * 5.0), $MachinePrecision] + N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 720.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(5 + x \cdot 2\right) + x \cdot t\\
t_2 := x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\mathbf{if}\;x \leq -0.08:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.45 \cdot 10^{-288}:\\
\;\;\;\;y \cdot 5 + 2 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;x \leq 720:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -0.0800000000000000017 or 720 < x Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if -0.0800000000000000017 < x < -2.40000000000000009e-60 or 2.45000000000000013e-288 < x < 720Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in y around 0 99.9%
Taylor expanded in t around inf 86.0%
*-commutative86.0%
Simplified86.0%
if -2.40000000000000009e-60 < x < 2.45000000000000013e-288Initial program 99.9%
Taylor expanded in z around inf 89.7%
Final simplification93.4%
(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.2e-11)
t_2
(if (<= x -7.6e-61)
t_1
(if (<= x 1.7e-290)
(+ (* y 5.0) (* 2.0 (* x z)))
(if (<= x 1.4e-39) 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.2e-11) {
tmp = t_2;
} else if (x <= -7.6e-61) {
tmp = t_1;
} else if (x <= 1.7e-290) {
tmp = (y * 5.0) + (2.0 * (x * z));
} else if (x <= 1.4e-39) {
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.2d-11)) then
tmp = t_2
else if (x <= (-7.6d-61)) then
tmp = t_1
else if (x <= 1.7d-290) then
tmp = (y * 5.0d0) + (2.0d0 * (x * z))
else if (x <= 1.4d-39) 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.2e-11) {
tmp = t_2;
} else if (x <= -7.6e-61) {
tmp = t_1;
} else if (x <= 1.7e-290) {
tmp = (y * 5.0) + (2.0 * (x * z));
} else if (x <= 1.4e-39) {
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.2e-11: tmp = t_2 elif x <= -7.6e-61: tmp = t_1 elif x <= 1.7e-290: tmp = (y * 5.0) + (2.0 * (x * z)) elif x <= 1.4e-39: 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.2e-11) tmp = t_2; elseif (x <= -7.6e-61) tmp = t_1; elseif (x <= 1.7e-290) tmp = Float64(Float64(y * 5.0) + Float64(2.0 * Float64(x * z))); elseif (x <= 1.4e-39) 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.2e-11) tmp = t_2; elseif (x <= -7.6e-61) tmp = t_1; elseif (x <= 1.7e-290) tmp = (y * 5.0) + (2.0 * (x * z)); elseif (x <= 1.4e-39) 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.2e-11], t$95$2, If[LessEqual[x, -7.6e-61], t$95$1, If[LessEqual[x, 1.7e-290], N[(N[(y * 5.0), $MachinePrecision] + N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.4e-39], 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.2 \cdot 10^{-11}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -7.6 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{-290}:\\
\;\;\;\;y \cdot 5 + 2 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -8.2000000000000001e-11 or 1.4000000000000001e-39 < x Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 96.8%
if -8.2000000000000001e-11 < x < -7.59999999999999961e-61 or 1.69999999999999992e-290 < x < 1.4000000000000001e-39Initial program 99.9%
Taylor expanded in t around inf 88.7%
if -7.59999999999999961e-61 < x < 1.69999999999999992e-290Initial program 99.9%
Taylor expanded in z around inf 89.7%
Final simplification93.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (* z 2.0))))
(if (<= x -1.16e+21)
(* y (* x 2.0))
(if (<= x -1.3e-11)
t_1
(if (<= x 1.32e-40) (* y 5.0) (if (<= x 2.5e+46) (* x t) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (z * 2.0);
double tmp;
if (x <= -1.16e+21) {
tmp = y * (x * 2.0);
} else if (x <= -1.3e-11) {
tmp = t_1;
} else if (x <= 1.32e-40) {
tmp = y * 5.0;
} else if (x <= 2.5e+46) {
tmp = x * t;
} 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 * (z * 2.0d0)
if (x <= (-1.16d+21)) then
tmp = y * (x * 2.0d0)
else if (x <= (-1.3d-11)) then
tmp = t_1
else if (x <= 1.32d-40) then
tmp = y * 5.0d0
else if (x <= 2.5d+46) then
tmp = x * t
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 * (z * 2.0);
double tmp;
if (x <= -1.16e+21) {
tmp = y * (x * 2.0);
} else if (x <= -1.3e-11) {
tmp = t_1;
} else if (x <= 1.32e-40) {
tmp = y * 5.0;
} else if (x <= 2.5e+46) {
tmp = x * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (z * 2.0) tmp = 0 if x <= -1.16e+21: tmp = y * (x * 2.0) elif x <= -1.3e-11: tmp = t_1 elif x <= 1.32e-40: tmp = y * 5.0 elif x <= 2.5e+46: tmp = x * t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(z * 2.0)) tmp = 0.0 if (x <= -1.16e+21) tmp = Float64(y * Float64(x * 2.0)); elseif (x <= -1.3e-11) tmp = t_1; elseif (x <= 1.32e-40) tmp = Float64(y * 5.0); elseif (x <= 2.5e+46) tmp = Float64(x * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (z * 2.0); tmp = 0.0; if (x <= -1.16e+21) tmp = y * (x * 2.0); elseif (x <= -1.3e-11) tmp = t_1; elseif (x <= 1.32e-40) tmp = y * 5.0; elseif (x <= 2.5e+46) tmp = x * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.16e+21], N[(y * N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.3e-11], t$95$1, If[LessEqual[x, 1.32e-40], N[(y * 5.0), $MachinePrecision], If[LessEqual[x, 2.5e+46], N[(x * t), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(z \cdot 2\right)\\
\mathbf{if}\;x \leq -1.16 \cdot 10^{+21}:\\
\;\;\;\;y \cdot \left(x \cdot 2\right)\\
\mathbf{elif}\;x \leq -1.3 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.32 \cdot 10^{-40}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{+46}:\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.16e21Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in y around inf 47.5%
Taylor expanded in x around inf 47.5%
if -1.16e21 < x < -1.3e-11 or 2.5000000000000001e46 < x Initial program 99.9%
Taylor expanded in z around inf 56.3%
Taylor expanded in x around inf 54.8%
associate-*r*54.8%
*-commutative54.8%
associate-*r*54.8%
Simplified54.8%
if -1.3e-11 < x < 1.32000000000000009e-40Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in y around inf 59.3%
Taylor expanded in x around 0 59.1%
if 1.32000000000000009e-40 < x < 2.5000000000000001e46Initial program 100.0%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in x around inf 99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 44.2%
*-commutative44.2%
Simplified44.2%
Final simplification54.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.4e+64)
(+ (* y (+ 5.0 (* x 2.0))) (* x t))
(if (<= y 5.8e+155)
(* x (+ t (+ (* (+ y z) 2.0) (/ 5.0 (/ x y)))))
(+ (* y 5.0) (* x (+ t (* y 2.0)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.4e+64) {
tmp = (y * (5.0 + (x * 2.0))) + (x * t);
} else if (y <= 5.8e+155) {
tmp = x * (t + (((y + z) * 2.0) + (5.0 / (x / y))));
} else {
tmp = (y * 5.0) + (x * (t + (y * 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.4d+64)) then
tmp = (y * (5.0d0 + (x * 2.0d0))) + (x * t)
else if (y <= 5.8d+155) then
tmp = x * (t + (((y + z) * 2.0d0) + (5.0d0 / (x / y))))
else
tmp = (y * 5.0d0) + (x * (t + (y * 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.4e+64) {
tmp = (y * (5.0 + (x * 2.0))) + (x * t);
} else if (y <= 5.8e+155) {
tmp = x * (t + (((y + z) * 2.0) + (5.0 / (x / y))));
} else {
tmp = (y * 5.0) + (x * (t + (y * 2.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.4e+64: tmp = (y * (5.0 + (x * 2.0))) + (x * t) elif y <= 5.8e+155: tmp = x * (t + (((y + z) * 2.0) + (5.0 / (x / y)))) else: tmp = (y * 5.0) + (x * (t + (y * 2.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.4e+64) tmp = Float64(Float64(y * Float64(5.0 + Float64(x * 2.0))) + Float64(x * t)); elseif (y <= 5.8e+155) tmp = Float64(x * Float64(t + Float64(Float64(Float64(y + z) * 2.0) + Float64(5.0 / Float64(x / y))))); else tmp = Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(y * 2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.4e+64) tmp = (y * (5.0 + (x * 2.0))) + (x * t); elseif (y <= 5.8e+155) tmp = x * (t + (((y + z) * 2.0) + (5.0 / (x / y)))); else tmp = (y * 5.0) + (x * (t + (y * 2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.4e+64], N[(N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.8e+155], N[(x * N[(t + N[(N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision] + N[(5.0 / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+64}:\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right) + x \cdot t\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+155}:\\
\;\;\;\;x \cdot \left(t + \left(\left(y + z\right) \cdot 2 + \frac{5}{\frac{x}{y}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot \left(t + y \cdot 2\right)\\
\end{array}
\end{array}
if y < -1.40000000000000012e64Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in y around 0 95.7%
Taylor expanded in t around inf 93.7%
*-commutative93.7%
Simplified93.7%
if -1.40000000000000012e64 < y < 5.7999999999999998e155Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in x around inf 97.6%
clear-num97.6%
un-div-inv97.7%
Applied egg-rr97.7%
if 5.7999999999999998e155 < y Initial program 99.9%
Taylor expanded in y around inf 94.8%
Final simplification96.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -8.5e+68)
(+ (* y (+ 5.0 (* x 2.0))) (* x t))
(if (<= y 4e+153)
(* x (+ t (+ (* (+ y z) 2.0) (* 5.0 (/ y x)))))
(+ (* y 5.0) (* x (+ t (* y 2.0)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.5e+68) {
tmp = (y * (5.0 + (x * 2.0))) + (x * t);
} else if (y <= 4e+153) {
tmp = x * (t + (((y + z) * 2.0) + (5.0 * (y / x))));
} else {
tmp = (y * 5.0) + (x * (t + (y * 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 <= (-8.5d+68)) then
tmp = (y * (5.0d0 + (x * 2.0d0))) + (x * t)
else if (y <= 4d+153) then
tmp = x * (t + (((y + z) * 2.0d0) + (5.0d0 * (y / x))))
else
tmp = (y * 5.0d0) + (x * (t + (y * 2.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.5e+68) {
tmp = (y * (5.0 + (x * 2.0))) + (x * t);
} else if (y <= 4e+153) {
tmp = x * (t + (((y + z) * 2.0) + (5.0 * (y / x))));
} else {
tmp = (y * 5.0) + (x * (t + (y * 2.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.5e+68: tmp = (y * (5.0 + (x * 2.0))) + (x * t) elif y <= 4e+153: tmp = x * (t + (((y + z) * 2.0) + (5.0 * (y / x)))) else: tmp = (y * 5.0) + (x * (t + (y * 2.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.5e+68) tmp = Float64(Float64(y * Float64(5.0 + Float64(x * 2.0))) + Float64(x * t)); elseif (y <= 4e+153) tmp = Float64(x * Float64(t + Float64(Float64(Float64(y + z) * 2.0) + Float64(5.0 * Float64(y / x))))); else tmp = Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(y * 2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.5e+68) tmp = (y * (5.0 + (x * 2.0))) + (x * t); elseif (y <= 4e+153) tmp = x * (t + (((y + z) * 2.0) + (5.0 * (y / x)))); else tmp = (y * 5.0) + (x * (t + (y * 2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.5e+68], N[(N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+153], N[(x * N[(t + N[(N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision] + N[(5.0 * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+68}:\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right) + x \cdot t\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+153}:\\
\;\;\;\;x \cdot \left(t + \left(\left(y + z\right) \cdot 2 + 5 \cdot \frac{y}{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot \left(t + y \cdot 2\right)\\
\end{array}
\end{array}
if y < -8.49999999999999966e68Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in y around 0 95.7%
Taylor expanded in t around inf 93.6%
*-commutative93.6%
Simplified93.6%
if -8.49999999999999966e68 < y < 4e153Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in x around inf 97.6%
if 4e153 < y Initial program 99.9%
Taylor expanded in y around inf 94.8%
Final simplification96.5%
(FPCore (x y z t)
:precision binary64
(if (<= x -4.8e+27)
(* x (+ t (* y 2.0)))
(if (or (<= x -2.2e-172) (not (<= x 2.05e-167)))
(* x (+ t (* z 2.0)))
(* y 5.0))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.8e+27) {
tmp = x * (t + (y * 2.0));
} else if ((x <= -2.2e-172) || !(x <= 2.05e-167)) {
tmp = x * (t + (z * 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 <= (-4.8d+27)) then
tmp = x * (t + (y * 2.0d0))
else if ((x <= (-2.2d-172)) .or. (.not. (x <= 2.05d-167))) then
tmp = x * (t + (z * 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 <= -4.8e+27) {
tmp = x * (t + (y * 2.0));
} else if ((x <= -2.2e-172) || !(x <= 2.05e-167)) {
tmp = x * (t + (z * 2.0));
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4.8e+27: tmp = x * (t + (y * 2.0)) elif (x <= -2.2e-172) or not (x <= 2.05e-167): tmp = x * (t + (z * 2.0)) else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4.8e+27) tmp = Float64(x * Float64(t + Float64(y * 2.0))); elseif ((x <= -2.2e-172) || !(x <= 2.05e-167)) tmp = Float64(x * Float64(t + Float64(z * 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 <= -4.8e+27) tmp = x * (t + (y * 2.0)); elseif ((x <= -2.2e-172) || ~((x <= 2.05e-167))) tmp = x * (t + (z * 2.0)); else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4.8e+27], N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -2.2e-172], N[Not[LessEqual[x, 2.05e-167]], $MachinePrecision]], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+27}:\\
\;\;\;\;x \cdot \left(t + y \cdot 2\right)\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{-172} \lor \neg \left(x \leq 2.05 \cdot 10^{-167}\right):\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -4.79999999999999995e27Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
Taylor expanded in z around 0 72.1%
if -4.79999999999999995e27 < x < -2.20000000000000009e-172 or 2.05000000000000009e-167 < x Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 79.2%
Taylor expanded in y around 0 69.2%
if -2.20000000000000009e-172 < x < 2.05000000000000009e-167Initial program 99.8%
fma-define99.8%
associate-+l+99.8%
+-commutative99.8%
count-299.8%
Simplified99.8%
Taylor expanded in y around inf 75.2%
Taylor expanded in x around 0 75.2%
Final simplification71.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (* z 2.0))))
(if (<= x -1.4e-11)
t_1
(if (<= x 2.15e-39) (* y 5.0) (if (<= x 2.8e+47) (* x t) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * (z * 2.0);
double tmp;
if (x <= -1.4e-11) {
tmp = t_1;
} else if (x <= 2.15e-39) {
tmp = y * 5.0;
} else if (x <= 2.8e+47) {
tmp = x * t;
} 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 * (z * 2.0d0)
if (x <= (-1.4d-11)) then
tmp = t_1
else if (x <= 2.15d-39) then
tmp = y * 5.0d0
else if (x <= 2.8d+47) then
tmp = x * t
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 * (z * 2.0);
double tmp;
if (x <= -1.4e-11) {
tmp = t_1;
} else if (x <= 2.15e-39) {
tmp = y * 5.0;
} else if (x <= 2.8e+47) {
tmp = x * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (z * 2.0) tmp = 0 if x <= -1.4e-11: tmp = t_1 elif x <= 2.15e-39: tmp = y * 5.0 elif x <= 2.8e+47: tmp = x * t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(z * 2.0)) tmp = 0.0 if (x <= -1.4e-11) tmp = t_1; elseif (x <= 2.15e-39) tmp = Float64(y * 5.0); elseif (x <= 2.8e+47) tmp = Float64(x * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (z * 2.0); tmp = 0.0; if (x <= -1.4e-11) tmp = t_1; elseif (x <= 2.15e-39) tmp = y * 5.0; elseif (x <= 2.8e+47) tmp = x * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.4e-11], t$95$1, If[LessEqual[x, 2.15e-39], N[(y * 5.0), $MachinePrecision], If[LessEqual[x, 2.8e+47], N[(x * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(z \cdot 2\right)\\
\mathbf{if}\;x \leq -1.4 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.15 \cdot 10^{-39}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+47}:\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.4e-11 or 2.79999999999999988e47 < x Initial program 100.0%
Taylor expanded in z around inf 45.2%
Taylor expanded in x around inf 44.6%
associate-*r*44.6%
*-commutative44.6%
associate-*r*44.6%
Simplified44.6%
if -1.4e-11 < x < 2.15e-39Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in y around inf 59.3%
Taylor expanded in x around 0 59.1%
if 2.15e-39 < x < 2.79999999999999988e47Initial program 100.0%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in x around inf 99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 44.2%
*-commutative44.2%
Simplified44.2%
Final simplification51.5%
(FPCore (x y z t) :precision binary64 (if (<= y 3.8e+189) (+ (* x (+ t (* z 2.0))) (* y (+ 5.0 (* x 2.0)))) (+ (* y 5.0) (* x (+ t (* y 2.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 3.8e+189) {
tmp = (x * (t + (z * 2.0))) + (y * (5.0 + (x * 2.0)));
} else {
tmp = (y * 5.0) + (x * (t + (y * 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 <= 3.8d+189) then
tmp = (x * (t + (z * 2.0d0))) + (y * (5.0d0 + (x * 2.0d0)))
else
tmp = (y * 5.0d0) + (x * (t + (y * 2.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 3.8e+189) {
tmp = (x * (t + (z * 2.0))) + (y * (5.0 + (x * 2.0)));
} else {
tmp = (y * 5.0) + (x * (t + (y * 2.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 3.8e+189: tmp = (x * (t + (z * 2.0))) + (y * (5.0 + (x * 2.0))) else: tmp = (y * 5.0) + (x * (t + (y * 2.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 3.8e+189) tmp = Float64(Float64(x * Float64(t + Float64(z * 2.0))) + Float64(y * Float64(5.0 + Float64(x * 2.0)))); else tmp = Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(y * 2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 3.8e+189) tmp = (x * (t + (z * 2.0))) + (y * (5.0 + (x * 2.0))); else tmp = (y * 5.0) + (x * (t + (y * 2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 3.8e+189], 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], N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.8 \cdot 10^{+189}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right) + y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot \left(t + y \cdot 2\right)\\
\end{array}
\end{array}
if y < 3.7999999999999998e189Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in y around 0 98.6%
if 3.7999999999999998e189 < y Initial program 99.9%
Taylor expanded in y around inf 96.9%
Final simplification98.4%
(FPCore (x y z t) :precision binary64 (if (or (<= x -8.2e-11) (not (<= x 5.8e-46))) (* 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 <= -8.2e-11) || !(x <= 5.8e-46)) {
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 <= (-8.2d-11)) .or. (.not. (x <= 5.8d-46))) 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 <= -8.2e-11) || !(x <= 5.8e-46)) {
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 <= -8.2e-11) or not (x <= 5.8e-46): 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 <= -8.2e-11) || !(x <= 5.8e-46)) 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 <= -8.2e-11) || ~((x <= 5.8e-46))) 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, -8.2e-11], N[Not[LessEqual[x, 5.8e-46]], $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 -8.2 \cdot 10^{-11} \lor \neg \left(x \leq 5.8 \cdot 10^{-46}\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 < -8.2000000000000001e-11 or 5.80000000000000009e-46 < x Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 96.8%
if -8.2000000000000001e-11 < x < 5.80000000000000009e-46Initial program 99.9%
Taylor expanded in t around inf 79.9%
Final simplification88.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.4e+52) (not (<= y 3.5e+130))) (* 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.4e+52) || !(y <= 3.5e+130)) {
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.4d+52)) .or. (.not. (y <= 3.5d+130))) 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.4e+52) || !(y <= 3.5e+130)) {
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.4e+52) or not (y <= 3.5e+130): 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.4e+52) || !(y <= 3.5e+130)) 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.4e+52) || ~((y <= 3.5e+130))) 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.4e+52], N[Not[LessEqual[y, 3.5e+130]], $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.4 \cdot 10^{+52} \lor \neg \left(y \leq 3.5 \cdot 10^{+130}\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.4e52 or 3.5000000000000001e130 < y Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in y around inf 85.2%
if -1.4e52 < y < 3.5000000000000001e130Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in x around inf 79.5%
Taylor expanded in y around 0 74.8%
Final simplification78.6%
(FPCore (x y z t) :precision binary64 (if (or (<= x -180.0) (not (<= x 7e-39))) (* x (+ t (* y 2.0))) (* y 5.0)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -180.0) || !(x <= 7e-39)) {
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 <= (-180.0d0)) .or. (.not. (x <= 7d-39))) 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 <= -180.0) || !(x <= 7e-39)) {
tmp = x * (t + (y * 2.0));
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -180.0) or not (x <= 7e-39): tmp = x * (t + (y * 2.0)) else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -180.0) || !(x <= 7e-39)) 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 <= -180.0) || ~((x <= 7e-39))) 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, -180.0], N[Not[LessEqual[x, 7e-39]], $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 -180 \lor \neg \left(x \leq 7 \cdot 10^{-39}\right):\\
\;\;\;\;x \cdot \left(t + y \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -180 or 6.99999999999999999e-39 < x Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 97.5%
Taylor expanded in z around 0 63.7%
if -180 < x < 6.99999999999999999e-39Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in y around inf 58.7%
Taylor expanded in x around 0 58.0%
Final simplification60.9%
(FPCore (x y z t) :precision binary64 (if (or (<= x -180.0) (not (<= x 1.8e-42))) (* x t) (* y 5.0)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -180.0) || !(x <= 1.8e-42)) {
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 ((x <= (-180.0d0)) .or. (.not. (x <= 1.8d-42))) 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 ((x <= -180.0) || !(x <= 1.8e-42)) {
tmp = x * t;
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -180.0) or not (x <= 1.8e-42): tmp = x * t else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -180.0) || !(x <= 1.8e-42)) 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 ((x <= -180.0) || ~((x <= 1.8e-42))) tmp = x * t; else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -180.0], N[Not[LessEqual[x, 1.8e-42]], $MachinePrecision]], N[(x * t), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -180 \lor \neg \left(x \leq 1.8 \cdot 10^{-42}\right):\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -180 or 1.8000000000000001e-42 < x Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
clear-num100.0%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 36.5%
*-commutative36.5%
Simplified36.5%
if -180 < x < 1.8000000000000001e-42Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in y around inf 58.7%
Taylor expanded in x around 0 58.0%
Final simplification47.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 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in x around inf 89.3%
clear-num89.3%
un-div-inv89.3%
Applied egg-rr89.3%
Taylor expanded in t around inf 29.3%
*-commutative29.3%
Simplified29.3%
herbie shell --seed 2024170
(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)))