
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - 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)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - 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)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+305)))
(+ x (/ (- z t) (/ (- z a) y)))
(+ t_1 x))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+305)) {
tmp = x + ((z - t) / ((z - a) / y));
} else {
tmp = t_1 + x;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+305)) {
tmp = x + ((z - t) / ((z - a) / y));
} else {
tmp = t_1 + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 2e+305): tmp = x + ((z - t) / ((z - a) / y)) else: tmp = t_1 + x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+305)) tmp = Float64(x + Float64(Float64(z - t) / Float64(Float64(z - a) / y))); else tmp = Float64(t_1 + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 2e+305))) tmp = x + ((z - t) / ((z - a) / y)); else tmp = t_1 + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+305]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 2 \cdot 10^{+305}\right):\\
\;\;\;\;x + \frac{z - t}{\frac{z - a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1 + x\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 1.9999999999999999e305 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 31.7%
associate-*l/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.7%
un-div-inv99.9%
Applied egg-rr99.9%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.9999999999999999e305Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+305)))
(+ x (* (- z t) (/ y (- z a))))
(+ t_1 x))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+305)) {
tmp = x + ((z - t) * (y / (z - a)));
} else {
tmp = t_1 + x;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+305)) {
tmp = x + ((z - t) * (y / (z - a)));
} else {
tmp = t_1 + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 2e+305): tmp = x + ((z - t) * (y / (z - a))) else: tmp = t_1 + x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+305)) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))); else tmp = Float64(t_1 + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 2e+305))) tmp = x + ((z - t) * (y / (z - a))); else tmp = t_1 + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+305]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 2 \cdot 10^{+305}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;t_1 + x\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 1.9999999999999999e305 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 31.7%
associate-*l/99.8%
Simplified99.8%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.9999999999999999e305Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= z -1.45e+24)
(+ y x)
(if (<= z -1.25e-192)
x
(if (<= z -5.5e-215)
t_1
(if (<= z -2.05e-282)
x
(if (<= z -1e-302) t_1 (if (<= z 3.3e+65) x (+ y x)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (z <= -1.45e+24) {
tmp = y + x;
} else if (z <= -1.25e-192) {
tmp = x;
} else if (z <= -5.5e-215) {
tmp = t_1;
} else if (z <= -2.05e-282) {
tmp = x;
} else if (z <= -1e-302) {
tmp = t_1;
} else if (z <= 3.3e+65) {
tmp = x;
} else {
tmp = y + 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 * (y / a)
if (z <= (-1.45d+24)) then
tmp = y + x
else if (z <= (-1.25d-192)) then
tmp = x
else if (z <= (-5.5d-215)) then
tmp = t_1
else if (z <= (-2.05d-282)) then
tmp = x
else if (z <= (-1d-302)) then
tmp = t_1
else if (z <= 3.3d+65) then
tmp = x
else
tmp = y + 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 * (y / a);
double tmp;
if (z <= -1.45e+24) {
tmp = y + x;
} else if (z <= -1.25e-192) {
tmp = x;
} else if (z <= -5.5e-215) {
tmp = t_1;
} else if (z <= -2.05e-282) {
tmp = x;
} else if (z <= -1e-302) {
tmp = t_1;
} else if (z <= 3.3e+65) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if z <= -1.45e+24: tmp = y + x elif z <= -1.25e-192: tmp = x elif z <= -5.5e-215: tmp = t_1 elif z <= -2.05e-282: tmp = x elif z <= -1e-302: tmp = t_1 elif z <= 3.3e+65: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (z <= -1.45e+24) tmp = Float64(y + x); elseif (z <= -1.25e-192) tmp = x; elseif (z <= -5.5e-215) tmp = t_1; elseif (z <= -2.05e-282) tmp = x; elseif (z <= -1e-302) tmp = t_1; elseif (z <= 3.3e+65) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); tmp = 0.0; if (z <= -1.45e+24) tmp = y + x; elseif (z <= -1.25e-192) tmp = x; elseif (z <= -5.5e-215) tmp = t_1; elseif (z <= -2.05e-282) tmp = x; elseif (z <= -1e-302) tmp = t_1; elseif (z <= 3.3e+65) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+24], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.25e-192], x, If[LessEqual[z, -5.5e-215], t$95$1, If[LessEqual[z, -2.05e-282], x, If[LessEqual[z, -1e-302], t$95$1, If[LessEqual[z, 3.3e+65], x, N[(y + x), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+24}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-192}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-215}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.05 \cdot 10^{-282}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-302}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+65}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.4499999999999999e24 or 3.30000000000000023e65 < z Initial program 71.9%
associate-*l/95.9%
Simplified95.9%
Taylor expanded in z around inf 73.6%
+-commutative73.6%
Simplified73.6%
if -1.4499999999999999e24 < z < -1.25e-192 or -5.50000000000000004e-215 < z < -2.04999999999999989e-282 or -9.9999999999999996e-303 < z < 3.30000000000000023e65Initial program 94.7%
associate-*l/94.2%
Simplified94.2%
Taylor expanded in x around inf 60.4%
if -1.25e-192 < z < -5.50000000000000004e-215 or -2.04999999999999989e-282 < z < -9.9999999999999996e-303Initial program 94.1%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in t around inf 94.1%
mul-1-neg94.1%
associate-*r/99.7%
distribute-lft-neg-out99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 94.1%
mul-1-neg94.1%
associate-*l/88.3%
distribute-lft-neg-in88.3%
cancel-sign-sub-inv88.3%
Simplified88.3%
Taylor expanded in x around 0 88.0%
mul-1-neg88.0%
associate-*l/82.2%
distribute-rgt-neg-in82.2%
Simplified82.2%
Taylor expanded in z around 0 76.5%
associate-*r/82.1%
Simplified82.1%
Final simplification66.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.25e+24)
(+ y x)
(if (<= z -1.25e-192)
x
(if (<= z -1.55e-214)
(* t (/ y a))
(if (<= z -3e-280)
x
(if (<= z -2.9e-303) (/ (* y t) a) (if (<= z 2.4e+65) x (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.25e+24) {
tmp = y + x;
} else if (z <= -1.25e-192) {
tmp = x;
} else if (z <= -1.55e-214) {
tmp = t * (y / a);
} else if (z <= -3e-280) {
tmp = x;
} else if (z <= -2.9e-303) {
tmp = (y * t) / a;
} else if (z <= 2.4e+65) {
tmp = x;
} else {
tmp = y + 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 (z <= (-1.25d+24)) then
tmp = y + x
else if (z <= (-1.25d-192)) then
tmp = x
else if (z <= (-1.55d-214)) then
tmp = t * (y / a)
else if (z <= (-3d-280)) then
tmp = x
else if (z <= (-2.9d-303)) then
tmp = (y * t) / a
else if (z <= 2.4d+65) then
tmp = x
else
tmp = y + x
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.25e+24) {
tmp = y + x;
} else if (z <= -1.25e-192) {
tmp = x;
} else if (z <= -1.55e-214) {
tmp = t * (y / a);
} else if (z <= -3e-280) {
tmp = x;
} else if (z <= -2.9e-303) {
tmp = (y * t) / a;
} else if (z <= 2.4e+65) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.25e+24: tmp = y + x elif z <= -1.25e-192: tmp = x elif z <= -1.55e-214: tmp = t * (y / a) elif z <= -3e-280: tmp = x elif z <= -2.9e-303: tmp = (y * t) / a elif z <= 2.4e+65: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.25e+24) tmp = Float64(y + x); elseif (z <= -1.25e-192) tmp = x; elseif (z <= -1.55e-214) tmp = Float64(t * Float64(y / a)); elseif (z <= -3e-280) tmp = x; elseif (z <= -2.9e-303) tmp = Float64(Float64(y * t) / a); elseif (z <= 2.4e+65) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.25e+24) tmp = y + x; elseif (z <= -1.25e-192) tmp = x; elseif (z <= -1.55e-214) tmp = t * (y / a); elseif (z <= -3e-280) tmp = x; elseif (z <= -2.9e-303) tmp = (y * t) / a; elseif (z <= 2.4e+65) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.25e+24], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.25e-192], x, If[LessEqual[z, -1.55e-214], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3e-280], x, If[LessEqual[z, -2.9e-303], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 2.4e+65], x, N[(y + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+24}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-192}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-214}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-280}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-303}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+65}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.25000000000000011e24 or 2.4000000000000002e65 < z Initial program 71.9%
associate-*l/95.9%
Simplified95.9%
Taylor expanded in z around inf 73.6%
+-commutative73.6%
Simplified73.6%
if -1.25000000000000011e24 < z < -1.25e-192 or -1.55000000000000002e-214 < z < -2.99999999999999987e-280 or -2.90000000000000014e-303 < z < 2.4000000000000002e65Initial program 94.7%
associate-*l/94.2%
Simplified94.2%
Taylor expanded in x around inf 60.4%
if -1.25e-192 < z < -1.55000000000000002e-214Initial program 89.5%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in t around inf 89.5%
mul-1-neg89.5%
associate-*r/99.7%
distribute-lft-neg-out99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 89.5%
mul-1-neg89.5%
associate-*l/99.7%
distribute-lft-neg-in99.7%
cancel-sign-sub-inv99.7%
Simplified99.7%
Taylor expanded in x around 0 89.5%
mul-1-neg89.5%
associate-*l/99.7%
distribute-rgt-neg-in99.7%
Simplified99.7%
Taylor expanded in z around 0 69.0%
associate-*r/79.2%
Simplified79.2%
if -2.99999999999999987e-280 < z < -2.90000000000000014e-303Initial program 100.0%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in t around inf 100.0%
mul-1-neg100.0%
associate-*r/99.8%
distribute-lft-neg-out99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 100.0%
mul-1-neg100.0%
associate-*l/73.7%
distribute-lft-neg-in73.7%
cancel-sign-sub-inv73.7%
Simplified73.7%
Taylor expanded in x around 0 86.0%
mul-1-neg86.0%
associate-*l/59.8%
distribute-rgt-neg-in59.8%
Simplified59.8%
Taylor expanded in z around 0 86.0%
Final simplification66.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ y (/ a (- z t))))))
(if (<= a -6.2e-97)
t_1
(if (<= a 1.6e-175)
(+ x (/ y (/ z (- z t))))
(if (<= a 2.5e+77) (- x (/ (* y t) (- z a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y / (a / (z - t)));
double tmp;
if (a <= -6.2e-97) {
tmp = t_1;
} else if (a <= 1.6e-175) {
tmp = x + (y / (z / (z - t)));
} else if (a <= 2.5e+77) {
tmp = x - ((y * t) / (z - a));
} else {
tmp = 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 = x - (y / (a / (z - t)))
if (a <= (-6.2d-97)) then
tmp = t_1
else if (a <= 1.6d-175) then
tmp = x + (y / (z / (z - t)))
else if (a <= 2.5d+77) then
tmp = x - ((y * t) / (z - a))
else
tmp = 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 = x - (y / (a / (z - t)));
double tmp;
if (a <= -6.2e-97) {
tmp = t_1;
} else if (a <= 1.6e-175) {
tmp = x + (y / (z / (z - t)));
} else if (a <= 2.5e+77) {
tmp = x - ((y * t) / (z - a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y / (a / (z - t))) tmp = 0 if a <= -6.2e-97: tmp = t_1 elif a <= 1.6e-175: tmp = x + (y / (z / (z - t))) elif a <= 2.5e+77: tmp = x - ((y * t) / (z - a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y / Float64(a / Float64(z - t)))) tmp = 0.0 if (a <= -6.2e-97) tmp = t_1; elseif (a <= 1.6e-175) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); elseif (a <= 2.5e+77) tmp = Float64(x - Float64(Float64(y * t) / Float64(z - a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y / (a / (z - t))); tmp = 0.0; if (a <= -6.2e-97) tmp = t_1; elseif (a <= 1.6e-175) tmp = x + (y / (z / (z - t))); elseif (a <= 2.5e+77) tmp = x - ((y * t) / (z - a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.2e-97], t$95$1, If[LessEqual[a, 1.6e-175], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.5e+77], N[(x - N[(N[(y * t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{a}{z - t}}\\
\mathbf{if}\;a \leq -6.2 \cdot 10^{-97}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-175}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{+77}:\\
\;\;\;\;x - \frac{y \cdot t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -6.20000000000000004e-97 or 2.50000000000000002e77 < a Initial program 82.7%
associate-*l/97.9%
Simplified97.9%
*-commutative97.9%
clear-num97.9%
un-div-inv97.9%
Applied egg-rr97.9%
Taylor expanded in a around inf 79.5%
mul-1-neg79.5%
unsub-neg79.5%
associate-/l*89.4%
Simplified89.4%
if -6.20000000000000004e-97 < a < 1.6e-175Initial program 86.3%
associate-*l/91.7%
Simplified91.7%
Taylor expanded in a around 0 77.7%
+-commutative77.7%
associate-/l*87.2%
Simplified87.2%
if 1.6e-175 < a < 2.50000000000000002e77Initial program 97.8%
associate-*l/91.7%
Simplified91.7%
Taylor expanded in t around inf 89.7%
associate-*r/89.7%
mul-1-neg89.7%
distribute-lft-neg-out89.7%
*-commutative89.7%
Simplified89.7%
Final simplification88.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.95e-94) (not (<= a 4.4e-53))) (- x (/ y (/ (- a) t))) (+ x (/ (* y (- z t)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.95e-94) || !(a <= 4.4e-53)) {
tmp = x - (y / (-a / t));
} else {
tmp = x + ((y * (z - t)) / z);
}
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 <= (-1.95d-94)) .or. (.not. (a <= 4.4d-53))) then
tmp = x - (y / (-a / t))
else
tmp = x + ((y * (z - t)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.95e-94) || !(a <= 4.4e-53)) {
tmp = x - (y / (-a / t));
} else {
tmp = x + ((y * (z - t)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.95e-94) or not (a <= 4.4e-53): tmp = x - (y / (-a / t)) else: tmp = x + ((y * (z - t)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.95e-94) || !(a <= 4.4e-53)) tmp = Float64(x - Float64(y / Float64(Float64(-a) / t))); else tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.95e-94) || ~((a <= 4.4e-53))) tmp = x - (y / (-a / t)); else tmp = x + ((y * (z - t)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.95e-94], N[Not[LessEqual[a, 4.4e-53]], $MachinePrecision]], N[(x - N[(y / N[((-a) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.95 \cdot 10^{-94} \lor \neg \left(a \leq 4.4 \cdot 10^{-53}\right):\\
\;\;\;\;x - \frac{y}{\frac{-a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\end{array}
\end{array}
if a < -1.9500000000000001e-94 or 4.40000000000000037e-53 < a Initial program 85.0%
associate-*l/97.6%
Simplified97.6%
*-commutative97.6%
clear-num97.6%
un-div-inv98.1%
Applied egg-rr98.1%
Taylor expanded in a around inf 80.4%
mul-1-neg80.4%
unsub-neg80.4%
associate-/l*89.0%
Simplified89.0%
Taylor expanded in z around 0 79.5%
associate-*r/79.5%
neg-mul-179.5%
Simplified79.5%
if -1.9500000000000001e-94 < a < 4.40000000000000037e-53Initial program 88.6%
associate-*l/90.8%
Simplified90.8%
Taylor expanded in a around 0 75.8%
Final simplification78.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6e-92) (not (<= a 2.4e-51))) (- x (/ y (/ (- a) t))) (+ x (/ (- z t) (/ z y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6e-92) || !(a <= 2.4e-51)) {
tmp = x - (y / (-a / t));
} else {
tmp = x + ((z - t) / (z / 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 ((a <= (-6d-92)) .or. (.not. (a <= 2.4d-51))) then
tmp = x - (y / (-a / t))
else
tmp = x + ((z - t) / (z / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6e-92) || !(a <= 2.4e-51)) {
tmp = x - (y / (-a / t));
} else {
tmp = x + ((z - t) / (z / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -6e-92) or not (a <= 2.4e-51): tmp = x - (y / (-a / t)) else: tmp = x + ((z - t) / (z / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -6e-92) || !(a <= 2.4e-51)) tmp = Float64(x - Float64(y / Float64(Float64(-a) / t))); else tmp = Float64(x + Float64(Float64(z - t) / Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -6e-92) || ~((a <= 2.4e-51))) tmp = x - (y / (-a / t)); else tmp = x + ((z - t) / (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6e-92], N[Not[LessEqual[a, 2.4e-51]], $MachinePrecision]], N[(x - N[(y / N[((-a) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{-92} \lor \neg \left(a \leq 2.4 \cdot 10^{-51}\right):\\
\;\;\;\;x - \frac{y}{\frac{-a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z - t}{\frac{z}{y}}\\
\end{array}
\end{array}
if a < -6.00000000000000027e-92 or 2.4e-51 < a Initial program 85.0%
associate-*l/97.6%
Simplified97.6%
*-commutative97.6%
clear-num97.6%
un-div-inv98.1%
Applied egg-rr98.1%
Taylor expanded in a around inf 80.4%
mul-1-neg80.4%
unsub-neg80.4%
associate-/l*89.0%
Simplified89.0%
Taylor expanded in z around 0 79.5%
associate-*r/79.5%
neg-mul-179.5%
Simplified79.5%
if -6.00000000000000027e-92 < a < 2.4e-51Initial program 88.6%
associate-*l/90.8%
Simplified90.8%
*-commutative90.8%
clear-num90.7%
un-div-inv91.8%
Applied egg-rr91.8%
Taylor expanded in z around inf 82.0%
Final simplification80.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.02e-94) (not (<= a 5e-57))) (- x (/ y (/ (- a) t))) (+ x (/ y (/ z (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.02e-94) || !(a <= 5e-57)) {
tmp = x - (y / (-a / t));
} else {
tmp = x + (y / (z / (z - t)));
}
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 <= (-1.02d-94)) .or. (.not. (a <= 5d-57))) then
tmp = x - (y / (-a / t))
else
tmp = x + (y / (z / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.02e-94) || !(a <= 5e-57)) {
tmp = x - (y / (-a / t));
} else {
tmp = x + (y / (z / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.02e-94) or not (a <= 5e-57): tmp = x - (y / (-a / t)) else: tmp = x + (y / (z / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.02e-94) || !(a <= 5e-57)) tmp = Float64(x - Float64(y / Float64(Float64(-a) / t))); else tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.02e-94) || ~((a <= 5e-57))) tmp = x - (y / (-a / t)); else tmp = x + (y / (z / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.02e-94], N[Not[LessEqual[a, 5e-57]], $MachinePrecision]], N[(x - N[(y / N[((-a) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \cdot 10^{-94} \lor \neg \left(a \leq 5 \cdot 10^{-57}\right):\\
\;\;\;\;x - \frac{y}{\frac{-a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\end{array}
\end{array}
if a < -1.02e-94 or 5.0000000000000002e-57 < a Initial program 85.0%
associate-*l/97.6%
Simplified97.6%
*-commutative97.6%
clear-num97.6%
un-div-inv98.1%
Applied egg-rr98.1%
Taylor expanded in a around inf 80.4%
mul-1-neg80.4%
unsub-neg80.4%
associate-/l*89.0%
Simplified89.0%
Taylor expanded in z around 0 79.5%
associate-*r/79.5%
neg-mul-179.5%
Simplified79.5%
if -1.02e-94 < a < 5.0000000000000002e-57Initial program 88.6%
associate-*l/90.8%
Simplified90.8%
Taylor expanded in a around 0 75.8%
+-commutative75.8%
associate-/l*84.0%
Simplified84.0%
Final simplification81.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.4e+147) (not (<= z 7e+67))) (+ x (/ y (/ z (- z t)))) (- x (* y (/ t (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.4e+147) || !(z <= 7e+67)) {
tmp = x + (y / (z / (z - t)));
} 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) :: tmp
if ((z <= (-1.4d+147)) .or. (.not. (z <= 7d+67))) then
tmp = x + (y / (z / (z - t)))
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 tmp;
if ((z <= -1.4e+147) || !(z <= 7e+67)) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = x - (y * (t / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.4e+147) or not (z <= 7e+67): tmp = x + (y / (z / (z - t))) else: tmp = x - (y * (t / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.4e+147) || !(z <= 7e+67)) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); else tmp = Float64(x - Float64(y * Float64(t / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.4e+147) || ~((z <= 7e+67))) tmp = x + (y / (z / (z - t))); else tmp = x - (y * (t / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.4e+147], N[Not[LessEqual[z, 7e+67]], $MachinePrecision]], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+147} \lor \neg \left(z \leq 7 \cdot 10^{+67}\right):\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{t}{z - a}\\
\end{array}
\end{array}
if z < -1.4e147 or 7e67 < z Initial program 67.8%
associate-*l/94.5%
Simplified94.5%
Taylor expanded in a around 0 59.5%
+-commutative59.5%
associate-/l*89.0%
Simplified89.0%
if -1.4e147 < z < 7e67Initial program 93.3%
associate-*l/95.4%
Simplified95.4%
Taylor expanded in t around inf 84.2%
mul-1-neg84.2%
associate-*r/86.8%
distribute-lft-neg-out86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in x around 0 84.2%
mul-1-neg84.2%
associate-*l/87.2%
distribute-lft-neg-in87.2%
cancel-sign-sub-inv87.2%
Simplified87.2%
Final simplification87.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6e-92) (not (<= a 1.15e-33))) (- x (/ y (/ a (- z t)))) (+ x (/ y (/ z (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6e-92) || !(a <= 1.15e-33)) {
tmp = x - (y / (a / (z - t)));
} else {
tmp = x + (y / (z / (z - t)));
}
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 <= (-6d-92)) .or. (.not. (a <= 1.15d-33))) then
tmp = x - (y / (a / (z - t)))
else
tmp = x + (y / (z / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6e-92) || !(a <= 1.15e-33)) {
tmp = x - (y / (a / (z - t)));
} else {
tmp = x + (y / (z / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -6e-92) or not (a <= 1.15e-33): tmp = x - (y / (a / (z - t))) else: tmp = x + (y / (z / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -6e-92) || !(a <= 1.15e-33)) tmp = Float64(x - Float64(y / Float64(a / Float64(z - t)))); else tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -6e-92) || ~((a <= 1.15e-33))) tmp = x - (y / (a / (z - t))); else tmp = x + (y / (z / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6e-92], N[Not[LessEqual[a, 1.15e-33]], $MachinePrecision]], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{-92} \lor \neg \left(a \leq 1.15 \cdot 10^{-33}\right):\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\end{array}
\end{array}
if a < -6.00000000000000027e-92 or 1.14999999999999993e-33 < a Initial program 84.8%
associate-*l/97.5%
Simplified97.5%
*-commutative97.5%
clear-num97.5%
un-div-inv98.1%
Applied egg-rr98.1%
Taylor expanded in a around inf 80.8%
mul-1-neg80.8%
unsub-neg80.8%
associate-/l*89.5%
Simplified89.5%
if -6.00000000000000027e-92 < a < 1.14999999999999993e-33Initial program 88.9%
associate-*l/91.0%
Simplified91.0%
Taylor expanded in a around 0 75.4%
+-commutative75.4%
associate-/l*83.5%
Simplified83.5%
Final simplification87.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.18e+85) (not (<= z 2.1e+71))) (+ y x) (- x (/ y (/ (- a) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.18e+85) || !(z <= 2.1e+71)) {
tmp = y + x;
} else {
tmp = x - (y / (-a / t));
}
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.18d+85)) .or. (.not. (z <= 2.1d+71))) then
tmp = y + x
else
tmp = x - (y / (-a / t))
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.18e+85) || !(z <= 2.1e+71)) {
tmp = y + x;
} else {
tmp = x - (y / (-a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.18e+85) or not (z <= 2.1e+71): tmp = y + x else: tmp = x - (y / (-a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.18e+85) || !(z <= 2.1e+71)) tmp = Float64(y + x); else tmp = Float64(x - Float64(y / Float64(Float64(-a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.18e+85) || ~((z <= 2.1e+71))) tmp = y + x; else tmp = x - (y / (-a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.18e+85], N[Not[LessEqual[z, 2.1e+71]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x - N[(y / N[((-a) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.18 \cdot 10^{+85} \lor \neg \left(z \leq 2.1 \cdot 10^{+71}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{-a}{t}}\\
\end{array}
\end{array}
if z < -1.17999999999999997e85 or 2.09999999999999989e71 < z Initial program 69.4%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in z around inf 76.8%
+-commutative76.8%
Simplified76.8%
if -1.17999999999999997e85 < z < 2.09999999999999989e71Initial program 94.4%
associate-*l/95.0%
Simplified95.0%
*-commutative95.0%
clear-num95.0%
un-div-inv96.1%
Applied egg-rr96.1%
Taylor expanded in a around inf 78.2%
mul-1-neg78.2%
unsub-neg78.2%
associate-/l*81.7%
Simplified81.7%
Taylor expanded in z around 0 76.6%
associate-*r/76.6%
neg-mul-176.6%
Simplified76.6%
Final simplification76.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.6e+84) (not (<= z 2.35e+67))) (+ y x) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.6e+84) || !(z <= 2.35e+67)) {
tmp = y + x;
} 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 <= (-8.6d+84)) .or. (.not. (z <= 2.35d+67))) then
tmp = y + x
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 <= -8.6e+84) || !(z <= 2.35e+67)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.6e+84) or not (z <= 2.35e+67): tmp = y + x else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.6e+84) || !(z <= 2.35e+67)) tmp = Float64(y + x); 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 <= -8.6e+84) || ~((z <= 2.35e+67))) tmp = y + x; else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.6e+84], N[Not[LessEqual[z, 2.35e+67]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{+84} \lor \neg \left(z \leq 2.35 \cdot 10^{+67}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -8.5999999999999992e84 or 2.35000000000000009e67 < z Initial program 69.4%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in z around inf 76.8%
+-commutative76.8%
Simplified76.8%
if -8.5999999999999992e84 < z < 2.35000000000000009e67Initial program 94.4%
associate-*l/95.0%
Simplified95.0%
Taylor expanded in z around 0 72.4%
Final simplification73.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.4e+86) (+ y x) (if (<= z 2.4e+65) (+ x (* y (/ t a))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.4e+86) {
tmp = y + x;
} else if (z <= 2.4e+65) {
tmp = x + (y * (t / a));
} else {
tmp = y + 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 (z <= (-3.4d+86)) then
tmp = y + x
else if (z <= 2.4d+65) then
tmp = x + (y * (t / a))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.4e+86) {
tmp = y + x;
} else if (z <= 2.4e+65) {
tmp = x + (y * (t / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.4e+86: tmp = y + x elif z <= 2.4e+65: tmp = x + (y * (t / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.4e+86) tmp = Float64(y + x); elseif (z <= 2.4e+65) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.4e+86) tmp = y + x; elseif (z <= 2.4e+65) tmp = x + (y * (t / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.4e+86], N[(y + x), $MachinePrecision], If[LessEqual[z, 2.4e+65], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+86}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+65}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -3.3999999999999998e86 or 2.4000000000000002e65 < z Initial program 69.4%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in z around inf 76.8%
+-commutative76.8%
Simplified76.8%
if -3.3999999999999998e86 < z < 2.4000000000000002e65Initial program 94.4%
associate-*l/95.0%
Simplified95.0%
Taylor expanded in z around 0 72.4%
+-commutative72.4%
associate-/l*75.7%
associate-/r/76.1%
Simplified76.1%
Final simplification76.3%
(FPCore (x y z t a) :precision binary64 (+ x (* (- z t) (/ y (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (z - 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 + ((z - t) * (y / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (z - a)));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{z - a}
\end{array}
Initial program 86.3%
associate-*l/95.1%
Simplified95.1%
Final simplification95.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.2e+24) (not (<= z 2.4e+65))) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.2e+24) || !(z <= 2.4e+65)) {
tmp = y + x;
} 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 ((z <= (-3.2d+24)) .or. (.not. (z <= 2.4d+65))) then
tmp = y + x
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 ((z <= -3.2e+24) || !(z <= 2.4e+65)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.2e+24) or not (z <= 2.4e+65): tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.2e+24) || !(z <= 2.4e+65)) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.2e+24) || ~((z <= 2.4e+65))) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.2e+24], N[Not[LessEqual[z, 2.4e+65]], $MachinePrecision]], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+24} \lor \neg \left(z \leq 2.4 \cdot 10^{+65}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.1999999999999997e24 or 2.4000000000000002e65 < z Initial program 71.9%
associate-*l/95.9%
Simplified95.9%
Taylor expanded in z around inf 73.6%
+-commutative73.6%
Simplified73.6%
if -3.1999999999999997e24 < z < 2.4000000000000002e65Initial program 94.6%
associate-*l/94.7%
Simplified94.7%
Taylor expanded in x around inf 55.3%
Final simplification62.0%
(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 86.3%
associate-*l/95.1%
Simplified95.1%
Taylor expanded in x around inf 52.6%
Final simplification52.6%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
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 - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2023293
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))