
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- z t))))
(if (<= t_1 -4e+242)
(- x (/ -1.0 (/ (/ a y) (- t z))))
(if (<= t_1 2e+216) (- x (/ t_1 a)) (+ x (* y (/ (- t z) a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if (t_1 <= -4e+242) {
tmp = x - (-1.0 / ((a / y) / (t - z)));
} else if (t_1 <= 2e+216) {
tmp = x - (t_1 / a);
} else {
tmp = x + (y * ((t - z) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z - t)
if (t_1 <= (-4d+242)) then
tmp = x - ((-1.0d0) / ((a / y) / (t - z)))
else if (t_1 <= 2d+216) then
tmp = x - (t_1 / a)
else
tmp = x + (y * ((t - z) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if (t_1 <= -4e+242) {
tmp = x - (-1.0 / ((a / y) / (t - z)));
} else if (t_1 <= 2e+216) {
tmp = x - (t_1 / a);
} else {
tmp = x + (y * ((t - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) tmp = 0 if t_1 <= -4e+242: tmp = x - (-1.0 / ((a / y) / (t - z))) elif t_1 <= 2e+216: tmp = x - (t_1 / a) else: tmp = x + (y * ((t - z) / a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) tmp = 0.0 if (t_1 <= -4e+242) tmp = Float64(x - Float64(-1.0 / Float64(Float64(a / y) / Float64(t - z)))); elseif (t_1 <= 2e+216) tmp = Float64(x - Float64(t_1 / a)); else tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z - t); tmp = 0.0; if (t_1 <= -4e+242) tmp = x - (-1.0 / ((a / y) / (t - z))); elseif (t_1 <= 2e+216) tmp = x - (t_1 / a); else tmp = x + (y * ((t - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+242], N[(x - N[(-1.0 / N[(N[(a / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+216], N[(x - N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+242}:\\
\;\;\;\;x - \frac{-1}{\frac{\frac{a}{y}}{t - z}}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+216}:\\
\;\;\;\;x - \frac{t\_1}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -4.0000000000000002e242Initial program 67.5%
associate-/l*99.7%
Simplified99.7%
associate-*r/67.5%
clear-num67.7%
associate-/r*100.0%
Applied egg-rr100.0%
if -4.0000000000000002e242 < (*.f64 y (-.f64 z t)) < 2e216Initial program 99.9%
if 2e216 < (*.f64 y (-.f64 z t)) Initial program 89.9%
associate-/l*100.0%
Simplified100.0%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ t (/ a y))) (t_2 (* y (/ z (- a)))))
(if (<= a -8.6e+22)
x
(if (<= a -3.3e-49)
(* t (/ y a))
(if (<= a -8.5e-73)
x
(if (<= a 9.5e-248)
t_1
(if (<= a 8.6e-181)
t_2
(if (<= a 4.55e-141)
t_1
(if (<= a 1.16e-92) t_2 (if (<= a 0.12) t_1 x))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a / y);
double t_2 = y * (z / -a);
double tmp;
if (a <= -8.6e+22) {
tmp = x;
} else if (a <= -3.3e-49) {
tmp = t * (y / a);
} else if (a <= -8.5e-73) {
tmp = x;
} else if (a <= 9.5e-248) {
tmp = t_1;
} else if (a <= 8.6e-181) {
tmp = t_2;
} else if (a <= 4.55e-141) {
tmp = t_1;
} else if (a <= 1.16e-92) {
tmp = t_2;
} else if (a <= 0.12) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t / (a / y)
t_2 = y * (z / -a)
if (a <= (-8.6d+22)) then
tmp = x
else if (a <= (-3.3d-49)) then
tmp = t * (y / a)
else if (a <= (-8.5d-73)) then
tmp = x
else if (a <= 9.5d-248) then
tmp = t_1
else if (a <= 8.6d-181) then
tmp = t_2
else if (a <= 4.55d-141) then
tmp = t_1
else if (a <= 1.16d-92) then
tmp = t_2
else if (a <= 0.12d0) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a / y);
double t_2 = y * (z / -a);
double tmp;
if (a <= -8.6e+22) {
tmp = x;
} else if (a <= -3.3e-49) {
tmp = t * (y / a);
} else if (a <= -8.5e-73) {
tmp = x;
} else if (a <= 9.5e-248) {
tmp = t_1;
} else if (a <= 8.6e-181) {
tmp = t_2;
} else if (a <= 4.55e-141) {
tmp = t_1;
} else if (a <= 1.16e-92) {
tmp = t_2;
} else if (a <= 0.12) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t / (a / y) t_2 = y * (z / -a) tmp = 0 if a <= -8.6e+22: tmp = x elif a <= -3.3e-49: tmp = t * (y / a) elif a <= -8.5e-73: tmp = x elif a <= 9.5e-248: tmp = t_1 elif a <= 8.6e-181: tmp = t_2 elif a <= 4.55e-141: tmp = t_1 elif a <= 1.16e-92: tmp = t_2 elif a <= 0.12: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(t / Float64(a / y)) t_2 = Float64(y * Float64(z / Float64(-a))) tmp = 0.0 if (a <= -8.6e+22) tmp = x; elseif (a <= -3.3e-49) tmp = Float64(t * Float64(y / a)); elseif (a <= -8.5e-73) tmp = x; elseif (a <= 9.5e-248) tmp = t_1; elseif (a <= 8.6e-181) tmp = t_2; elseif (a <= 4.55e-141) tmp = t_1; elseif (a <= 1.16e-92) tmp = t_2; elseif (a <= 0.12) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t / (a / y); t_2 = y * (z / -a); tmp = 0.0; if (a <= -8.6e+22) tmp = x; elseif (a <= -3.3e-49) tmp = t * (y / a); elseif (a <= -8.5e-73) tmp = x; elseif (a <= 9.5e-248) tmp = t_1; elseif (a <= 8.6e-181) tmp = t_2; elseif (a <= 4.55e-141) tmp = t_1; elseif (a <= 1.16e-92) tmp = t_2; elseif (a <= 0.12) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.6e+22], x, If[LessEqual[a, -3.3e-49], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -8.5e-73], x, If[LessEqual[a, 9.5e-248], t$95$1, If[LessEqual[a, 8.6e-181], t$95$2, If[LessEqual[a, 4.55e-141], t$95$1, If[LessEqual[a, 1.16e-92], t$95$2, If[LessEqual[a, 0.12], t$95$1, x]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{a}{y}}\\
t_2 := y \cdot \frac{z}{-a}\\
\mathbf{if}\;a \leq -8.6 \cdot 10^{+22}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -3.3 \cdot 10^{-49}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq -8.5 \cdot 10^{-73}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-248}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 8.6 \cdot 10^{-181}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 4.55 \cdot 10^{-141}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.16 \cdot 10^{-92}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 0.12:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -8.6000000000000004e22 or -3.3e-49 < a < -8.4999999999999996e-73 or 0.12 < a Initial program 91.2%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in z around inf 81.2%
associate-/l*86.4%
Simplified86.4%
Taylor expanded in x around inf 68.1%
if -8.6000000000000004e22 < a < -3.3e-49Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 70.6%
associate-*r/70.6%
mul-1-neg70.6%
distribute-lft-neg-out70.6%
*-commutative70.6%
associate-/l*70.9%
distribute-neg-frac70.9%
distribute-neg-frac270.9%
Simplified70.9%
Taylor expanded in x around 0 51.6%
associate-*r/51.9%
Simplified51.9%
if -8.4999999999999996e-73 < a < 9.49999999999999971e-248 or 8.6e-181 < a < 4.55000000000000026e-141 or 1.1599999999999999e-92 < a < 0.12Initial program 99.8%
associate-/l*87.9%
Simplified87.9%
Taylor expanded in z around 0 73.8%
associate-*r/73.8%
mul-1-neg73.8%
distribute-lft-neg-out73.8%
*-commutative73.8%
associate-/l*66.0%
distribute-neg-frac66.0%
distribute-neg-frac266.0%
Simplified66.0%
Taylor expanded in x around 0 63.2%
*-commutative63.2%
associate-/l*56.8%
Applied egg-rr56.8%
associate-*r/63.2%
associate-*l/64.5%
*-commutative64.5%
clear-num64.5%
un-div-inv64.6%
Applied egg-rr64.6%
if 9.49999999999999971e-248 < a < 8.6e-181 or 4.55000000000000026e-141 < a < 1.1599999999999999e-92Initial program 99.9%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in z around inf 92.3%
associate-/l*85.0%
Simplified85.0%
Taylor expanded in x around 0 73.9%
mul-1-neg73.9%
associate-*r/66.6%
distribute-rgt-neg-in66.6%
distribute-neg-frac266.6%
Simplified66.6%
Final simplification65.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ t (/ a y))))
(if (<= a -1e+23)
x
(if (<= a -4.4e-49)
(* t (/ y a))
(if (<= a -1.1e-76)
x
(if (<= a 2.4e-247)
t_1
(if (<= a 3.6e-83) (* z (/ y (- a))) (if (<= a 1.4) t_1 x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a / y);
double tmp;
if (a <= -1e+23) {
tmp = x;
} else if (a <= -4.4e-49) {
tmp = t * (y / a);
} else if (a <= -1.1e-76) {
tmp = x;
} else if (a <= 2.4e-247) {
tmp = t_1;
} else if (a <= 3.6e-83) {
tmp = z * (y / -a);
} else if (a <= 1.4) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t / (a / y)
if (a <= (-1d+23)) then
tmp = x
else if (a <= (-4.4d-49)) then
tmp = t * (y / a)
else if (a <= (-1.1d-76)) then
tmp = x
else if (a <= 2.4d-247) then
tmp = t_1
else if (a <= 3.6d-83) then
tmp = z * (y / -a)
else if (a <= 1.4d0) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a / y);
double tmp;
if (a <= -1e+23) {
tmp = x;
} else if (a <= -4.4e-49) {
tmp = t * (y / a);
} else if (a <= -1.1e-76) {
tmp = x;
} else if (a <= 2.4e-247) {
tmp = t_1;
} else if (a <= 3.6e-83) {
tmp = z * (y / -a);
} else if (a <= 1.4) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t / (a / y) tmp = 0 if a <= -1e+23: tmp = x elif a <= -4.4e-49: tmp = t * (y / a) elif a <= -1.1e-76: tmp = x elif a <= 2.4e-247: tmp = t_1 elif a <= 3.6e-83: tmp = z * (y / -a) elif a <= 1.4: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(t / Float64(a / y)) tmp = 0.0 if (a <= -1e+23) tmp = x; elseif (a <= -4.4e-49) tmp = Float64(t * Float64(y / a)); elseif (a <= -1.1e-76) tmp = x; elseif (a <= 2.4e-247) tmp = t_1; elseif (a <= 3.6e-83) tmp = Float64(z * Float64(y / Float64(-a))); elseif (a <= 1.4) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t / (a / y); tmp = 0.0; if (a <= -1e+23) tmp = x; elseif (a <= -4.4e-49) tmp = t * (y / a); elseif (a <= -1.1e-76) tmp = x; elseif (a <= 2.4e-247) tmp = t_1; elseif (a <= 3.6e-83) tmp = z * (y / -a); elseif (a <= 1.4) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1e+23], x, If[LessEqual[a, -4.4e-49], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.1e-76], x, If[LessEqual[a, 2.4e-247], t$95$1, If[LessEqual[a, 3.6e-83], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.4], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{a}{y}}\\
\mathbf{if}\;a \leq -1 \cdot 10^{+23}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -4.4 \cdot 10^{-49}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq -1.1 \cdot 10^{-76}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{-247}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-83}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{elif}\;a \leq 1.4:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -9.9999999999999992e22 or -4.3999999999999998e-49 < a < -1.1e-76 or 1.3999999999999999 < a Initial program 91.2%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in z around inf 81.2%
associate-/l*86.4%
Simplified86.4%
Taylor expanded in x around inf 68.1%
if -9.9999999999999992e22 < a < -4.3999999999999998e-49Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 70.6%
associate-*r/70.6%
mul-1-neg70.6%
distribute-lft-neg-out70.6%
*-commutative70.6%
associate-/l*70.9%
distribute-neg-frac70.9%
distribute-neg-frac270.9%
Simplified70.9%
Taylor expanded in x around 0 51.6%
associate-*r/51.9%
Simplified51.9%
if -1.1e-76 < a < 2.40000000000000011e-247 or 3.60000000000000012e-83 < a < 1.3999999999999999Initial program 99.8%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in z around 0 74.1%
associate-*r/74.1%
mul-1-neg74.1%
distribute-lft-neg-out74.1%
*-commutative74.1%
associate-/l*66.6%
distribute-neg-frac66.6%
distribute-neg-frac266.6%
Simplified66.6%
Taylor expanded in x around 0 63.5%
*-commutative63.5%
associate-/l*57.6%
Applied egg-rr57.6%
associate-*r/63.5%
associate-*l/63.5%
*-commutative63.5%
clear-num63.5%
un-div-inv63.6%
Applied egg-rr63.6%
if 2.40000000000000011e-247 < a < 3.60000000000000012e-83Initial program 99.9%
associate-/l*81.6%
Simplified81.6%
Taylor expanded in z around inf 81.1%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in x around 0 65.1%
associate-*l/59.9%
associate-*r*59.9%
*-commutative59.9%
associate-*r/59.9%
neg-mul-159.9%
Simplified59.9%
Final simplification64.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ t (/ a y))))
(if (<= a -3.4e+23)
x
(if (<= a -1.6e-48)
(* t (/ y a))
(if (<= a -8.5e-73)
x
(if (<= a 9.5e-248)
t_1
(if (<= a 2.95e-89) (/ (* y z) (- a)) (if (<= a 0.36) t_1 x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a / y);
double tmp;
if (a <= -3.4e+23) {
tmp = x;
} else if (a <= -1.6e-48) {
tmp = t * (y / a);
} else if (a <= -8.5e-73) {
tmp = x;
} else if (a <= 9.5e-248) {
tmp = t_1;
} else if (a <= 2.95e-89) {
tmp = (y * z) / -a;
} else if (a <= 0.36) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t / (a / y)
if (a <= (-3.4d+23)) then
tmp = x
else if (a <= (-1.6d-48)) then
tmp = t * (y / a)
else if (a <= (-8.5d-73)) then
tmp = x
else if (a <= 9.5d-248) then
tmp = t_1
else if (a <= 2.95d-89) then
tmp = (y * z) / -a
else if (a <= 0.36d0) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a / y);
double tmp;
if (a <= -3.4e+23) {
tmp = x;
} else if (a <= -1.6e-48) {
tmp = t * (y / a);
} else if (a <= -8.5e-73) {
tmp = x;
} else if (a <= 9.5e-248) {
tmp = t_1;
} else if (a <= 2.95e-89) {
tmp = (y * z) / -a;
} else if (a <= 0.36) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t / (a / y) tmp = 0 if a <= -3.4e+23: tmp = x elif a <= -1.6e-48: tmp = t * (y / a) elif a <= -8.5e-73: tmp = x elif a <= 9.5e-248: tmp = t_1 elif a <= 2.95e-89: tmp = (y * z) / -a elif a <= 0.36: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(t / Float64(a / y)) tmp = 0.0 if (a <= -3.4e+23) tmp = x; elseif (a <= -1.6e-48) tmp = Float64(t * Float64(y / a)); elseif (a <= -8.5e-73) tmp = x; elseif (a <= 9.5e-248) tmp = t_1; elseif (a <= 2.95e-89) tmp = Float64(Float64(y * z) / Float64(-a)); elseif (a <= 0.36) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t / (a / y); tmp = 0.0; if (a <= -3.4e+23) tmp = x; elseif (a <= -1.6e-48) tmp = t * (y / a); elseif (a <= -8.5e-73) tmp = x; elseif (a <= 9.5e-248) tmp = t_1; elseif (a <= 2.95e-89) tmp = (y * z) / -a; elseif (a <= 0.36) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.4e+23], x, If[LessEqual[a, -1.6e-48], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -8.5e-73], x, If[LessEqual[a, 9.5e-248], t$95$1, If[LessEqual[a, 2.95e-89], N[(N[(y * z), $MachinePrecision] / (-a)), $MachinePrecision], If[LessEqual[a, 0.36], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{a}{y}}\\
\mathbf{if}\;a \leq -3.4 \cdot 10^{+23}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.6 \cdot 10^{-48}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq -8.5 \cdot 10^{-73}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-248}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.95 \cdot 10^{-89}:\\
\;\;\;\;\frac{y \cdot z}{-a}\\
\mathbf{elif}\;a \leq 0.36:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.39999999999999992e23 or -1.5999999999999999e-48 < a < -8.4999999999999996e-73 or 0.35999999999999999 < a Initial program 91.2%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in z around inf 81.2%
associate-/l*86.4%
Simplified86.4%
Taylor expanded in x around inf 68.1%
if -3.39999999999999992e23 < a < -1.5999999999999999e-48Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 70.6%
associate-*r/70.6%
mul-1-neg70.6%
distribute-lft-neg-out70.6%
*-commutative70.6%
associate-/l*70.9%
distribute-neg-frac70.9%
distribute-neg-frac270.9%
Simplified70.9%
Taylor expanded in x around 0 51.6%
associate-*r/51.9%
Simplified51.9%
if -8.4999999999999996e-73 < a < 9.49999999999999971e-248 or 2.9500000000000001e-89 < a < 0.35999999999999999Initial program 99.8%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in z around 0 74.1%
associate-*r/74.1%
mul-1-neg74.1%
distribute-lft-neg-out74.1%
*-commutative74.1%
associate-/l*66.6%
distribute-neg-frac66.6%
distribute-neg-frac266.6%
Simplified66.6%
Taylor expanded in x around 0 63.5%
*-commutative63.5%
associate-/l*57.6%
Applied egg-rr57.6%
associate-*r/63.5%
associate-*l/63.5%
*-commutative63.5%
clear-num63.5%
un-div-inv63.6%
Applied egg-rr63.6%
if 9.49999999999999971e-248 < a < 2.9500000000000001e-89Initial program 99.9%
associate-/l*81.6%
Simplified81.6%
Taylor expanded in z around inf 81.1%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in x around 0 65.1%
associate-*l/59.9%
associate-*r*59.9%
*-commutative59.9%
associate-*r/59.9%
neg-mul-159.9%
Simplified59.9%
distribute-frac-neg59.9%
distribute-frac-neg259.9%
associate-*r/65.1%
Applied egg-rr65.1%
Final simplification65.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- z t))))
(if (or (<= t_1 -2e+79) (not (<= t_1 2e+216)))
(+ x (* y (/ (- t z) a)))
(- x (/ t_1 a)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if ((t_1 <= -2e+79) || !(t_1 <= 2e+216)) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - (t_1 / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z - t)
if ((t_1 <= (-2d+79)) .or. (.not. (t_1 <= 2d+216))) then
tmp = x + (y * ((t - z) / a))
else
tmp = x - (t_1 / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if ((t_1 <= -2e+79) || !(t_1 <= 2e+216)) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - (t_1 / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) tmp = 0 if (t_1 <= -2e+79) or not (t_1 <= 2e+216): tmp = x + (y * ((t - z) / a)) else: tmp = x - (t_1 / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) tmp = 0.0 if ((t_1 <= -2e+79) || !(t_1 <= 2e+216)) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); else tmp = Float64(x - Float64(t_1 / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z - t); tmp = 0.0; if ((t_1 <= -2e+79) || ~((t_1 <= 2e+216))) tmp = x + (y * ((t - z) / a)); else tmp = x - (t_1 / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+79], N[Not[LessEqual[t$95$1, 2e+216]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+79} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+216}\right):\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t\_1}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -1.99999999999999993e79 or 2e216 < (*.f64 y (-.f64 z t)) Initial program 87.4%
associate-/l*99.9%
Simplified99.9%
if -1.99999999999999993e79 < (*.f64 y (-.f64 z t)) < 2e216Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.5e+26)
x
(if (or (<= a -5.4e-48) (and (not (<= a -8.5e-73)) (<= a 0.74)))
(* t (/ y a))
x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.5e+26) {
tmp = x;
} else if ((a <= -5.4e-48) || (!(a <= -8.5e-73) && (a <= 0.74))) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.5d+26)) then
tmp = x
else if ((a <= (-5.4d-48)) .or. (.not. (a <= (-8.5d-73))) .and. (a <= 0.74d0)) then
tmp = t * (y / a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.5e+26) {
tmp = x;
} else if ((a <= -5.4e-48) || (!(a <= -8.5e-73) && (a <= 0.74))) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.5e+26: tmp = x elif (a <= -5.4e-48) or (not (a <= -8.5e-73) and (a <= 0.74)): tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.5e+26) tmp = x; elseif ((a <= -5.4e-48) || (!(a <= -8.5e-73) && (a <= 0.74))) tmp = Float64(t * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.5e+26) tmp = x; elseif ((a <= -5.4e-48) || (~((a <= -8.5e-73)) && (a <= 0.74))) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.5e+26], x, If[Or[LessEqual[a, -5.4e-48], And[N[Not[LessEqual[a, -8.5e-73]], $MachinePrecision], LessEqual[a, 0.74]]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+26}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -5.4 \cdot 10^{-48} \lor \neg \left(a \leq -8.5 \cdot 10^{-73}\right) \land a \leq 0.74:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.5e26 or -5.40000000000000023e-48 < a < -8.4999999999999996e-73 or 0.73999999999999999 < a Initial program 91.2%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in z around inf 81.2%
associate-/l*86.4%
Simplified86.4%
Taylor expanded in x around inf 68.1%
if -2.5e26 < a < -5.40000000000000023e-48 or -8.4999999999999996e-73 < a < 0.73999999999999999Initial program 99.8%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in z around 0 64.9%
associate-*r/64.9%
mul-1-neg64.9%
distribute-lft-neg-out64.9%
*-commutative64.9%
associate-/l*58.6%
distribute-neg-frac58.6%
distribute-neg-frac258.6%
Simplified58.6%
Taylor expanded in x around 0 51.1%
associate-*r/52.6%
Simplified52.6%
Final simplification61.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.7e+25)
x
(if (<= a -1.7e-47)
(* t (/ y a))
(if (<= a -4.4e-73) x (if (<= a 0.235) (/ t (/ a y)) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e+25) {
tmp = x;
} else if (a <= -1.7e-47) {
tmp = t * (y / a);
} else if (a <= -4.4e-73) {
tmp = x;
} else if (a <= 0.235) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.7d+25)) then
tmp = x
else if (a <= (-1.7d-47)) then
tmp = t * (y / a)
else if (a <= (-4.4d-73)) then
tmp = x
else if (a <= 0.235d0) then
tmp = t / (a / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e+25) {
tmp = x;
} else if (a <= -1.7e-47) {
tmp = t * (y / a);
} else if (a <= -4.4e-73) {
tmp = x;
} else if (a <= 0.235) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.7e+25: tmp = x elif a <= -1.7e-47: tmp = t * (y / a) elif a <= -4.4e-73: tmp = x elif a <= 0.235: tmp = t / (a / y) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.7e+25) tmp = x; elseif (a <= -1.7e-47) tmp = Float64(t * Float64(y / a)); elseif (a <= -4.4e-73) tmp = x; elseif (a <= 0.235) tmp = Float64(t / Float64(a / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.7e+25) tmp = x; elseif (a <= -1.7e-47) tmp = t * (y / a); elseif (a <= -4.4e-73) tmp = x; elseif (a <= 0.235) tmp = t / (a / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.7e+25], x, If[LessEqual[a, -1.7e-47], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.4e-73], x, If[LessEqual[a, 0.235], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{+25}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.7 \cdot 10^{-47}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq -4.4 \cdot 10^{-73}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 0.235:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.6999999999999999e25 or -1.7000000000000001e-47 < a < -4.4e-73 or 0.23499999999999999 < a Initial program 91.2%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in z around inf 81.2%
associate-/l*86.4%
Simplified86.4%
Taylor expanded in x around inf 68.1%
if -3.6999999999999999e25 < a < -1.7000000000000001e-47Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 70.6%
associate-*r/70.6%
mul-1-neg70.6%
distribute-lft-neg-out70.6%
*-commutative70.6%
associate-/l*70.9%
distribute-neg-frac70.9%
distribute-neg-frac270.9%
Simplified70.9%
Taylor expanded in x around 0 51.6%
associate-*r/51.9%
Simplified51.9%
if -4.4e-73 < a < 0.23499999999999999Initial program 99.9%
associate-/l*87.2%
Simplified87.2%
Taylor expanded in z around 0 63.8%
associate-*r/63.8%
mul-1-neg63.8%
distribute-lft-neg-out63.8%
*-commutative63.8%
associate-/l*56.1%
distribute-neg-frac56.1%
distribute-neg-frac256.1%
Simplified56.1%
Taylor expanded in x around 0 50.9%
*-commutative50.9%
associate-/l*44.3%
Applied egg-rr44.3%
associate-*r/50.9%
associate-*l/52.8%
*-commutative52.8%
clear-num52.8%
un-div-inv52.9%
Applied egg-rr52.9%
Final simplification61.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.1e+139) (not (<= z 1.65e+202))) (* z (/ y (- a))) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.1e+139) || !(z <= 1.65e+202)) {
tmp = z * (y / -a);
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.1d+139)) .or. (.not. (z <= 1.65d+202))) then
tmp = z * (y / -a)
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.1e+139) || !(z <= 1.65e+202)) {
tmp = z * (y / -a);
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.1e+139) or not (z <= 1.65e+202): tmp = z * (y / -a) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.1e+139) || !(z <= 1.65e+202)) tmp = Float64(z * Float64(y / Float64(-a))); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.1e+139) || ~((z <= 1.65e+202))) tmp = z * (y / -a); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.1e+139], N[Not[LessEqual[z, 1.65e+202]], $MachinePrecision]], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+139} \lor \neg \left(z \leq 1.65 \cdot 10^{+202}\right):\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -2.0999999999999999e139 or 1.6499999999999999e202 < z Initial program 83.3%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in z around inf 79.8%
associate-/l*84.3%
Simplified84.3%
Taylor expanded in x around 0 60.3%
associate-*l/70.2%
associate-*r*70.2%
*-commutative70.2%
associate-*r/70.2%
neg-mul-170.2%
Simplified70.2%
if -2.0999999999999999e139 < z < 1.6499999999999999e202Initial program 98.4%
associate-/l*96.1%
Simplified96.1%
Taylor expanded in z around 0 82.0%
associate-*r/82.0%
mul-1-neg82.0%
distribute-lft-neg-out82.0%
*-commutative82.0%
associate-/l*79.3%
distribute-neg-frac79.3%
distribute-neg-frac279.3%
Simplified79.3%
Taylor expanded in y around 0 82.0%
Final simplification79.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1e-70) (not (<= t 4.4e+43))) (+ x (/ (* y t) a)) (- x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1e-70) || !(t <= 4.4e+43)) {
tmp = x + ((y * t) / a);
} else {
tmp = x - (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1d-70)) .or. (.not. (t <= 4.4d+43))) then
tmp = x + ((y * t) / a)
else
tmp = x - (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1e-70) || !(t <= 4.4e+43)) {
tmp = x + ((y * t) / a);
} else {
tmp = x - (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1e-70) or not (t <= 4.4e+43): tmp = x + ((y * t) / a) else: tmp = x - (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1e-70) || !(t <= 4.4e+43)) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = Float64(x - Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1e-70) || ~((t <= 4.4e+43))) tmp = x + ((y * t) / a); else tmp = x - (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1e-70], N[Not[LessEqual[t, 4.4e+43]], $MachinePrecision]], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-70} \lor \neg \left(t \leq 4.4 \cdot 10^{+43}\right):\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -9.99999999999999996e-71 or 4.40000000000000001e43 < t Initial program 93.9%
associate-/l*90.9%
Simplified90.9%
Taylor expanded in z around 0 83.4%
associate-*r/83.4%
mul-1-neg83.4%
distribute-lft-neg-out83.4%
*-commutative83.4%
associate-/l*81.3%
distribute-neg-frac81.3%
distribute-neg-frac281.3%
Simplified81.3%
Taylor expanded in y around 0 83.4%
if -9.99999999999999996e-71 < t < 4.40000000000000001e43Initial program 96.3%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in z around inf 90.6%
associate-/l*92.6%
Simplified92.6%
Final simplification88.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.4e-70) (+ x (* y (/ t a))) (if (<= t 3.4e+45) (- x (* y (/ z a))) (+ x (/ (* y t) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.4e-70) {
tmp = x + (y * (t / a));
} else if (t <= 3.4e+45) {
tmp = x - (y * (z / a));
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-3.4d-70)) then
tmp = x + (y * (t / a))
else if (t <= 3.4d+45) then
tmp = x - (y * (z / a))
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.4e-70) {
tmp = x + (y * (t / a));
} else if (t <= 3.4e+45) {
tmp = x - (y * (z / a));
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.4e-70: tmp = x + (y * (t / a)) elif t <= 3.4e+45: tmp = x - (y * (z / a)) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.4e-70) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (t <= 3.4e+45) tmp = Float64(x - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.4e-70) tmp = x + (y * (t / a)); elseif (t <= 3.4e+45) tmp = x - (y * (z / a)); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.4e-70], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e+45], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{-70}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+45}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if t < -3.39999999999999995e-70Initial program 92.6%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in z around 0 80.6%
associate-*r/80.6%
mul-1-neg80.6%
distribute-lft-neg-out80.6%
*-commutative80.6%
associate-/l*81.9%
distribute-neg-frac81.9%
distribute-neg-frac281.9%
Simplified81.9%
if -3.39999999999999995e-70 < t < 3.4e45Initial program 96.3%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in z around inf 90.6%
associate-/l*92.6%
Simplified92.6%
if 3.4e45 < t Initial program 95.9%
associate-/l*84.4%
Simplified84.4%
Taylor expanded in z around 0 87.9%
associate-*r/87.9%
mul-1-neg87.9%
distribute-lft-neg-out87.9%
*-commutative87.9%
associate-/l*80.4%
distribute-neg-frac80.4%
distribute-neg-frac280.4%
Simplified80.4%
Taylor expanded in y around 0 87.9%
Final simplification88.5%
(FPCore (x y z t a) :precision binary64 (if (<= z 1.32e+222) (+ x (* y (/ (- t z) a))) (- x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 1.32e+222) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - (z / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= 1.32d+222) then
tmp = x + (y * ((t - z) / a))
else
tmp = x - (z / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 1.32e+222) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - (z / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= 1.32e+222: tmp = x + (y * ((t - z) / a)) else: tmp = x - (z / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= 1.32e+222) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); else tmp = Float64(x - Float64(z / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= 1.32e+222) tmp = x + (y * ((t - z) / a)); else tmp = x - (z / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 1.32e+222], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.32 \cdot 10^{+222}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < 1.31999999999999997e222Initial program 97.0%
associate-/l*96.2%
Simplified96.2%
if 1.31999999999999997e222 < z Initial program 74.6%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in y around 0 74.6%
*-commutative74.6%
associate-*r/98.0%
Simplified98.0%
Taylor expanded in z around inf 74.6%
*-commutative74.6%
*-lft-identity74.6%
associate-*l/74.5%
*-commutative74.5%
associate-*r*98.0%
associate-/r/98.0%
associate-*l/98.0%
*-lft-identity98.0%
Simplified98.0%
Final simplification96.4%
(FPCore (x y z t a) :precision binary64 (if (<= y -1e-188) (+ x (* y (/ (- t z) a))) (- x (* (- z t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1e-188) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - ((z - t) * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1d-188)) then
tmp = x + (y * ((t - z) / a))
else
tmp = x - ((z - t) * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1e-188) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - ((z - t) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1e-188: tmp = x + (y * ((t - z) / a)) else: tmp = x - ((z - t) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1e-188) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); else tmp = Float64(x - Float64(Float64(z - t) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1e-188) tmp = x + (y * ((t - z) / a)); else tmp = x - ((z - t) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1e-188], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-188}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \left(z - t\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -9.9999999999999995e-189Initial program 92.8%
associate-/l*99.1%
Simplified99.1%
if -9.9999999999999995e-189 < y Initial program 96.7%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in y around 0 96.7%
*-commutative96.7%
associate-*r/97.4%
Simplified97.4%
Final simplification98.1%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 95.1%
associate-/l*94.7%
Simplified94.7%
Taylor expanded in z around inf 70.7%
associate-/l*71.7%
Simplified71.7%
Taylor expanded in x around inf 44.1%
Final simplification44.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ a (- z t))))
(if (< y -1.0761266216389975e-10)
(- x (/ 1.0 (/ t_1 y)))
(if (< y 2.894426862792089e-49)
(- x (/ (* y (- z t)) a))
(- x (/ y t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x - (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x - ((y * (z - t)) / a);
} else {
tmp = x - (y / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = a / (z - t)
if (y < (-1.0761266216389975d-10)) then
tmp = x - (1.0d0 / (t_1 / y))
else if (y < 2.894426862792089d-49) then
tmp = x - ((y * (z - t)) / a)
else
tmp = x - (y / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x - (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x - ((y * (z - t)) / a);
} else {
tmp = x - (y / t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a / (z - t) tmp = 0 if y < -1.0761266216389975e-10: tmp = x - (1.0 / (t_1 / y)) elif y < 2.894426862792089e-49: tmp = x - ((y * (z - t)) / a) else: tmp = x - (y / t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(a / Float64(z - t)) tmp = 0.0 if (y < -1.0761266216389975e-10) tmp = Float64(x - Float64(1.0 / Float64(t_1 / y))); elseif (y < 2.894426862792089e-49) tmp = Float64(x - Float64(Float64(y * Float64(z - t)) / a)); else tmp = Float64(x - Float64(y / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a / (z - t); tmp = 0.0; if (y < -1.0761266216389975e-10) tmp = x - (1.0 / (t_1 / y)); elseif (y < 2.894426862792089e-49) tmp = x - ((y * (z - t)) / a); else tmp = x - (y / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -1.0761266216389975e-10], N[(x - N[(1.0 / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y, 2.894426862792089e-49], N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x - \frac{1}{\frac{t\_1}{y}}\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x - \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{t\_1}\\
\end{array}
\end{array}
herbie shell --seed 2024053
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
:precision binary64
:alt
(if (< y -1.0761266216389975e-10) (- x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t))))))
(- x (/ (* y (- z t)) a)))