
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma z (- b y) y)))
(if (or (<= z -1.3e+70) (not (<= z 3.55e+56)))
(+
(+ (/ x (/ (- b y) (/ y z))) (/ (- t a) (- b y)))
(* (/ y z) (/ (- a t) (pow (- b y) 2.0))))
(fma
-1.0
(/ a (- (+ b (/ y z)) y))
(+ (/ x (/ t_1 y)) (/ (* z t) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(z, (b - y), y);
double tmp;
if ((z <= -1.3e+70) || !(z <= 3.55e+56)) {
tmp = ((x / ((b - y) / (y / z))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / pow((b - y), 2.0)));
} else {
tmp = fma(-1.0, (a / ((b + (y / z)) - y)), ((x / (t_1 / y)) + ((z * t) / t_1)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(z, Float64(b - y), y) tmp = 0.0 if ((z <= -1.3e+70) || !(z <= 3.55e+56)) tmp = Float64(Float64(Float64(x / Float64(Float64(b - y) / Float64(y / z))) + Float64(Float64(t - a) / Float64(b - y))) + Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))); else tmp = fma(-1.0, Float64(a / Float64(Float64(b + Float64(y / z)) - y)), Float64(Float64(x / Float64(t_1 / y)) + Float64(Float64(z * t) / t_1))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]}, If[Or[LessEqual[z, -1.3e+70], N[Not[LessEqual[z, 3.55e+56]], $MachinePrecision]], N[(N[(N[(x / N[(N[(b - y), $MachinePrecision] / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(a / N[(N[(b + N[(y / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] + N[(N[(x / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, b - y, y\right)\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+70} \lor \neg \left(z \leq 3.55 \cdot 10^{+56}\right):\\
\;\;\;\;\left(\frac{x}{\frac{b - y}{\frac{y}{z}}} + \frac{t - a}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-1, \frac{a}{\left(b + \frac{y}{z}\right) - y}, \frac{x}{\frac{t_1}{y}} + \frac{z \cdot t}{t_1}\right)\\
\end{array}
\end{array}
if z < -1.3e70 or 3.55e56 < z Initial program 25.0%
Taylor expanded in z around inf 56.7%
associate--r+56.7%
+-commutative56.7%
associate--l+56.7%
associate-/l*58.7%
*-commutative58.7%
associate-/l*65.1%
div-sub65.1%
times-frac87.6%
Simplified87.6%
if -1.3e70 < z < 3.55e56Initial program 87.4%
Taylor expanded in t around 0 87.4%
fma-def87.4%
associate-/l*87.5%
+-commutative87.5%
fma-def87.5%
+-commutative87.5%
associate-/l*97.3%
+-commutative97.3%
fma-def97.3%
*-commutative97.3%
+-commutative97.3%
fma-def97.3%
Simplified97.3%
Taylor expanded in z around 0 97.9%
Final simplification93.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* x y) (* z (- t a)))) (t_2 (/ t_1 (+ y (* z (- b y))))))
(if (<= t_2 (- INFINITY))
(fma -1.0 (/ a (- (+ b (/ y z)) y)) (+ x (/ (* z t) (fma z (- b y) y))))
(if (or (<= t_2 -2e-270) (and (not (<= t_2 0.0)) (<= t_2 4e+293)))
(/ t_1 (- (* z b) (* y (+ z -1.0))))
(+
(+ (/ x (/ (- b y) (/ y z))) (/ (- t a) (- b y)))
(* (/ y z) (/ (- a t) (pow (- b y) 2.0))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * y) + (z * (t - a));
double t_2 = t_1 / (y + (z * (b - y)));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = fma(-1.0, (a / ((b + (y / z)) - y)), (x + ((z * t) / fma(z, (b - y), y))));
} else if ((t_2 <= -2e-270) || (!(t_2 <= 0.0) && (t_2 <= 4e+293))) {
tmp = t_1 / ((z * b) - (y * (z + -1.0)));
} else {
tmp = ((x / ((b - y) / (y / z))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / pow((b - y), 2.0)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * y) + Float64(z * Float64(t - a))) t_2 = Float64(t_1 / Float64(y + Float64(z * Float64(b - y)))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = fma(-1.0, Float64(a / Float64(Float64(b + Float64(y / z)) - y)), Float64(x + Float64(Float64(z * t) / fma(z, Float64(b - y), y)))); elseif ((t_2 <= -2e-270) || (!(t_2 <= 0.0) && (t_2 <= 4e+293))) tmp = Float64(t_1 / Float64(Float64(z * b) - Float64(y * Float64(z + -1.0)))); else tmp = Float64(Float64(Float64(x / Float64(Float64(b - y) / Float64(y / z))) + Float64(Float64(t - a) / Float64(b - y))) + Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(-1.0 * N[(a / N[(N[(b + N[(y / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] + N[(x + N[(N[(z * t), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$2, -2e-270], And[N[Not[LessEqual[t$95$2, 0.0]], $MachinePrecision], LessEqual[t$95$2, 4e+293]]], N[(t$95$1 / N[(N[(z * b), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / N[(N[(b - y), $MachinePrecision] / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot \left(t - a\right)\\
t_2 := \frac{t_1}{y + z \cdot \left(b - y\right)}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(-1, \frac{a}{\left(b + \frac{y}{z}\right) - y}, x + \frac{z \cdot t}{\mathsf{fma}\left(z, b - y, y\right)}\right)\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-270} \lor \neg \left(t_2 \leq 0\right) \land t_2 \leq 4 \cdot 10^{+293}:\\
\;\;\;\;\frac{t_1}{z \cdot b - y \cdot \left(z + -1\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{x}{\frac{b - y}{\frac{y}{z}}} + \frac{t - a}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 37.5%
Taylor expanded in t around 0 33.4%
fma-def33.4%
associate-/l*44.2%
+-commutative44.2%
fma-def44.2%
+-commutative44.2%
associate-/l*82.4%
+-commutative82.4%
fma-def82.4%
*-commutative82.4%
+-commutative82.4%
fma-def82.4%
Simplified82.4%
Taylor expanded in z around 0 82.4%
Taylor expanded in z around 0 68.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.0000000000000001e-270 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 3.9999999999999997e293Initial program 99.6%
Taylor expanded in y around -inf 99.6%
+-commutative99.6%
mul-1-neg99.6%
unsub-neg99.6%
*-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
if -2.0000000000000001e-270 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 3.9999999999999997e293 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 11.3%
Taylor expanded in z around inf 43.2%
associate--r+43.2%
+-commutative43.2%
associate--l+43.2%
associate-/l*44.5%
*-commutative44.5%
associate-/l*52.0%
div-sub52.0%
times-frac84.5%
Simplified84.5%
Final simplification91.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* x y) (* z (- t a))))
(t_2 (/ t_1 (+ y (* z (- b y)))))
(t_3 (/ (- t a) (- b y))))
(if (<= t_2 (- INFINITY))
t_3
(if (or (<= t_2 -2e-270) (and (not (<= t_2 0.0)) (<= t_2 4e+293)))
(/ t_1 (- (* z b) (* y (+ z -1.0))))
(+
(+ (/ x (/ (- b y) (/ y z))) t_3)
(* (/ y z) (/ (- a t) (pow (- b y) 2.0))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * y) + (z * (t - a));
double t_2 = t_1 / (y + (z * (b - y)));
double t_3 = (t - a) / (b - y);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if ((t_2 <= -2e-270) || (!(t_2 <= 0.0) && (t_2 <= 4e+293))) {
tmp = t_1 / ((z * b) - (y * (z + -1.0)));
} else {
tmp = ((x / ((b - y) / (y / z))) + t_3) + ((y / z) * ((a - t) / pow((b - y), 2.0)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * y) + (z * (t - a));
double t_2 = t_1 / (y + (z * (b - y)));
double t_3 = (t - a) / (b - y);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if ((t_2 <= -2e-270) || (!(t_2 <= 0.0) && (t_2 <= 4e+293))) {
tmp = t_1 / ((z * b) - (y * (z + -1.0)));
} else {
tmp = ((x / ((b - y) / (y / z))) + t_3) + ((y / z) * ((a - t) / Math.pow((b - y), 2.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * y) + (z * (t - a)) t_2 = t_1 / (y + (z * (b - y))) t_3 = (t - a) / (b - y) tmp = 0 if t_2 <= -math.inf: tmp = t_3 elif (t_2 <= -2e-270) or (not (t_2 <= 0.0) and (t_2 <= 4e+293)): tmp = t_1 / ((z * b) - (y * (z + -1.0))) else: tmp = ((x / ((b - y) / (y / z))) + t_3) + ((y / z) * ((a - t) / math.pow((b - y), 2.0))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * y) + Float64(z * Float64(t - a))) t_2 = Float64(t_1 / Float64(y + Float64(z * Float64(b - y)))) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif ((t_2 <= -2e-270) || (!(t_2 <= 0.0) && (t_2 <= 4e+293))) tmp = Float64(t_1 / Float64(Float64(z * b) - Float64(y * Float64(z + -1.0)))); else tmp = Float64(Float64(Float64(x / Float64(Float64(b - y) / Float64(y / z))) + t_3) + Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * y) + (z * (t - a)); t_2 = t_1 / (y + (z * (b - y))); t_3 = (t - a) / (b - y); tmp = 0.0; if (t_2 <= -Inf) tmp = t_3; elseif ((t_2 <= -2e-270) || (~((t_2 <= 0.0)) && (t_2 <= 4e+293))) tmp = t_1 / ((z * b) - (y * (z + -1.0))); else tmp = ((x / ((b - y) / (y / z))) + t_3) + ((y / z) * ((a - t) / ((b - y) ^ 2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[Or[LessEqual[t$95$2, -2e-270], And[N[Not[LessEqual[t$95$2, 0.0]], $MachinePrecision], LessEqual[t$95$2, 4e+293]]], N[(t$95$1 / N[(N[(z * b), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / N[(N[(b - y), $MachinePrecision] / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot \left(t - a\right)\\
t_2 := \frac{t_1}{y + z \cdot \left(b - y\right)}\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-270} \lor \neg \left(t_2 \leq 0\right) \land t_2 \leq 4 \cdot 10^{+293}:\\
\;\;\;\;\frac{t_1}{z \cdot b - y \cdot \left(z + -1\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{x}{\frac{b - y}{\frac{y}{z}}} + t_3\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 37.5%
Taylor expanded in z around inf 60.0%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.0000000000000001e-270 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 3.9999999999999997e293Initial program 99.6%
Taylor expanded in y around -inf 99.6%
+-commutative99.6%
mul-1-neg99.6%
unsub-neg99.6%
*-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
if -2.0000000000000001e-270 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 3.9999999999999997e293 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 11.3%
Taylor expanded in z around inf 43.2%
associate--r+43.2%
+-commutative43.2%
associate--l+43.2%
associate-/l*44.5%
*-commutative44.5%
associate-/l*52.0%
div-sub52.0%
times-frac84.5%
Simplified84.5%
Final simplification90.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a))) (t_2 (+ (* x y) t_1)) (t_3 (/ (- t a) (- b y))))
(if (<= z -1.05e+20)
t_3
(if (<= z 1.4e-287)
(/ t_2 (+ y (* z (- b y))))
(if (<= z 3.1e-219)
(+ x (/ t_1 y))
(if (<= z 1.75e+74) (/ t_2 (- (* z b) (* y (+ z -1.0)))) t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (x * y) + t_1;
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -1.05e+20) {
tmp = t_3;
} else if (z <= 1.4e-287) {
tmp = t_2 / (y + (z * (b - y)));
} else if (z <= 3.1e-219) {
tmp = x + (t_1 / y);
} else if (z <= 1.75e+74) {
tmp = t_2 / ((z * b) - (y * (z + -1.0)));
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z * (t - a)
t_2 = (x * y) + t_1
t_3 = (t - a) / (b - y)
if (z <= (-1.05d+20)) then
tmp = t_3
else if (z <= 1.4d-287) then
tmp = t_2 / (y + (z * (b - y)))
else if (z <= 3.1d-219) then
tmp = x + (t_1 / y)
else if (z <= 1.75d+74) then
tmp = t_2 / ((z * b) - (y * (z + (-1.0d0))))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (x * y) + t_1;
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -1.05e+20) {
tmp = t_3;
} else if (z <= 1.4e-287) {
tmp = t_2 / (y + (z * (b - y)));
} else if (z <= 3.1e-219) {
tmp = x + (t_1 / y);
} else if (z <= 1.75e+74) {
tmp = t_2 / ((z * b) - (y * (z + -1.0)));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = (x * y) + t_1 t_3 = (t - a) / (b - y) tmp = 0 if z <= -1.05e+20: tmp = t_3 elif z <= 1.4e-287: tmp = t_2 / (y + (z * (b - y))) elif z <= 3.1e-219: tmp = x + (t_1 / y) elif z <= 1.75e+74: tmp = t_2 / ((z * b) - (y * (z + -1.0))) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(x * y) + t_1) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.05e+20) tmp = t_3; elseif (z <= 1.4e-287) tmp = Float64(t_2 / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 3.1e-219) tmp = Float64(x + Float64(t_1 / y)); elseif (z <= 1.75e+74) tmp = Float64(t_2 / Float64(Float64(z * b) - Float64(y * Float64(z + -1.0)))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = (x * y) + t_1; t_3 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.05e+20) tmp = t_3; elseif (z <= 1.4e-287) tmp = t_2 / (y + (z * (b - y))); elseif (z <= 3.1e-219) tmp = x + (t_1 / y); elseif (z <= 1.75e+74) tmp = t_2 / ((z * b) - (y * (z + -1.0))); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e+20], t$95$3, If[LessEqual[z, 1.4e-287], N[(t$95$2 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e-219], N[(x + N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e+74], N[(t$95$2 / N[(N[(z * b), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := x \cdot y + t_1\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+20}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-287}:\\
\;\;\;\;\frac{t_2}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-219}:\\
\;\;\;\;x + \frac{t_1}{y}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+74}:\\
\;\;\;\;\frac{t_2}{z \cdot b - y \cdot \left(z + -1\right)}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -1.05e20 or 1.75000000000000007e74 < z Initial program 29.2%
Taylor expanded in z around inf 83.8%
if -1.05e20 < z < 1.4000000000000001e-287Initial program 91.5%
if 1.4000000000000001e-287 < z < 3.0999999999999997e-219Initial program 75.3%
Taylor expanded in z around 0 75.3%
Taylor expanded in x around 0 99.9%
if 3.0999999999999997e-219 < z < 1.75000000000000007e74Initial program 85.3%
Taylor expanded in y around -inf 85.4%
+-commutative85.4%
mul-1-neg85.4%
unsub-neg85.4%
*-commutative85.4%
sub-neg85.4%
metadata-eval85.4%
Simplified85.4%
Final simplification87.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a))) (t_2 (/ (- t a) (- b y))))
(if (<= z -9.5e+40)
t_2
(if (<= z 2.8e-286)
(/ (+ (* x y) (- (* z t) (* z a))) (+ y (* z (- b y))))
(if (<= z 1.6e-219)
(+ x (/ t_1 y))
(if (<= z 2.95e+74)
(/ (+ (* x y) t_1) (- (* z b) (* y (+ z -1.0))))
t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -9.5e+40) {
tmp = t_2;
} else if (z <= 2.8e-286) {
tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)));
} else if (z <= 1.6e-219) {
tmp = x + (t_1 / y);
} else if (z <= 2.95e+74) {
tmp = ((x * y) + t_1) / ((z * b) - (y * (z + -1.0)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * (t - a)
t_2 = (t - a) / (b - y)
if (z <= (-9.5d+40)) then
tmp = t_2
else if (z <= 2.8d-286) then
tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)))
else if (z <= 1.6d-219) then
tmp = x + (t_1 / y)
else if (z <= 2.95d+74) then
tmp = ((x * y) + t_1) / ((z * b) - (y * (z + (-1.0d0))))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -9.5e+40) {
tmp = t_2;
} else if (z <= 2.8e-286) {
tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)));
} else if (z <= 1.6e-219) {
tmp = x + (t_1 / y);
} else if (z <= 2.95e+74) {
tmp = ((x * y) + t_1) / ((z * b) - (y * (z + -1.0)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = (t - a) / (b - y) tmp = 0 if z <= -9.5e+40: tmp = t_2 elif z <= 2.8e-286: tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y))) elif z <= 1.6e-219: tmp = x + (t_1 / y) elif z <= 2.95e+74: tmp = ((x * y) + t_1) / ((z * b) - (y * (z + -1.0))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -9.5e+40) tmp = t_2; elseif (z <= 2.8e-286) tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 1.6e-219) tmp = Float64(x + Float64(t_1 / y)); elseif (z <= 2.95e+74) tmp = Float64(Float64(Float64(x * y) + t_1) / Float64(Float64(z * b) - Float64(y * Float64(z + -1.0)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -9.5e+40) tmp = t_2; elseif (z <= 2.8e-286) tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y))); elseif (z <= 1.6e-219) tmp = x + (t_1 / y); elseif (z <= 2.95e+74) tmp = ((x * y) + t_1) / ((z * b) - (y * (z + -1.0))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.5e+40], t$95$2, If[LessEqual[z, 2.8e-286], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-219], N[(x + N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.95e+74], N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / N[(N[(z * b), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{+40}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-286}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-219}:\\
\;\;\;\;x + \frac{t_1}{y}\\
\mathbf{elif}\;z \leq 2.95 \cdot 10^{+74}:\\
\;\;\;\;\frac{x \cdot y + t_1}{z \cdot b - y \cdot \left(z + -1\right)}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -9.5000000000000003e40 or 2.9500000000000001e74 < z Initial program 27.2%
Taylor expanded in z around inf 83.3%
if -9.5000000000000003e40 < z < 2.8e-286Initial program 91.8%
sub-neg91.8%
distribute-lft-in91.8%
Applied egg-rr91.8%
if 2.8e-286 < z < 1.59999999999999999e-219Initial program 75.3%
Taylor expanded in z around 0 75.3%
Taylor expanded in x around 0 99.9%
if 1.59999999999999999e-219 < z < 2.9500000000000001e74Initial program 85.3%
Taylor expanded in y around -inf 85.4%
+-commutative85.4%
mul-1-neg85.4%
unsub-neg85.4%
*-commutative85.4%
sub-neg85.4%
metadata-eval85.4%
Simplified85.4%
Final simplification87.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (- t a) (- b y)))
(t_3 (* z (- t a))))
(if (<= z -5.6e+19)
t_2
(if (<= z 1.8e-288)
(+ (/ (* x y) t_1) (/ t_3 t_1))
(if (<= z 1.2e-220)
(+ x (/ t_3 y))
(if (<= z 9.5e+74)
(/ (+ (* x y) t_3) (- (* z b) (* y (+ z -1.0))))
t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double t_3 = z * (t - a);
double tmp;
if (z <= -5.6e+19) {
tmp = t_2;
} else if (z <= 1.8e-288) {
tmp = ((x * y) / t_1) + (t_3 / t_1);
} else if (z <= 1.2e-220) {
tmp = x + (t_3 / y);
} else if (z <= 9.5e+74) {
tmp = ((x * y) + t_3) / ((z * b) - (y * (z + -1.0)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = (t - a) / (b - y)
t_3 = z * (t - a)
if (z <= (-5.6d+19)) then
tmp = t_2
else if (z <= 1.8d-288) then
tmp = ((x * y) / t_1) + (t_3 / t_1)
else if (z <= 1.2d-220) then
tmp = x + (t_3 / y)
else if (z <= 9.5d+74) then
tmp = ((x * y) + t_3) / ((z * b) - (y * (z + (-1.0d0))))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double t_3 = z * (t - a);
double tmp;
if (z <= -5.6e+19) {
tmp = t_2;
} else if (z <= 1.8e-288) {
tmp = ((x * y) / t_1) + (t_3 / t_1);
} else if (z <= 1.2e-220) {
tmp = x + (t_3 / y);
} else if (z <= 9.5e+74) {
tmp = ((x * y) + t_3) / ((z * b) - (y * (z + -1.0)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (t - a) / (b - y) t_3 = z * (t - a) tmp = 0 if z <= -5.6e+19: tmp = t_2 elif z <= 1.8e-288: tmp = ((x * y) / t_1) + (t_3 / t_1) elif z <= 1.2e-220: tmp = x + (t_3 / y) elif z <= 9.5e+74: tmp = ((x * y) + t_3) / ((z * b) - (y * (z + -1.0))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = Float64(z * Float64(t - a)) tmp = 0.0 if (z <= -5.6e+19) tmp = t_2; elseif (z <= 1.8e-288) tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_3 / t_1)); elseif (z <= 1.2e-220) tmp = Float64(x + Float64(t_3 / y)); elseif (z <= 9.5e+74) tmp = Float64(Float64(Float64(x * y) + t_3) / Float64(Float64(z * b) - Float64(y * Float64(z + -1.0)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (t - a) / (b - y); t_3 = z * (t - a); tmp = 0.0; if (z <= -5.6e+19) tmp = t_2; elseif (z <= 1.8e-288) tmp = ((x * y) / t_1) + (t_3 / t_1); elseif (z <= 1.2e-220) tmp = x + (t_3 / y); elseif (z <= 9.5e+74) tmp = ((x * y) + t_3) / ((z * b) - (y * (z + -1.0))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e+19], t$95$2, If[LessEqual[z, 1.8e-288], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e-220], N[(x + N[(t$95$3 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+74], N[(N[(N[(x * y), $MachinePrecision] + t$95$3), $MachinePrecision] / N[(N[(z * b), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y}\\
t_3 := z \cdot \left(t - a\right)\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{+19}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-288}:\\
\;\;\;\;\frac{x \cdot y}{t_1} + \frac{t_3}{t_1}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-220}:\\
\;\;\;\;x + \frac{t_3}{y}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+74}:\\
\;\;\;\;\frac{x \cdot y + t_3}{z \cdot b - y \cdot \left(z + -1\right)}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -5.6e19 or 9.5000000000000006e74 < z Initial program 29.2%
Taylor expanded in z around inf 83.8%
if -5.6e19 < z < 1.8000000000000001e-288Initial program 91.5%
Taylor expanded in x around 0 91.5%
if 1.8000000000000001e-288 < z < 1.2000000000000001e-220Initial program 75.3%
Taylor expanded in z around 0 75.3%
Taylor expanded in x around 0 99.9%
if 1.2000000000000001e-220 < z < 9.5000000000000006e74Initial program 85.3%
Taylor expanded in y around -inf 85.4%
+-commutative85.4%
mul-1-neg85.4%
unsub-neg85.4%
*-commutative85.4%
sub-neg85.4%
metadata-eval85.4%
Simplified85.4%
Final simplification87.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (/ (+ (* x y) t_1) (+ y (* z (- b y)))))
(t_3 (/ (- t a) (- b y))))
(if (<= z -5.6e+19)
t_3
(if (<= z 6.2e-285)
t_2
(if (<= z 3.4e-220) (+ x (/ t_1 y)) (if (<= z 2.12e+74) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = ((x * y) + t_1) / (y + (z * (b - y)));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -5.6e+19) {
tmp = t_3;
} else if (z <= 6.2e-285) {
tmp = t_2;
} else if (z <= 3.4e-220) {
tmp = x + (t_1 / y);
} else if (z <= 2.12e+74) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z * (t - a)
t_2 = ((x * y) + t_1) / (y + (z * (b - y)))
t_3 = (t - a) / (b - y)
if (z <= (-5.6d+19)) then
tmp = t_3
else if (z <= 6.2d-285) then
tmp = t_2
else if (z <= 3.4d-220) then
tmp = x + (t_1 / y)
else if (z <= 2.12d+74) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = ((x * y) + t_1) / (y + (z * (b - y)));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -5.6e+19) {
tmp = t_3;
} else if (z <= 6.2e-285) {
tmp = t_2;
} else if (z <= 3.4e-220) {
tmp = x + (t_1 / y);
} else if (z <= 2.12e+74) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = ((x * y) + t_1) / (y + (z * (b - y))) t_3 = (t - a) / (b - y) tmp = 0 if z <= -5.6e+19: tmp = t_3 elif z <= 6.2e-285: tmp = t_2 elif z <= 3.4e-220: tmp = x + (t_1 / y) elif z <= 2.12e+74: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(Float64(x * y) + t_1) / Float64(y + Float64(z * Float64(b - y)))) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -5.6e+19) tmp = t_3; elseif (z <= 6.2e-285) tmp = t_2; elseif (z <= 3.4e-220) tmp = Float64(x + Float64(t_1 / y)); elseif (z <= 2.12e+74) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = ((x * y) + t_1) / (y + (z * (b - y))); t_3 = (t - a) / (b - y); tmp = 0.0; if (z <= -5.6e+19) tmp = t_3; elseif (z <= 6.2e-285) tmp = t_2; elseif (z <= 3.4e-220) tmp = x + (t_1 / y); elseif (z <= 2.12e+74) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e+19], t$95$3, If[LessEqual[z, 6.2e-285], t$95$2, If[LessEqual[z, 3.4e-220], N[(x + N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.12e+74], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{x \cdot y + t_1}{y + z \cdot \left(b - y\right)}\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{+19}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-285}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-220}:\\
\;\;\;\;x + \frac{t_1}{y}\\
\mathbf{elif}\;z \leq 2.12 \cdot 10^{+74}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -5.6e19 or 2.11999999999999998e74 < z Initial program 29.2%
Taylor expanded in z around inf 83.8%
if -5.6e19 < z < 6.2000000000000002e-285 or 3.39999999999999993e-220 < z < 2.11999999999999998e74Initial program 88.6%
if 6.2000000000000002e-285 < z < 3.39999999999999993e-220Initial program 75.3%
Taylor expanded in z around 0 75.3%
Taylor expanded in x around 0 99.9%
Final simplification87.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (* x y) (* z a)) (+ y (* z (- b y)))))
(t_2 (/ (- t a) (- b y))))
(if (<= z -2.7e+18)
t_2
(if (<= z -9e-145)
t_1
(if (<= z 8.5e-136)
(+ x (/ (* z (- t a)) y))
(if (<= z 1.1e+74) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) - (z * a)) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -2.7e+18) {
tmp = t_2;
} else if (z <= -9e-145) {
tmp = t_1;
} else if (z <= 8.5e-136) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 1.1e+74) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * y) - (z * a)) / (y + (z * (b - y)))
t_2 = (t - a) / (b - y)
if (z <= (-2.7d+18)) then
tmp = t_2
else if (z <= (-9d-145)) then
tmp = t_1
else if (z <= 8.5d-136) then
tmp = x + ((z * (t - a)) / y)
else if (z <= 1.1d+74) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) - (z * a)) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -2.7e+18) {
tmp = t_2;
} else if (z <= -9e-145) {
tmp = t_1;
} else if (z <= 8.5e-136) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 1.1e+74) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) - (z * a)) / (y + (z * (b - y))) t_2 = (t - a) / (b - y) tmp = 0 if z <= -2.7e+18: tmp = t_2 elif z <= -9e-145: tmp = t_1 elif z <= 8.5e-136: tmp = x + ((z * (t - a)) / y) elif z <= 1.1e+74: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * y) - Float64(z * a)) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.7e+18) tmp = t_2; elseif (z <= -9e-145) tmp = t_1; elseif (z <= 8.5e-136) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= 1.1e+74) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x * y) - (z * a)) / (y + (z * (b - y))); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.7e+18) tmp = t_2; elseif (z <= -9e-145) tmp = t_1; elseif (z <= 8.5e-136) tmp = x + ((z * (t - a)) / y); elseif (z <= 1.1e+74) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+18], t$95$2, If[LessEqual[z, -9e-145], t$95$1, If[LessEqual[z, 8.5e-136], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+74], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y - z \cdot a}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+18}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-145}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-136}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+74}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.7e18 or 1.1000000000000001e74 < z Initial program 29.2%
Taylor expanded in z around inf 83.8%
if -2.7e18 < z < -9.0000000000000001e-145 or 8.49999999999999973e-136 < z < 1.1000000000000001e74Initial program 88.1%
Taylor expanded in t around 0 72.6%
+-commutative72.6%
mul-1-neg72.6%
unsub-neg72.6%
*-commutative72.6%
*-commutative72.6%
Simplified72.6%
if -9.0000000000000001e-145 < z < 8.49999999999999973e-136Initial program 85.3%
Taylor expanded in z around 0 72.9%
Taylor expanded in x around 0 87.4%
Final simplification81.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.5e-81) (not (<= z 1.48e-6))) (/ (- t a) (- b y)) (+ x (/ (* z (- t a)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.5e-81) || !(z <= 1.48e-6)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((z <= (-4.5d-81)) .or. (.not. (z <= 1.48d-6))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((z * (t - a)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.5e-81) || !(z <= 1.48e-6)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.5e-81) or not (z <= 1.48e-6): tmp = (t - a) / (b - y) else: tmp = x + ((z * (t - a)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.5e-81) || !(z <= 1.48e-6)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.5e-81) || ~((z <= 1.48e-6))) tmp = (t - a) / (b - y); else tmp = x + ((z * (t - a)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.5e-81], N[Not[LessEqual[z, 1.48e-6]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-81} \lor \neg \left(z \leq 1.48 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -4.5e-81 or 1.48000000000000002e-6 < z Initial program 46.5%
Taylor expanded in z around inf 74.1%
if -4.5e-81 < z < 1.48000000000000002e-6Initial program 84.8%
Taylor expanded in z around 0 64.1%
Taylor expanded in x around 0 77.4%
Final simplification75.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.2e-65) (not (<= z 4.4e-7))) (/ (- t a) (- b y)) (+ x (* z (/ t y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.2e-65) || !(z <= 4.4e-7)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * (t / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.2d-65)) .or. (.not. (z <= 4.4d-7))) then
tmp = (t - a) / (b - y)
else
tmp = x + (z * (t / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.2e-65) || !(z <= 4.4e-7)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * (t / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.2e-65) or not (z <= 4.4e-7): tmp = (t - a) / (b - y) else: tmp = x + (z * (t / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.2e-65) || !(z <= 4.4e-7)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(z * Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.2e-65) || ~((z <= 4.4e-7))) tmp = (t - a) / (b - y); else tmp = x + (z * (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.2e-65], N[Not[LessEqual[z, 4.4e-7]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-65} \lor \neg \left(z \leq 4.4 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\end{array}
\end{array}
if z < -1.2000000000000001e-65 or 4.4000000000000002e-7 < z Initial program 45.0%
Taylor expanded in z around inf 74.7%
if -1.2000000000000001e-65 < z < 4.4000000000000002e-7Initial program 85.3%
Taylor expanded in z around 0 53.0%
Taylor expanded in t around inf 63.3%
Final simplification69.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.05e+52) (not (<= y 3e-13))) (/ x (- 1.0 z)) (/ (- a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.05e+52) || !(y <= 3e-13)) {
tmp = x / (1.0 - z);
} else {
tmp = -a / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.05d+52)) .or. (.not. (y <= 3d-13))) then
tmp = x / (1.0d0 - z)
else
tmp = -a / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.05e+52) || !(y <= 3e-13)) {
tmp = x / (1.0 - z);
} else {
tmp = -a / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.05e+52) or not (y <= 3e-13): tmp = x / (1.0 - z) else: tmp = -a / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.05e+52) || !(y <= 3e-13)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(-a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.05e+52) || ~((y <= 3e-13))) tmp = x / (1.0 - z); else tmp = -a / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.05e+52], N[Not[LessEqual[y, 3e-13]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[((-a) / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+52} \lor \neg \left(y \leq 3 \cdot 10^{-13}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{-a}{b}\\
\end{array}
\end{array}
if y < -1.05e52 or 2.99999999999999984e-13 < y Initial program 46.0%
Taylor expanded in y around inf 53.4%
mul-1-neg53.4%
unsub-neg53.4%
Simplified53.4%
if -1.05e52 < y < 2.99999999999999984e-13Initial program 78.7%
Taylor expanded in a around inf 37.2%
mul-1-neg37.2%
distribute-lft-neg-out37.2%
*-commutative37.2%
Simplified37.2%
Taylor expanded in y around 0 31.1%
associate-*r/31.1%
neg-mul-131.1%
Simplified31.1%
Final simplification42.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.9e+56) (not (<= y 1.15e-12))) (/ x (- 1.0 z)) (/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.9e+56) || !(y <= 1.15e-12)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.9d+56)) .or. (.not. (y <= 1.15d-12))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.9e+56) || !(y <= 1.15e-12)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.9e+56) or not (y <= 1.15e-12): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.9e+56) || !(y <= 1.15e-12)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.9e+56) || ~((y <= 1.15e-12))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.9e+56], N[Not[LessEqual[y, 1.15e-12]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+56} \lor \neg \left(y \leq 1.15 \cdot 10^{-12}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -2.90000000000000007e56 or 1.14999999999999995e-12 < y Initial program 46.0%
Taylor expanded in y around inf 53.4%
mul-1-neg53.4%
unsub-neg53.4%
Simplified53.4%
if -2.90000000000000007e56 < y < 1.14999999999999995e-12Initial program 78.7%
Taylor expanded in y around 0 50.2%
Final simplification51.8%
(FPCore (x y z t a b) :precision binary64 (if (<= z -4e-81) (/ (- a) b) (if (<= z 1.0) (+ x (* z x)) (/ (- x) z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4e-81) {
tmp = -a / b;
} else if (z <= 1.0) {
tmp = x + (z * x);
} else {
tmp = -x / z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (z <= (-4d-81)) then
tmp = -a / b
else if (z <= 1.0d0) then
tmp = x + (z * x)
else
tmp = -x / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4e-81) {
tmp = -a / b;
} else if (z <= 1.0) {
tmp = x + (z * x);
} else {
tmp = -x / z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -4e-81: tmp = -a / b elif z <= 1.0: tmp = x + (z * x) else: tmp = -x / z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4e-81) tmp = Float64(Float64(-a) / b); elseif (z <= 1.0) tmp = Float64(x + Float64(z * x)); else tmp = Float64(Float64(-x) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -4e-81) tmp = -a / b; elseif (z <= 1.0) tmp = x + (z * x); else tmp = -x / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4e-81], N[((-a) / b), $MachinePrecision], If[LessEqual[z, 1.0], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], N[((-x) / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-81}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x + z \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{z}\\
\end{array}
\end{array}
if z < -3.9999999999999998e-81Initial program 52.2%
Taylor expanded in a around inf 26.5%
mul-1-neg26.5%
distribute-lft-neg-out26.5%
*-commutative26.5%
Simplified26.5%
Taylor expanded in y around 0 26.0%
associate-*r/26.0%
neg-mul-126.0%
Simplified26.0%
if -3.9999999999999998e-81 < z < 1Initial program 84.8%
Taylor expanded in y around inf 52.6%
mul-1-neg52.6%
unsub-neg52.6%
Simplified52.6%
Taylor expanded in z around 0 52.6%
*-commutative52.6%
Simplified52.6%
if 1 < z Initial program 39.2%
Taylor expanded in y around inf 18.9%
mul-1-neg18.9%
unsub-neg18.9%
Simplified18.9%
Taylor expanded in z around inf 18.0%
associate-*r/18.0%
mul-1-neg18.0%
Simplified18.0%
Final simplification34.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.5e-81) (not (<= z 3.5e-10))) (/ (- a) b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.5e-81) || !(z <= 3.5e-10)) {
tmp = -a / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((z <= (-4.5d-81)) .or. (.not. (z <= 3.5d-10))) then
tmp = -a / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.5e-81) || !(z <= 3.5e-10)) {
tmp = -a / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.5e-81) or not (z <= 3.5e-10): tmp = -a / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.5e-81) || !(z <= 3.5e-10)) tmp = Float64(Float64(-a) / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.5e-81) || ~((z <= 3.5e-10))) tmp = -a / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.5e-81], N[Not[LessEqual[z, 3.5e-10]], $MachinePrecision]], N[((-a) / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-81} \lor \neg \left(z \leq 3.5 \cdot 10^{-10}\right):\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.5e-81 or 3.4999999999999998e-10 < z Initial program 46.5%
Taylor expanded in a around inf 22.6%
mul-1-neg22.6%
distribute-lft-neg-out22.6%
*-commutative22.6%
Simplified22.6%
Taylor expanded in y around 0 21.8%
associate-*r/21.8%
neg-mul-121.8%
Simplified21.8%
if -4.5e-81 < z < 3.4999999999999998e-10Initial program 84.8%
Taylor expanded in z around 0 52.6%
Final simplification34.6%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2e-81) (/ (- a) b) (if (<= z 1.0) x (/ (- x) z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2e-81) {
tmp = -a / b;
} else if (z <= 1.0) {
tmp = x;
} else {
tmp = -x / z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (z <= (-2d-81)) then
tmp = -a / b
else if (z <= 1.0d0) then
tmp = x
else
tmp = -x / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2e-81) {
tmp = -a / b;
} else if (z <= 1.0) {
tmp = x;
} else {
tmp = -x / z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2e-81: tmp = -a / b elif z <= 1.0: tmp = x else: tmp = -x / z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2e-81) tmp = Float64(Float64(-a) / b); elseif (z <= 1.0) tmp = x; else tmp = Float64(Float64(-x) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2e-81) tmp = -a / b; elseif (z <= 1.0) tmp = x; else tmp = -x / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2e-81], N[((-a) / b), $MachinePrecision], If[LessEqual[z, 1.0], x, N[((-x) / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-81}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{z}\\
\end{array}
\end{array}
if z < -1.9999999999999999e-81Initial program 52.2%
Taylor expanded in a around inf 26.5%
mul-1-neg26.5%
distribute-lft-neg-out26.5%
*-commutative26.5%
Simplified26.5%
Taylor expanded in y around 0 26.0%
associate-*r/26.0%
neg-mul-126.0%
Simplified26.0%
if -1.9999999999999999e-81 < z < 1Initial program 84.8%
Taylor expanded in z around 0 52.6%
if 1 < z Initial program 39.2%
Taylor expanded in y around inf 18.9%
mul-1-neg18.9%
unsub-neg18.9%
Simplified18.9%
Taylor expanded in z around inf 18.0%
associate-*r/18.0%
mul-1-neg18.0%
Simplified18.0%
Final simplification34.9%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 62.3%
Taylor expanded in z around 0 25.0%
Final simplification25.0%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2024018
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:herbie-target
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))