
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * ((((y + z) + z) + y) + t)) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
def code(x, y, z, t): return (x * ((((y + z) + z) + y) + t)) + (y * 5.0)
function code(x, y, z, t) return Float64(Float64(x * Float64(Float64(Float64(Float64(y + z) + z) + y) + t)) + Float64(y * 5.0)) end
function tmp = code(x, y, z, t) tmp = (x * ((((y + z) + z) + y) + t)) + (y * 5.0); end
code[x_, y_, z_, t_] := N[(N[(x * N[(N[(N[(N[(y + z), $MachinePrecision] + z), $MachinePrecision] + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
\end{array}
(FPCore (x y z t) :precision binary64 (fma x (+ (* 2.0 (+ y z)) t) (* y 5.0)))
double code(double x, double y, double z, double t) {
return fma(x, ((2.0 * (y + z)) + t), (y * 5.0));
}
function code(x, y, z, t) return fma(x, Float64(Float64(2.0 * Float64(y + z)) + t), Float64(y * 5.0)) end
code[x_, y_, z_, t_] := N[(x * N[(N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, 2 \cdot \left(y + z\right) + t, y \cdot 5\right)
\end{array}
Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (* x 2.0))))
(if (<= x -8.8e+55)
t_1
(if (<= x -0.017)
(* x t)
(if (<= x -2.3e-14)
t_1
(if (<= x 1.6e-63)
(* y 5.0)
(if (or (<= x 4.1e+153) (not (<= x 1.42e+305)))
(* x t)
(* x (* 2.0 y)))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x * 2.0);
double tmp;
if (x <= -8.8e+55) {
tmp = t_1;
} else if (x <= -0.017) {
tmp = x * t;
} else if (x <= -2.3e-14) {
tmp = t_1;
} else if (x <= 1.6e-63) {
tmp = y * 5.0;
} else if ((x <= 4.1e+153) || !(x <= 1.42e+305)) {
tmp = x * t;
} else {
tmp = x * (2.0 * y);
}
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 = z * (x * 2.0d0)
if (x <= (-8.8d+55)) then
tmp = t_1
else if (x <= (-0.017d0)) then
tmp = x * t
else if (x <= (-2.3d-14)) then
tmp = t_1
else if (x <= 1.6d-63) then
tmp = y * 5.0d0
else if ((x <= 4.1d+153) .or. (.not. (x <= 1.42d+305))) then
tmp = x * t
else
tmp = x * (2.0d0 * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * (x * 2.0);
double tmp;
if (x <= -8.8e+55) {
tmp = t_1;
} else if (x <= -0.017) {
tmp = x * t;
} else if (x <= -2.3e-14) {
tmp = t_1;
} else if (x <= 1.6e-63) {
tmp = y * 5.0;
} else if ((x <= 4.1e+153) || !(x <= 1.42e+305)) {
tmp = x * t;
} else {
tmp = x * (2.0 * y);
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x * 2.0) tmp = 0 if x <= -8.8e+55: tmp = t_1 elif x <= -0.017: tmp = x * t elif x <= -2.3e-14: tmp = t_1 elif x <= 1.6e-63: tmp = y * 5.0 elif (x <= 4.1e+153) or not (x <= 1.42e+305): tmp = x * t else: tmp = x * (2.0 * y) return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x * 2.0)) tmp = 0.0 if (x <= -8.8e+55) tmp = t_1; elseif (x <= -0.017) tmp = Float64(x * t); elseif (x <= -2.3e-14) tmp = t_1; elseif (x <= 1.6e-63) tmp = Float64(y * 5.0); elseif ((x <= 4.1e+153) || !(x <= 1.42e+305)) tmp = Float64(x * t); else tmp = Float64(x * Float64(2.0 * y)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x * 2.0); tmp = 0.0; if (x <= -8.8e+55) tmp = t_1; elseif (x <= -0.017) tmp = x * t; elseif (x <= -2.3e-14) tmp = t_1; elseif (x <= 1.6e-63) tmp = y * 5.0; elseif ((x <= 4.1e+153) || ~((x <= 1.42e+305))) tmp = x * t; else tmp = x * (2.0 * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.8e+55], t$95$1, If[LessEqual[x, -0.017], N[(x * t), $MachinePrecision], If[LessEqual[x, -2.3e-14], t$95$1, If[LessEqual[x, 1.6e-63], N[(y * 5.0), $MachinePrecision], If[Or[LessEqual[x, 4.1e+153], N[Not[LessEqual[x, 1.42e+305]], $MachinePrecision]], N[(x * t), $MachinePrecision], N[(x * N[(2.0 * y), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x \cdot 2\right)\\
\mathbf{if}\;x \leq -8.8 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -0.017:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-63}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{+153} \lor \neg \left(x \leq 1.42 \cdot 10^{+305}\right):\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(2 \cdot y\right)\\
\end{array}
\end{array}
if x < -8.80000000000000042e55 or -0.017000000000000001 < x < -2.29999999999999998e-14Initial program 99.9%
Taylor expanded in z around inf 53.4%
Simplified53.4%
if -8.80000000000000042e55 < x < -0.017000000000000001 or 1.59999999999999994e-63 < x < 4.10000000000000017e153 or 1.42e305 < x Initial program 99.9%
Taylor expanded in t around inf 46.1%
Simplified46.1%
if -2.29999999999999998e-14 < x < 1.59999999999999994e-63Initial program 99.9%
Taylor expanded in x around 0 59.8%
if 4.10000000000000017e153 < x < 1.42e305Initial program 100.0%
Taylor expanded in y around inf 61.3%
Simplified61.3%
Taylor expanded in x around inf 61.3%
Taylor expanded in x around inf 61.3%
*-commutative61.3%
Simplified61.3%
Final simplification55.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (* 2.0 y))))
(if (<= x -2e+196)
(* x t)
(if (<= x -1.1e+52)
t_1
(if (<= x -0.00032)
(* x t)
(if (<= x 8.6e-63)
(* y 5.0)
(if (or (<= x 1e+151) (not (<= x 1.08e+304))) (* x t) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (2.0 * y);
double tmp;
if (x <= -2e+196) {
tmp = x * t;
} else if (x <= -1.1e+52) {
tmp = t_1;
} else if (x <= -0.00032) {
tmp = x * t;
} else if (x <= 8.6e-63) {
tmp = y * 5.0;
} else if ((x <= 1e+151) || !(x <= 1.08e+304)) {
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 * (2.0d0 * y)
if (x <= (-2d+196)) then
tmp = x * t
else if (x <= (-1.1d+52)) then
tmp = t_1
else if (x <= (-0.00032d0)) then
tmp = x * t
else if (x <= 8.6d-63) then
tmp = y * 5.0d0
else if ((x <= 1d+151) .or. (.not. (x <= 1.08d+304))) 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 * (2.0 * y);
double tmp;
if (x <= -2e+196) {
tmp = x * t;
} else if (x <= -1.1e+52) {
tmp = t_1;
} else if (x <= -0.00032) {
tmp = x * t;
} else if (x <= 8.6e-63) {
tmp = y * 5.0;
} else if ((x <= 1e+151) || !(x <= 1.08e+304)) {
tmp = x * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (2.0 * y) tmp = 0 if x <= -2e+196: tmp = x * t elif x <= -1.1e+52: tmp = t_1 elif x <= -0.00032: tmp = x * t elif x <= 8.6e-63: tmp = y * 5.0 elif (x <= 1e+151) or not (x <= 1.08e+304): tmp = x * t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(2.0 * y)) tmp = 0.0 if (x <= -2e+196) tmp = Float64(x * t); elseif (x <= -1.1e+52) tmp = t_1; elseif (x <= -0.00032) tmp = Float64(x * t); elseif (x <= 8.6e-63) tmp = Float64(y * 5.0); elseif ((x <= 1e+151) || !(x <= 1.08e+304)) tmp = Float64(x * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (2.0 * y); tmp = 0.0; if (x <= -2e+196) tmp = x * t; elseif (x <= -1.1e+52) tmp = t_1; elseif (x <= -0.00032) tmp = x * t; elseif (x <= 8.6e-63) tmp = y * 5.0; elseif ((x <= 1e+151) || ~((x <= 1.08e+304))) tmp = x * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(2.0 * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2e+196], N[(x * t), $MachinePrecision], If[LessEqual[x, -1.1e+52], t$95$1, If[LessEqual[x, -0.00032], N[(x * t), $MachinePrecision], If[LessEqual[x, 8.6e-63], N[(y * 5.0), $MachinePrecision], If[Or[LessEqual[x, 1e+151], N[Not[LessEqual[x, 1.08e+304]], $MachinePrecision]], N[(x * t), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(2 \cdot y\right)\\
\mathbf{if}\;x \leq -2 \cdot 10^{+196}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -0.00032:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;x \leq 8.6 \cdot 10^{-63}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;x \leq 10^{+151} \lor \neg \left(x \leq 1.08 \cdot 10^{+304}\right):\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.9999999999999999e196 or -1.1e52 < x < -3.20000000000000026e-4 or 8.5999999999999997e-63 < x < 1.00000000000000002e151 or 1.08000000000000004e304 < x Initial program 99.9%
Taylor expanded in t around inf 49.4%
Simplified49.4%
if -1.9999999999999999e196 < x < -1.1e52 or 1.00000000000000002e151 < x < 1.08000000000000004e304Initial program 100.0%
Taylor expanded in y around inf 52.8%
Simplified52.8%
Taylor expanded in x around inf 52.8%
Taylor expanded in x around inf 52.8%
*-commutative52.8%
Simplified52.8%
if -3.20000000000000026e-4 < x < 8.5999999999999997e-63Initial program 99.9%
Taylor expanded in x around 0 58.6%
Final simplification54.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ t (* 2.0 y)))))
(if (<= x -1.32e+213)
t_1
(if (<= x -1.35e+56)
(* x (* 2.0 (+ y z)))
(if (or (<= x -0.00028) (not (<= x 1.95e-63))) t_1 (* y 5.0))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t + (2.0 * y));
double tmp;
if (x <= -1.32e+213) {
tmp = t_1;
} else if (x <= -1.35e+56) {
tmp = x * (2.0 * (y + z));
} else if ((x <= -0.00028) || !(x <= 1.95e-63)) {
tmp = t_1;
} else {
tmp = y * 5.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * (t + (2.0d0 * y))
if (x <= (-1.32d+213)) then
tmp = t_1
else if (x <= (-1.35d+56)) then
tmp = x * (2.0d0 * (y + z))
else if ((x <= (-0.00028d0)) .or. (.not. (x <= 1.95d-63))) then
tmp = t_1
else
tmp = y * 5.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (t + (2.0 * y));
double tmp;
if (x <= -1.32e+213) {
tmp = t_1;
} else if (x <= -1.35e+56) {
tmp = x * (2.0 * (y + z));
} else if ((x <= -0.00028) || !(x <= 1.95e-63)) {
tmp = t_1;
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t + (2.0 * y)) tmp = 0 if x <= -1.32e+213: tmp = t_1 elif x <= -1.35e+56: tmp = x * (2.0 * (y + z)) elif (x <= -0.00028) or not (x <= 1.95e-63): tmp = t_1 else: tmp = y * 5.0 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t + Float64(2.0 * y))) tmp = 0.0 if (x <= -1.32e+213) tmp = t_1; elseif (x <= -1.35e+56) tmp = Float64(x * Float64(2.0 * Float64(y + z))); elseif ((x <= -0.00028) || !(x <= 1.95e-63)) tmp = t_1; else tmp = Float64(y * 5.0); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t + (2.0 * y)); tmp = 0.0; if (x <= -1.32e+213) tmp = t_1; elseif (x <= -1.35e+56) tmp = x * (2.0 * (y + z)); elseif ((x <= -0.00028) || ~((x <= 1.95e-63))) tmp = t_1; else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t + N[(2.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.32e+213], t$95$1, If[LessEqual[x, -1.35e+56], N[(x * N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -0.00028], N[Not[LessEqual[x, 1.95e-63]], $MachinePrecision]], t$95$1, N[(y * 5.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(t + 2 \cdot y\right)\\
\mathbf{if}\;x \leq -1.32 \cdot 10^{+213}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{+56}:\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right)\right)\\
\mathbf{elif}\;x \leq -0.00028 \lor \neg \left(x \leq 1.95 \cdot 10^{-63}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -1.32e213 or -1.35000000000000005e56 < x < -2.7999999999999998e-4 or 1.95000000000000011e-63 < x Initial program 99.9%
Taylor expanded in y around inf 78.6%
Taylor expanded in x around inf 74.9%
if -1.32e213 < x < -1.35000000000000005e56Initial program 99.9%
Taylor expanded in t around 0 81.7%
Simplified81.7%
Taylor expanded in x around inf 81.7%
*-commutative81.7%
associate-*r*81.7%
*-commutative81.7%
Simplified81.7%
if -2.7999999999999998e-4 < x < 1.95000000000000011e-63Initial program 99.9%
Taylor expanded in x around 0 58.6%
Final simplification68.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.15e+130)
(* y (+ 5.0 (* 2.0 (+ x (* x (/ z y))))))
(if (<= y 1.35e+70)
(* x (+ t (+ (* 2.0 (+ y z)) (* 5.0 (/ y x)))))
(+ (* x (+ t (+ y y))) (* y 5.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.15e+130) {
tmp = y * (5.0 + (2.0 * (x + (x * (z / y)))));
} else if (y <= 1.35e+70) {
tmp = x * (t + ((2.0 * (y + z)) + (5.0 * (y / x))));
} else {
tmp = (x * (t + (y + y))) + (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 (y <= (-1.15d+130)) then
tmp = y * (5.0d0 + (2.0d0 * (x + (x * (z / y)))))
else if (y <= 1.35d+70) then
tmp = x * (t + ((2.0d0 * (y + z)) + (5.0d0 * (y / x))))
else
tmp = (x * (t + (y + y))) + (y * 5.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.15e+130) {
tmp = y * (5.0 + (2.0 * (x + (x * (z / y)))));
} else if (y <= 1.35e+70) {
tmp = x * (t + ((2.0 * (y + z)) + (5.0 * (y / x))));
} else {
tmp = (x * (t + (y + y))) + (y * 5.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.15e+130: tmp = y * (5.0 + (2.0 * (x + (x * (z / y))))) elif y <= 1.35e+70: tmp = x * (t + ((2.0 * (y + z)) + (5.0 * (y / x)))) else: tmp = (x * (t + (y + y))) + (y * 5.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.15e+130) tmp = Float64(y * Float64(5.0 + Float64(2.0 * Float64(x + Float64(x * Float64(z / y)))))); elseif (y <= 1.35e+70) tmp = Float64(x * Float64(t + Float64(Float64(2.0 * Float64(y + z)) + Float64(5.0 * Float64(y / x))))); else tmp = Float64(Float64(x * Float64(t + Float64(y + y))) + Float64(y * 5.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.15e+130) tmp = y * (5.0 + (2.0 * (x + (x * (z / y))))); elseif (y <= 1.35e+70) tmp = x * (t + ((2.0 * (y + z)) + (5.0 * (y / x)))); else tmp = (x * (t + (y + y))) + (y * 5.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.15e+130], N[(y * N[(5.0 + N[(2.0 * N[(x + N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+70], N[(x * N[(t + N[(N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision] + N[(5.0 * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(t + N[(y + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+130}:\\
\;\;\;\;y \cdot \left(5 + 2 \cdot \left(x + x \cdot \frac{z}{y}\right)\right)\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+70}:\\
\;\;\;\;x \cdot \left(t + \left(2 \cdot \left(y + z\right) + 5 \cdot \frac{y}{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + \left(y + y\right)\right) + y \cdot 5\\
\end{array}
\end{array}
if y < -1.15000000000000011e130Initial program 99.8%
Taylor expanded in t around 0 99.8%
Simplified99.8%
Taylor expanded in y around inf 95.5%
distribute-lft-out95.5%
associate-/l*99.9%
Simplified99.9%
if -1.15000000000000011e130 < y < 1.35e70Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in x around inf 98.7%
if 1.35e70 < y Initial program 99.9%
Taylor expanded in y around inf 97.7%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (+ 5.0 (* x 2.0)))))
(if (<= y -4.6e+131)
t_1
(if (<= y -1.07e-106)
(+ (* y 5.0) (* x t))
(if (<= y 2.25e+121) (* x (+ t (* 2.0 z))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * (5.0 + (x * 2.0));
double tmp;
if (y <= -4.6e+131) {
tmp = t_1;
} else if (y <= -1.07e-106) {
tmp = (y * 5.0) + (x * t);
} else if (y <= 2.25e+121) {
tmp = x * (t + (2.0 * z));
} 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 = y * (5.0d0 + (x * 2.0d0))
if (y <= (-4.6d+131)) then
tmp = t_1
else if (y <= (-1.07d-106)) then
tmp = (y * 5.0d0) + (x * t)
else if (y <= 2.25d+121) then
tmp = x * (t + (2.0d0 * z))
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 = y * (5.0 + (x * 2.0));
double tmp;
if (y <= -4.6e+131) {
tmp = t_1;
} else if (y <= -1.07e-106) {
tmp = (y * 5.0) + (x * t);
} else if (y <= 2.25e+121) {
tmp = x * (t + (2.0 * z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (5.0 + (x * 2.0)) tmp = 0 if y <= -4.6e+131: tmp = t_1 elif y <= -1.07e-106: tmp = (y * 5.0) + (x * t) elif y <= 2.25e+121: tmp = x * (t + (2.0 * z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(5.0 + Float64(x * 2.0))) tmp = 0.0 if (y <= -4.6e+131) tmp = t_1; elseif (y <= -1.07e-106) tmp = Float64(Float64(y * 5.0) + Float64(x * t)); elseif (y <= 2.25e+121) tmp = Float64(x * Float64(t + Float64(2.0 * z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (5.0 + (x * 2.0)); tmp = 0.0; if (y <= -4.6e+131) tmp = t_1; elseif (y <= -1.07e-106) tmp = (y * 5.0) + (x * t); elseif (y <= 2.25e+121) tmp = x * (t + (2.0 * z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e+131], t$95$1, If[LessEqual[y, -1.07e-106], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e+121], N[(x * N[(t + N[(2.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.07 \cdot 10^{-106}:\\
\;\;\;\;y \cdot 5 + x \cdot t\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{+121}:\\
\;\;\;\;x \cdot \left(t + 2 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.59999999999999983e131 or 2.2500000000000002e121 < y Initial program 99.9%
Taylor expanded in y around inf 94.0%
Simplified94.0%
if -4.59999999999999983e131 < y < -1.07e-106Initial program 99.9%
Taylor expanded in y around inf 83.1%
+-commutative83.1%
distribute-lft-in79.0%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
Applied egg-rr0.0%
Simplified72.1%
Taylor expanded in x around 0 72.1%
if -1.07e-106 < y < 2.2500000000000002e121Initial program 99.9%
Taylor expanded in y around 0 86.2%
Final simplification86.1%
(FPCore (x y z t) :precision binary64 (if (or (<= t -5.5e+91) (not (<= t 3.2e-10))) (+ (* x (+ t (+ y y))) (* y 5.0)) (+ (* (+ y z) (* x 2.0)) (* y 5.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -5.5e+91) || !(t <= 3.2e-10)) {
tmp = (x * (t + (y + y))) + (y * 5.0);
} else {
tmp = ((y + z) * (x * 2.0)) + (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 <= (-5.5d+91)) .or. (.not. (t <= 3.2d-10))) then
tmp = (x * (t + (y + y))) + (y * 5.0d0)
else
tmp = ((y + z) * (x * 2.0d0)) + (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 <= -5.5e+91) || !(t <= 3.2e-10)) {
tmp = (x * (t + (y + y))) + (y * 5.0);
} else {
tmp = ((y + z) * (x * 2.0)) + (y * 5.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -5.5e+91) or not (t <= 3.2e-10): tmp = (x * (t + (y + y))) + (y * 5.0) else: tmp = ((y + z) * (x * 2.0)) + (y * 5.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -5.5e+91) || !(t <= 3.2e-10)) tmp = Float64(Float64(x * Float64(t + Float64(y + y))) + Float64(y * 5.0)); else tmp = Float64(Float64(Float64(y + z) * Float64(x * 2.0)) + Float64(y * 5.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -5.5e+91) || ~((t <= 3.2e-10))) tmp = (x * (t + (y + y))) + (y * 5.0); else tmp = ((y + z) * (x * 2.0)) + (y * 5.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -5.5e+91], N[Not[LessEqual[t, 3.2e-10]], $MachinePrecision]], N[(N[(x * N[(t + N[(y + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y + z), $MachinePrecision] * N[(x * 2.0), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+91} \lor \neg \left(t \leq 3.2 \cdot 10^{-10}\right):\\
\;\;\;\;x \cdot \left(t + \left(y + y\right)\right) + y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;\left(y + z\right) \cdot \left(x \cdot 2\right) + y \cdot 5\\
\end{array}
\end{array}
if t < -5.4999999999999998e91 or 3.19999999999999981e-10 < t Initial program 100.0%
Taylor expanded in y around inf 89.1%
if -5.4999999999999998e91 < t < 3.19999999999999981e-10Initial program 99.9%
Taylor expanded in t around 0 95.3%
Simplified95.3%
Final simplification92.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.07e-106) (not (<= y 3.6e+70))) (+ (* x (+ t (+ y y))) (* y 5.0)) (* x (+ (* 2.0 (+ y z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.07e-106) || !(y <= 3.6e+70)) {
tmp = (x * (t + (y + y))) + (y * 5.0);
} else {
tmp = x * ((2.0 * (y + z)) + t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.07d-106)) .or. (.not. (y <= 3.6d+70))) then
tmp = (x * (t + (y + y))) + (y * 5.0d0)
else
tmp = x * ((2.0d0 * (y + z)) + t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.07e-106) || !(y <= 3.6e+70)) {
tmp = (x * (t + (y + y))) + (y * 5.0);
} else {
tmp = x * ((2.0 * (y + z)) + t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.07e-106) or not (y <= 3.6e+70): tmp = (x * (t + (y + y))) + (y * 5.0) else: tmp = x * ((2.0 * (y + z)) + t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.07e-106) || !(y <= 3.6e+70)) tmp = Float64(Float64(x * Float64(t + Float64(y + y))) + Float64(y * 5.0)); else tmp = Float64(x * Float64(Float64(2.0 * Float64(y + z)) + t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.07e-106) || ~((y <= 3.6e+70))) tmp = (x * (t + (y + y))) + (y * 5.0); else tmp = x * ((2.0 * (y + z)) + t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.07e-106], N[Not[LessEqual[y, 3.6e+70]], $MachinePrecision]], N[(N[(x * N[(t + N[(y + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.07 \cdot 10^{-106} \lor \neg \left(y \leq 3.6 \cdot 10^{+70}\right):\\
\;\;\;\;x \cdot \left(t + \left(y + y\right)\right) + y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right) + t\right)\\
\end{array}
\end{array}
if y < -1.07e-106 or 3.6e70 < y Initial program 99.9%
Taylor expanded in y around inf 91.6%
if -1.07e-106 < y < 3.6e70Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in x around inf 90.9%
Final simplification91.3%
(FPCore (x y z t) :precision binary64 (if (<= x 175.0) (+ (* x (+ t (* 2.0 z))) (* y (+ 5.0 (* x 2.0)))) (* x (+ (* 2.0 (+ y z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 175.0) {
tmp = (x * (t + (2.0 * z))) + (y * (5.0 + (x * 2.0)));
} else {
tmp = x * ((2.0 * (y + z)) + 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 <= 175.0d0) then
tmp = (x * (t + (2.0d0 * z))) + (y * (5.0d0 + (x * 2.0d0)))
else
tmp = x * ((2.0d0 * (y + z)) + t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= 175.0) {
tmp = (x * (t + (2.0 * z))) + (y * (5.0 + (x * 2.0)));
} else {
tmp = x * ((2.0 * (y + z)) + t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= 175.0: tmp = (x * (t + (2.0 * z))) + (y * (5.0 + (x * 2.0))) else: tmp = x * ((2.0 * (y + z)) + t) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= 175.0) tmp = Float64(Float64(x * Float64(t + Float64(2.0 * z))) + Float64(y * Float64(5.0 + Float64(x * 2.0)))); else tmp = Float64(x * Float64(Float64(2.0 * Float64(y + z)) + t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= 175.0) tmp = (x * (t + (2.0 * z))) + (y * (5.0 + (x * 2.0))); else tmp = x * ((2.0 * (y + z)) + t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, 175.0], N[(N[(x * N[(t + N[(2.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 175:\\
\;\;\;\;x \cdot \left(t + 2 \cdot z\right) + y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right) + t\right)\\
\end{array}
\end{array}
if x < 175Initial program 99.9%
Taylor expanded in y around 0 98.4%
if 175 < 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%
Final simplification98.8%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.3e-12) (not (<= x 9.2e-39))) (* x (+ (* 2.0 (+ y z)) t)) (+ (* y 5.0) (* x t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.3e-12) || !(x <= 9.2e-39)) {
tmp = x * ((2.0 * (y + z)) + t);
} 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.3d-12)) .or. (.not. (x <= 9.2d-39))) then
tmp = x * ((2.0d0 * (y + z)) + t)
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.3e-12) || !(x <= 9.2e-39)) {
tmp = x * ((2.0 * (y + z)) + t);
} else {
tmp = (y * 5.0) + (x * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2.3e-12) or not (x <= 9.2e-39): tmp = x * ((2.0 * (y + z)) + t) else: tmp = (y * 5.0) + (x * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -2.3e-12) || !(x <= 9.2e-39)) tmp = Float64(x * Float64(Float64(2.0 * Float64(y + z)) + t)); 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.3e-12) || ~((x <= 9.2e-39))) tmp = x * ((2.0 * (y + z)) + t); else tmp = (y * 5.0) + (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.3e-12], N[Not[LessEqual[x, 9.2e-39]], $MachinePrecision]], N[(x * N[(N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{-12} \lor \neg \left(x \leq 9.2 \cdot 10^{-39}\right):\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right) + t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot t\\
\end{array}
\end{array}
if x < -2.29999999999999989e-12 or 9.20000000000000033e-39 < x Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in x around inf 97.2%
if -2.29999999999999989e-12 < x < 9.20000000000000033e-39Initial program 99.9%
Taylor expanded in y around inf 78.5%
+-commutative78.5%
distribute-lft-in78.5%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
Applied egg-rr0.0%
Simplified78.5%
Taylor expanded in x around 0 78.5%
Final simplification88.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.6e+57) (not (<= y 2.5e+121))) (* y (+ 5.0 (* x 2.0))) (* x (+ t (* 2.0 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.6e+57) || !(y <= 2.5e+121)) {
tmp = y * (5.0 + (x * 2.0));
} else {
tmp = x * (t + (2.0 * z));
}
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.6d+57)) .or. (.not. (y <= 2.5d+121))) then
tmp = y * (5.0d0 + (x * 2.0d0))
else
tmp = x * (t + (2.0d0 * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.6e+57) || !(y <= 2.5e+121)) {
tmp = y * (5.0 + (x * 2.0));
} else {
tmp = x * (t + (2.0 * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.6e+57) or not (y <= 2.5e+121): tmp = y * (5.0 + (x * 2.0)) else: tmp = x * (t + (2.0 * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.6e+57) || !(y <= 2.5e+121)) tmp = Float64(y * Float64(5.0 + Float64(x * 2.0))); else tmp = Float64(x * Float64(t + Float64(2.0 * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.6e+57) || ~((y <= 2.5e+121))) tmp = y * (5.0 + (x * 2.0)); else tmp = x * (t + (2.0 * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.6e+57], N[Not[LessEqual[y, 2.5e+121]], $MachinePrecision]], N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t + N[(2.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{+57} \lor \neg \left(y \leq 2.5 \cdot 10^{+121}\right):\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + 2 \cdot z\right)\\
\end{array}
\end{array}
if y < -3.6000000000000002e57 or 2.50000000000000004e121 < y Initial program 99.9%
Taylor expanded in y around inf 88.0%
Simplified88.0%
if -3.6000000000000002e57 < y < 2.50000000000000004e121Initial program 99.9%
Taylor expanded in y around 0 82.1%
Final simplification84.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5e+148) (not (<= y 6e+122))) (* y 5.0) (* x (+ t (* 2.0 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5e+148) || !(y <= 6e+122)) {
tmp = y * 5.0;
} else {
tmp = x * (t + (2.0 * z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-5d+148)) .or. (.not. (y <= 6d+122))) then
tmp = y * 5.0d0
else
tmp = x * (t + (2.0d0 * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5e+148) || !(y <= 6e+122)) {
tmp = y * 5.0;
} else {
tmp = x * (t + (2.0 * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5e+148) or not (y <= 6e+122): tmp = y * 5.0 else: tmp = x * (t + (2.0 * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5e+148) || !(y <= 6e+122)) tmp = Float64(y * 5.0); else tmp = Float64(x * Float64(t + Float64(2.0 * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -5e+148) || ~((y <= 6e+122))) tmp = y * 5.0; else tmp = x * (t + (2.0 * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5e+148], N[Not[LessEqual[y, 6e+122]], $MachinePrecision]], N[(y * 5.0), $MachinePrecision], N[(x * N[(t + N[(2.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+148} \lor \neg \left(y \leq 6 \cdot 10^{+122}\right):\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + 2 \cdot z\right)\\
\end{array}
\end{array}
if y < -5.00000000000000024e148 or 5.99999999999999972e122 < y Initial program 99.9%
Taylor expanded in x around 0 59.0%
if -5.00000000000000024e148 < y < 5.99999999999999972e122Initial program 99.9%
Taylor expanded in y around 0 77.4%
Final simplification71.5%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.45e-12) (not (<= x 5.4e-39))) (* x (* 2.0 (+ y z))) (* y 5.0)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.45e-12) || !(x <= 5.4e-39)) {
tmp = x * (2.0 * (y + z));
} else {
tmp = y * 5.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-2.45d-12)) .or. (.not. (x <= 5.4d-39))) then
tmp = x * (2.0d0 * (y + z))
else
tmp = y * 5.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.45e-12) || !(x <= 5.4e-39)) {
tmp = x * (2.0 * (y + z));
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2.45e-12) or not (x <= 5.4e-39): tmp = x * (2.0 * (y + z)) else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -2.45e-12) || !(x <= 5.4e-39)) tmp = Float64(x * Float64(2.0 * Float64(y + z))); else tmp = Float64(y * 5.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -2.45e-12) || ~((x <= 5.4e-39))) tmp = x * (2.0 * (y + z)); else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.45e-12], N[Not[LessEqual[x, 5.4e-39]], $MachinePrecision]], N[(x * N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.45 \cdot 10^{-12} \lor \neg \left(x \leq 5.4 \cdot 10^{-39}\right):\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -2.44999999999999986e-12 or 5.4000000000000001e-39 < x Initial program 99.9%
Taylor expanded in t around 0 67.6%
Simplified67.6%
Taylor expanded in x around inf 64.9%
*-commutative64.9%
associate-*r*64.9%
*-commutative64.9%
Simplified64.9%
if -2.44999999999999986e-12 < x < 5.4000000000000001e-39Initial program 99.9%
Taylor expanded in x around 0 58.6%
Final simplification61.9%
(FPCore (x y z t) :precision binary64 (+ (* x (+ t (+ y (+ z (+ y z))))) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * (t + (y + (z + (y + z))))) + (y * 5.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * (t + (y + (z + (y + z))))) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * (t + (y + (z + (y + z))))) + (y * 5.0);
}
def code(x, y, z, t): return (x * (t + (y + (z + (y + z))))) + (y * 5.0)
function code(x, y, z, t) return Float64(Float64(x * Float64(t + Float64(y + Float64(z + Float64(y + z))))) + Float64(y * 5.0)) end
function tmp = code(x, y, z, t) tmp = (x * (t + (y + (z + (y + z))))) + (y * 5.0); end
code[x_, y_, z_, t_] := N[(N[(x * N[(t + N[(y + N[(z + N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(t + \left(y + \left(z + \left(y + z\right)\right)\right)\right) + y \cdot 5
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (if (or (<= x -0.00028) (not (<= x 4.2e-63))) (* x t) (* y 5.0)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -0.00028) || !(x <= 4.2e-63)) {
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 <= (-0.00028d0)) .or. (.not. (x <= 4.2d-63))) 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 <= -0.00028) || !(x <= 4.2e-63)) {
tmp = x * t;
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -0.00028) or not (x <= 4.2e-63): tmp = x * t else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -0.00028) || !(x <= 4.2e-63)) 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 <= -0.00028) || ~((x <= 4.2e-63))) tmp = x * t; else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -0.00028], N[Not[LessEqual[x, 4.2e-63]], $MachinePrecision]], N[(x * t), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.00028 \lor \neg \left(x \leq 4.2 \cdot 10^{-63}\right):\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -2.7999999999999998e-4 or 4.2e-63 < x Initial program 99.9%
Taylor expanded in t around inf 43.4%
Simplified43.4%
if -2.7999999999999998e-4 < x < 4.2e-63Initial program 99.9%
Taylor expanded in x around 0 58.6%
Final simplification50.5%
(FPCore (x y z t) :precision binary64 (* y 5.0))
double code(double x, double y, double z, double t) {
return y * 5.0;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = y * 5.0d0
end function
public static double code(double x, double y, double z, double t) {
return y * 5.0;
}
def code(x, y, z, t): return y * 5.0
function code(x, y, z, t) return Float64(y * 5.0) end
function tmp = code(x, y, z, t) tmp = y * 5.0; end
code[x_, y_, z_, t_] := N[(y * 5.0), $MachinePrecision]
\begin{array}{l}
\\
y \cdot 5
\end{array}
Initial program 99.9%
Taylor expanded in x around 0 30.0%
Final simplification30.0%
herbie shell --seed 2024102
(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)))