
(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 20 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 (+ y (* z (- b y))))
(t_2 (pow (- b y) 2.0))
(t_3 (/ (- t a) (- b y)))
(t_4 (* z (- t a))))
(if (<= z -6800000000.0)
(+ (/ (+ (* x (/ y (- b y))) (* y (/ (- a t) t_2))) z) t_3)
(if (<= z -7e-127)
(/ (+ (* x y) (* a (- (* t (/ z a)) z))) t_1)
(if (<= z 2.45e-254)
(+ x (/ t_4 t_1))
(if (<= z 2e-229)
(/ (+ (* x y) t_4) (+ y (* y (- (* b (/ z y)) z))))
(if (<= z 2.4e+36)
(* x (+ (/ y t_1) (/ t_4 (* x t_1))))
(-
(+ t_3 (* (/ y z) (/ x (- b y))))
(* y (/ (- t a) (* z 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 = pow((b - y), 2.0);
double t_3 = (t - a) / (b - y);
double t_4 = z * (t - a);
double tmp;
if (z <= -6800000000.0) {
tmp = (((x * (y / (b - y))) + (y * ((a - t) / t_2))) / z) + t_3;
} else if (z <= -7e-127) {
tmp = ((x * y) + (a * ((t * (z / a)) - z))) / t_1;
} else if (z <= 2.45e-254) {
tmp = x + (t_4 / t_1);
} else if (z <= 2e-229) {
tmp = ((x * y) + t_4) / (y + (y * ((b * (z / y)) - z)));
} else if (z <= 2.4e+36) {
tmp = x * ((y / t_1) + (t_4 / (x * t_1)));
} else {
tmp = (t_3 + ((y / z) * (x / (b - y)))) - (y * ((t - a) / (z * 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) :: t_4
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = (b - y) ** 2.0d0
t_3 = (t - a) / (b - y)
t_4 = z * (t - a)
if (z <= (-6800000000.0d0)) then
tmp = (((x * (y / (b - y))) + (y * ((a - t) / t_2))) / z) + t_3
else if (z <= (-7d-127)) then
tmp = ((x * y) + (a * ((t * (z / a)) - z))) / t_1
else if (z <= 2.45d-254) then
tmp = x + (t_4 / t_1)
else if (z <= 2d-229) then
tmp = ((x * y) + t_4) / (y + (y * ((b * (z / y)) - z)))
else if (z <= 2.4d+36) then
tmp = x * ((y / t_1) + (t_4 / (x * t_1)))
else
tmp = (t_3 + ((y / z) * (x / (b - y)))) - (y * ((t - a) / (z * 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 = Math.pow((b - y), 2.0);
double t_3 = (t - a) / (b - y);
double t_4 = z * (t - a);
double tmp;
if (z <= -6800000000.0) {
tmp = (((x * (y / (b - y))) + (y * ((a - t) / t_2))) / z) + t_3;
} else if (z <= -7e-127) {
tmp = ((x * y) + (a * ((t * (z / a)) - z))) / t_1;
} else if (z <= 2.45e-254) {
tmp = x + (t_4 / t_1);
} else if (z <= 2e-229) {
tmp = ((x * y) + t_4) / (y + (y * ((b * (z / y)) - z)));
} else if (z <= 2.4e+36) {
tmp = x * ((y / t_1) + (t_4 / (x * t_1)));
} else {
tmp = (t_3 + ((y / z) * (x / (b - y)))) - (y * ((t - a) / (z * t_2)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = math.pow((b - y), 2.0) t_3 = (t - a) / (b - y) t_4 = z * (t - a) tmp = 0 if z <= -6800000000.0: tmp = (((x * (y / (b - y))) + (y * ((a - t) / t_2))) / z) + t_3 elif z <= -7e-127: tmp = ((x * y) + (a * ((t * (z / a)) - z))) / t_1 elif z <= 2.45e-254: tmp = x + (t_4 / t_1) elif z <= 2e-229: tmp = ((x * y) + t_4) / (y + (y * ((b * (z / y)) - z))) elif z <= 2.4e+36: tmp = x * ((y / t_1) + (t_4 / (x * t_1))) else: tmp = (t_3 + ((y / z) * (x / (b - y)))) - (y * ((t - a) / (z * t_2))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(b - y) ^ 2.0 t_3 = Float64(Float64(t - a) / Float64(b - y)) t_4 = Float64(z * Float64(t - a)) tmp = 0.0 if (z <= -6800000000.0) tmp = Float64(Float64(Float64(Float64(x * Float64(y / Float64(b - y))) + Float64(y * Float64(Float64(a - t) / t_2))) / z) + t_3); elseif (z <= -7e-127) tmp = Float64(Float64(Float64(x * y) + Float64(a * Float64(Float64(t * Float64(z / a)) - z))) / t_1); elseif (z <= 2.45e-254) tmp = Float64(x + Float64(t_4 / t_1)); elseif (z <= 2e-229) tmp = Float64(Float64(Float64(x * y) + t_4) / Float64(y + Float64(y * Float64(Float64(b * Float64(z / y)) - z)))); elseif (z <= 2.4e+36) tmp = Float64(x * Float64(Float64(y / t_1) + Float64(t_4 / Float64(x * t_1)))); else tmp = Float64(Float64(t_3 + Float64(Float64(y / z) * Float64(x / Float64(b - y)))) - Float64(y * Float64(Float64(t - a) / Float64(z * t_2)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (b - y) ^ 2.0; t_3 = (t - a) / (b - y); t_4 = z * (t - a); tmp = 0.0; if (z <= -6800000000.0) tmp = (((x * (y / (b - y))) + (y * ((a - t) / t_2))) / z) + t_3; elseif (z <= -7e-127) tmp = ((x * y) + (a * ((t * (z / a)) - z))) / t_1; elseif (z <= 2.45e-254) tmp = x + (t_4 / t_1); elseif (z <= 2e-229) tmp = ((x * y) + t_4) / (y + (y * ((b * (z / y)) - z))); elseif (z <= 2.4e+36) tmp = x * ((y / t_1) + (t_4 / (x * t_1))); else tmp = (t_3 + ((y / z) * (x / (b - y)))) - (y * ((t - a) / (z * 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[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6800000000.0], N[(N[(N[(N[(x * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a - t), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + t$95$3), $MachinePrecision], If[LessEqual[z, -7e-127], N[(N[(N[(x * y), $MachinePrecision] + N[(a * N[(N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 2.45e-254], N[(x + N[(t$95$4 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e-229], N[(N[(N[(x * y), $MachinePrecision] + t$95$4), $MachinePrecision] / N[(y + N[(y * N[(N[(b * N[(z / y), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e+36], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(t$95$4 / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$3 + N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(t - a), $MachinePrecision] / N[(z * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := {\left(b - y\right)}^{2}\\
t_3 := \frac{t - a}{b - y}\\
t_4 := z \cdot \left(t - a\right)\\
\mathbf{if}\;z \leq -6800000000:\\
\;\;\;\;\frac{x \cdot \frac{y}{b - y} + y \cdot \frac{a - t}{t\_2}}{z} + t\_3\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-127}:\\
\;\;\;\;\frac{x \cdot y + a \cdot \left(t \cdot \frac{z}{a} - z\right)}{t\_1}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-254}:\\
\;\;\;\;x + \frac{t\_4}{t\_1}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-229}:\\
\;\;\;\;\frac{x \cdot y + t\_4}{y + y \cdot \left(b \cdot \frac{z}{y} - z\right)}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+36}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{t\_4}{x \cdot t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_3 + \frac{y}{z} \cdot \frac{x}{b - y}\right) - y \cdot \frac{t - a}{z \cdot t\_2}\\
\end{array}
\end{array}
if z < -6.8e9Initial program 43.5%
Taylor expanded in z around -inf 66.8%
associate--l+66.8%
mul-1-neg66.8%
distribute-lft-out--66.8%
associate-/l*69.0%
associate-/l*90.2%
div-sub90.2%
Simplified90.2%
if -6.8e9 < z < -6.99999999999999979e-127Initial program 95.2%
Taylor expanded in a around inf 95.2%
+-commutative95.2%
mul-1-neg95.2%
unsub-neg95.2%
associate-/l*95.4%
Simplified95.4%
if -6.99999999999999979e-127 < z < 2.4499999999999999e-254Initial program 88.0%
Taylor expanded in x around 0 88.0%
Taylor expanded in z around 0 99.9%
if 2.4499999999999999e-254 < z < 2.00000000000000014e-229Initial program 99.8%
Taylor expanded in y around inf 99.6%
+-commutative99.6%
mul-1-neg99.6%
unsub-neg99.6%
associate-/l*100.0%
Simplified100.0%
if 2.00000000000000014e-229 < z < 2.39999999999999992e36Initial program 84.7%
Taylor expanded in x around inf 95.9%
if 2.39999999999999992e36 < z Initial program 40.3%
Taylor expanded in z around inf 71.2%
associate--r+71.2%
+-commutative71.2%
associate--l+71.2%
*-commutative71.2%
times-frac77.7%
div-sub77.7%
associate-/l*95.3%
Simplified95.3%
Final simplification95.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (* z (- t a)))
(t_3 (/ (+ (* x y) t_2) t_1)))
(if (<= t_3 (- INFINITY))
(* x (+ (/ y t_1) (/ (- t a) (* x b))))
(if (<= t_3 -5e-291)
t_3
(if (or (<= t_3 0.0) (not (<= t_3 2e+244)))
(-
(+ (/ (- t a) (- b y)) (* (/ y z) (/ x (- b y))))
(* y (/ (- t a) (* z (pow (- b y) 2.0)))))
(+ (/ t_2 t_1) (/ (* x y) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = z * (t - a);
double t_3 = ((x * y) + t_2) / t_1;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = x * ((y / t_1) + ((t - a) / (x * b)));
} else if (t_3 <= -5e-291) {
tmp = t_3;
} else if ((t_3 <= 0.0) || !(t_3 <= 2e+244)) {
tmp = (((t - a) / (b - y)) + ((y / z) * (x / (b - y)))) - (y * ((t - a) / (z * pow((b - y), 2.0))));
} else {
tmp = (t_2 / t_1) + ((x * y) / t_1);
}
return tmp;
}
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 = z * (t - a);
double t_3 = ((x * y) + t_2) / t_1;
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = x * ((y / t_1) + ((t - a) / (x * b)));
} else if (t_3 <= -5e-291) {
tmp = t_3;
} else if ((t_3 <= 0.0) || !(t_3 <= 2e+244)) {
tmp = (((t - a) / (b - y)) + ((y / z) * (x / (b - y)))) - (y * ((t - a) / (z * Math.pow((b - y), 2.0))));
} else {
tmp = (t_2 / t_1) + ((x * y) / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = z * (t - a) t_3 = ((x * y) + t_2) / t_1 tmp = 0 if t_3 <= -math.inf: tmp = x * ((y / t_1) + ((t - a) / (x * b))) elif t_3 <= -5e-291: tmp = t_3 elif (t_3 <= 0.0) or not (t_3 <= 2e+244): tmp = (((t - a) / (b - y)) + ((y / z) * (x / (b - y)))) - (y * ((t - a) / (z * math.pow((b - y), 2.0)))) else: tmp = (t_2 / t_1) + ((x * y) / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(Float64(Float64(x * y) + t_2) / t_1) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(t - a) / Float64(x * b)))); elseif (t_3 <= -5e-291) tmp = t_3; elseif ((t_3 <= 0.0) || !(t_3 <= 2e+244)) tmp = Float64(Float64(Float64(Float64(t - a) / Float64(b - y)) + Float64(Float64(y / z) * Float64(x / Float64(b - y)))) - Float64(y * Float64(Float64(t - a) / Float64(z * (Float64(b - y) ^ 2.0))))); else tmp = Float64(Float64(t_2 / t_1) + Float64(Float64(x * y) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = z * (t - a); t_3 = ((x * y) + t_2) / t_1; tmp = 0.0; if (t_3 <= -Inf) tmp = x * ((y / t_1) + ((t - a) / (x * b))); elseif (t_3 <= -5e-291) tmp = t_3; elseif ((t_3 <= 0.0) || ~((t_3 <= 2e+244))) tmp = (((t - a) / (b - y)) + ((y / z) * (x / (b - y)))) - (y * ((t - a) / (z * ((b - y) ^ 2.0)))); else tmp = (t_2 / t_1) + ((x * y) / t_1); 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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -5e-291], t$95$3, If[Or[LessEqual[t$95$3, 0.0], N[Not[LessEqual[t$95$3, 2e+244]], $MachinePrecision]], N[(N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(t - a), $MachinePrecision] / N[(z * N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$2 / t$95$1), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := \frac{x \cdot y + t\_2}{t\_1}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{t - a}{x \cdot b}\right)\\
\mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-291}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0 \lor \neg \left(t\_3 \leq 2 \cdot 10^{+244}\right):\\
\;\;\;\;\left(\frac{t - a}{b - y} + \frac{y}{z} \cdot \frac{x}{b - y}\right) - y \cdot \frac{t - a}{z \cdot {\left(b - y\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{t\_1} + \frac{x \cdot y}{t\_1}\\
\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 36.3%
Taylor expanded in x around inf 69.0%
Taylor expanded in y around 0 77.0%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.0000000000000003e-291Initial program 99.4%
if -5.0000000000000003e-291 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 2.00000000000000015e244 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 17.2%
Taylor expanded in z around inf 49.4%
associate--r+49.4%
+-commutative49.4%
associate--l+49.4%
*-commutative49.4%
times-frac59.8%
div-sub59.8%
associate-/l*88.4%
Simplified88.4%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000015e244Initial program 99.4%
Taylor expanded in x around 0 99.4%
Final simplification93.5%
(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)))
(t_4 (/ (+ (* x y) t_3) t_1)))
(if (<= t_4 (- INFINITY))
(* x (+ (/ y t_1) (/ (- t a) (* x b))))
(if (<= t_4 -5e-291)
t_4
(if (<= t_4 0.0)
t_2
(if (<= t_4 2e+244)
(+ (/ t_3 t_1) (/ (* x y) t_1))
(- (- t_2 (/ x z)) (* y (/ (- t a) (* z (pow (- b y) 2.0)))))))))))
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 t_4 = ((x * y) + t_3) / t_1;
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = x * ((y / t_1) + ((t - a) / (x * b)));
} else if (t_4 <= -5e-291) {
tmp = t_4;
} else if (t_4 <= 0.0) {
tmp = t_2;
} else if (t_4 <= 2e+244) {
tmp = (t_3 / t_1) + ((x * y) / t_1);
} else {
tmp = (t_2 - (x / z)) - (y * ((t - a) / (z * 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 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = x * ((y / t_1) + ((t - a) / (x * b)));
} else if (t_4 <= -5e-291) {
tmp = t_4;
} else if (t_4 <= 0.0) {
tmp = t_2;
} else if (t_4 <= 2e+244) {
tmp = (t_3 / t_1) + ((x * y) / t_1);
} else {
tmp = (t_2 - (x / z)) - (y * ((t - a) / (z * Math.pow((b - y), 2.0))));
}
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) t_4 = ((x * y) + t_3) / t_1 tmp = 0 if t_4 <= -math.inf: tmp = x * ((y / t_1) + ((t - a) / (x * b))) elif t_4 <= -5e-291: tmp = t_4 elif t_4 <= 0.0: tmp = t_2 elif t_4 <= 2e+244: tmp = (t_3 / t_1) + ((x * y) / t_1) else: tmp = (t_2 - (x / z)) - (y * ((t - a) / (z * math.pow((b - y), 2.0)))) 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)) t_4 = Float64(Float64(Float64(x * y) + t_3) / t_1) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(t - a) / Float64(x * b)))); elseif (t_4 <= -5e-291) tmp = t_4; elseif (t_4 <= 0.0) tmp = t_2; elseif (t_4 <= 2e+244) tmp = Float64(Float64(t_3 / t_1) + Float64(Float64(x * y) / t_1)); else tmp = Float64(Float64(t_2 - Float64(x / z)) - Float64(y * Float64(Float64(t - a) / Float64(z * (Float64(b - y) ^ 2.0))))); 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); t_4 = ((x * y) + t_3) / t_1; tmp = 0.0; if (t_4 <= -Inf) tmp = x * ((y / t_1) + ((t - a) / (x * b))); elseif (t_4 <= -5e-291) tmp = t_4; elseif (t_4 <= 0.0) tmp = t_2; elseif (t_4 <= 2e+244) tmp = (t_3 / t_1) + ((x * y) / t_1); else tmp = (t_2 - (x / z)) - (y * ((t - a) / (z * ((b - y) ^ 2.0)))); 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]}, Block[{t$95$4 = N[(N[(N[(x * y), $MachinePrecision] + t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, -5e-291], t$95$4, If[LessEqual[t$95$4, 0.0], t$95$2, If[LessEqual[t$95$4, 2e+244], N[(N[(t$95$3 / t$95$1), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$2 - N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(t - a), $MachinePrecision] / N[(z * N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\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)\\
t_4 := \frac{x \cdot y + t\_3}{t\_1}\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{t - a}{x \cdot b}\right)\\
\mathbf{elif}\;t\_4 \leq -5 \cdot 10^{-291}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+244}:\\
\;\;\;\;\frac{t\_3}{t\_1} + \frac{x \cdot y}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\left(t\_2 - \frac{x}{z}\right) - y \cdot \frac{t - a}{z \cdot {\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 36.3%
Taylor expanded in x around inf 69.0%
Taylor expanded in y around 0 77.0%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.0000000000000003e-291Initial program 99.4%
if -5.0000000000000003e-291 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 21.3%
Taylor expanded in z around inf 86.7%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000015e244Initial program 99.4%
Taylor expanded in x around 0 99.4%
if 2.00000000000000015e244 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 15.6%
Taylor expanded in z around inf 39.9%
associate--r+39.9%
+-commutative39.9%
associate--l+39.9%
*-commutative39.9%
times-frac49.8%
div-sub49.8%
associate-/l*84.6%
Simplified84.6%
Taylor expanded in y around inf 77.1%
associate-*r/77.1%
mul-1-neg77.1%
Simplified77.1%
Final simplification90.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (* z (- t a)))
(t_3 (/ (+ (* x y) t_2) t_1)))
(if (<= t_3 (- INFINITY))
(* x (+ (/ y t_1) (/ (- t a) (* x b))))
(if (<= t_3 -5e-291)
t_3
(if (or (<= t_3 0.0) (not (<= t_3 2e+244)))
(/ (- t a) (- b y))
(+ (/ t_2 t_1) (/ (* x y) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = z * (t - a);
double t_3 = ((x * y) + t_2) / t_1;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = x * ((y / t_1) + ((t - a) / (x * b)));
} else if (t_3 <= -5e-291) {
tmp = t_3;
} else if ((t_3 <= 0.0) || !(t_3 <= 2e+244)) {
tmp = (t - a) / (b - y);
} else {
tmp = (t_2 / t_1) + ((x * y) / t_1);
}
return tmp;
}
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 = z * (t - a);
double t_3 = ((x * y) + t_2) / t_1;
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = x * ((y / t_1) + ((t - a) / (x * b)));
} else if (t_3 <= -5e-291) {
tmp = t_3;
} else if ((t_3 <= 0.0) || !(t_3 <= 2e+244)) {
tmp = (t - a) / (b - y);
} else {
tmp = (t_2 / t_1) + ((x * y) / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = z * (t - a) t_3 = ((x * y) + t_2) / t_1 tmp = 0 if t_3 <= -math.inf: tmp = x * ((y / t_1) + ((t - a) / (x * b))) elif t_3 <= -5e-291: tmp = t_3 elif (t_3 <= 0.0) or not (t_3 <= 2e+244): tmp = (t - a) / (b - y) else: tmp = (t_2 / t_1) + ((x * y) / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(Float64(Float64(x * y) + t_2) / t_1) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(t - a) / Float64(x * b)))); elseif (t_3 <= -5e-291) tmp = t_3; elseif ((t_3 <= 0.0) || !(t_3 <= 2e+244)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(t_2 / t_1) + Float64(Float64(x * y) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = z * (t - a); t_3 = ((x * y) + t_2) / t_1; tmp = 0.0; if (t_3 <= -Inf) tmp = x * ((y / t_1) + ((t - a) / (x * b))); elseif (t_3 <= -5e-291) tmp = t_3; elseif ((t_3 <= 0.0) || ~((t_3 <= 2e+244))) tmp = (t - a) / (b - y); else tmp = (t_2 / t_1) + ((x * y) / t_1); 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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -5e-291], t$95$3, If[Or[LessEqual[t$95$3, 0.0], N[Not[LessEqual[t$95$3, 2e+244]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$2 / t$95$1), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := \frac{x \cdot y + t\_2}{t\_1}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{t - a}{x \cdot b}\right)\\
\mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-291}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0 \lor \neg \left(t\_3 \leq 2 \cdot 10^{+244}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{t\_1} + \frac{x \cdot y}{t\_1}\\
\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 36.3%
Taylor expanded in x around inf 69.0%
Taylor expanded in y around 0 77.0%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.0000000000000003e-291Initial program 99.4%
if -5.0000000000000003e-291 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 2.00000000000000015e244 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 17.2%
Taylor expanded in z around inf 78.5%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000015e244Initial program 99.4%
Taylor expanded in x around 0 99.4%
Final simplification90.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))) (t_2 (/ (+ (* x y) (* z (- t a))) t_1)))
(if (<= t_2 (- INFINITY))
(* x (+ (/ y t_1) (/ (- t a) (* x b))))
(if (or (<= t_2 -5e-291) (and (not (<= t_2 0.0)) (<= t_2 2e+244)))
t_2
(/ (- t a) (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((x * y) + (z * (t - a))) / t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = x * ((y / t_1) + ((t - a) / (x * b)));
} else if ((t_2 <= -5e-291) || (!(t_2 <= 0.0) && (t_2 <= 2e+244))) {
tmp = t_2;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
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 = ((x * y) + (z * (t - a))) / t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = x * ((y / t_1) + ((t - a) / (x * b)));
} else if ((t_2 <= -5e-291) || (!(t_2 <= 0.0) && (t_2 <= 2e+244))) {
tmp = t_2;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = ((x * y) + (z * (t - a))) / t_1 tmp = 0 if t_2 <= -math.inf: tmp = x * ((y / t_1) + ((t - a) / (x * b))) elif (t_2 <= -5e-291) or (not (t_2 <= 0.0) and (t_2 <= 2e+244)): tmp = t_2 else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(t - a) / Float64(x * b)))); elseif ((t_2 <= -5e-291) || (!(t_2 <= 0.0) && (t_2 <= 2e+244))) tmp = t_2; else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = ((x * y) + (z * (t - a))) / t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = x * ((y / t_1) + ((t - a) / (x * b))); elseif ((t_2 <= -5e-291) || (~((t_2 <= 0.0)) && (t_2 <= 2e+244))) tmp = t_2; else tmp = (t - a) / (b - y); 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[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$2, -5e-291], And[N[Not[LessEqual[t$95$2, 0.0]], $MachinePrecision], LessEqual[t$95$2, 2e+244]]], t$95$2, N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t\_1}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{t - a}{x \cdot b}\right)\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-291} \lor \neg \left(t\_2 \leq 0\right) \land t\_2 \leq 2 \cdot 10^{+244}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\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 36.3%
Taylor expanded in x around inf 69.0%
Taylor expanded in y around 0 77.0%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.0000000000000003e-291 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000015e244Initial program 99.4%
if -5.0000000000000003e-291 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 2.00000000000000015e244 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 17.2%
Taylor expanded in z around inf 78.5%
Final simplification90.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ y (* z (- b y))))
(t_3 (/ (+ (* x y) t_1) t_2))
(t_4 (/ (- t a) (- b y))))
(if (<= z -1.2e+15)
t_4
(if (<= z -1.3e-120)
t_3
(if (<= z 2.45e-254) (+ x (/ t_1 t_2)) (if (<= z 1.3e+92) t_3 t_4))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = ((x * y) + t_1) / t_2;
double t_4 = (t - a) / (b - y);
double tmp;
if (z <= -1.2e+15) {
tmp = t_4;
} else if (z <= -1.3e-120) {
tmp = t_3;
} else if (z <= 2.45e-254) {
tmp = x + (t_1 / t_2);
} else if (z <= 1.3e+92) {
tmp = t_3;
} else {
tmp = t_4;
}
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) :: t_4
real(8) :: tmp
t_1 = z * (t - a)
t_2 = y + (z * (b - y))
t_3 = ((x * y) + t_1) / t_2
t_4 = (t - a) / (b - y)
if (z <= (-1.2d+15)) then
tmp = t_4
else if (z <= (-1.3d-120)) then
tmp = t_3
else if (z <= 2.45d-254) then
tmp = x + (t_1 / t_2)
else if (z <= 1.3d+92) then
tmp = t_3
else
tmp = t_4
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 = y + (z * (b - y));
double t_3 = ((x * y) + t_1) / t_2;
double t_4 = (t - a) / (b - y);
double tmp;
if (z <= -1.2e+15) {
tmp = t_4;
} else if (z <= -1.3e-120) {
tmp = t_3;
} else if (z <= 2.45e-254) {
tmp = x + (t_1 / t_2);
} else if (z <= 1.3e+92) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = y + (z * (b - y)) t_3 = ((x * y) + t_1) / t_2 t_4 = (t - a) / (b - y) tmp = 0 if z <= -1.2e+15: tmp = t_4 elif z <= -1.3e-120: tmp = t_3 elif z <= 2.45e-254: tmp = x + (t_1 / t_2) elif z <= 1.3e+92: tmp = t_3 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(Float64(x * y) + t_1) / t_2) t_4 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.2e+15) tmp = t_4; elseif (z <= -1.3e-120) tmp = t_3; elseif (z <= 2.45e-254) tmp = Float64(x + Float64(t_1 / t_2)); elseif (z <= 1.3e+92) tmp = t_3; else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = y + (z * (b - y)); t_3 = ((x * y) + t_1) / t_2; t_4 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.2e+15) tmp = t_4; elseif (z <= -1.3e-120) tmp = t_3; elseif (z <= 2.45e-254) tmp = x + (t_1 / t_2); elseif (z <= 1.3e+92) tmp = t_3; else tmp = t_4; 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[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e+15], t$95$4, If[LessEqual[z, -1.3e-120], t$95$3, If[LessEqual[z, 2.45e-254], N[(x + N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+92], t$95$3, t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{x \cdot y + t\_1}{t\_2}\\
t_4 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+15}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-120}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-254}:\\
\;\;\;\;x + \frac{t\_1}{t\_2}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+92}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if z < -1.2e15 or 1.2999999999999999e92 < z Initial program 38.8%
Taylor expanded in z around inf 86.1%
if -1.2e15 < z < -1.3000000000000001e-120 or 2.4499999999999999e-254 < z < 1.2999999999999999e92Initial program 87.8%
if -1.3000000000000001e-120 < z < 2.4499999999999999e-254Initial program 88.2%
Taylor expanded in x around 0 88.2%
Taylor expanded in z around 0 99.9%
Final simplification89.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (+ x (/ (* z (- t a)) t_1)))
(t_3 (/ (- t a) (- b y))))
(if (<= z -2800000000.0)
t_3
(if (<= z 2.45e-254)
t_2
(if (<= z 1.1e-150)
(/ (+ (* x y) (* z t)) t_1)
(if (<= z 3800.0) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = x + ((z * (t - a)) / t_1);
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -2800000000.0) {
tmp = t_3;
} else if (z <= 2.45e-254) {
tmp = t_2;
} else if (z <= 1.1e-150) {
tmp = ((x * y) + (z * t)) / t_1;
} else if (z <= 3800.0) {
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 = y + (z * (b - y))
t_2 = x + ((z * (t - a)) / t_1)
t_3 = (t - a) / (b - y)
if (z <= (-2800000000.0d0)) then
tmp = t_3
else if (z <= 2.45d-254) then
tmp = t_2
else if (z <= 1.1d-150) then
tmp = ((x * y) + (z * t)) / t_1
else if (z <= 3800.0d0) 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 = y + (z * (b - y));
double t_2 = x + ((z * (t - a)) / t_1);
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -2800000000.0) {
tmp = t_3;
} else if (z <= 2.45e-254) {
tmp = t_2;
} else if (z <= 1.1e-150) {
tmp = ((x * y) + (z * t)) / t_1;
} else if (z <= 3800.0) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = x + ((z * (t - a)) / t_1) t_3 = (t - a) / (b - y) tmp = 0 if z <= -2800000000.0: tmp = t_3 elif z <= 2.45e-254: tmp = t_2 elif z <= 1.1e-150: tmp = ((x * y) + (z * t)) / t_1 elif z <= 3800.0: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(x + Float64(Float64(z * Float64(t - a)) / t_1)) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2800000000.0) tmp = t_3; elseif (z <= 2.45e-254) tmp = t_2; elseif (z <= 1.1e-150) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) / t_1); elseif (z <= 3800.0) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = x + ((z * (t - a)) / t_1); t_3 = (t - a) / (b - y); tmp = 0.0; if (z <= -2800000000.0) tmp = t_3; elseif (z <= 2.45e-254) tmp = t_2; elseif (z <= 1.1e-150) tmp = ((x * y) + (z * t)) / t_1; elseif (z <= 3800.0) tmp = t_2; else tmp = t_3; 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[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2800000000.0], t$95$3, If[LessEqual[z, 2.45e-254], t$95$2, If[LessEqual[z, 1.1e-150], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 3800.0], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := x + \frac{z \cdot \left(t - a\right)}{t\_1}\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2800000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-254}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-150}:\\
\;\;\;\;\frac{x \cdot y + z \cdot t}{t\_1}\\
\mathbf{elif}\;z \leq 3800:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -2.8e9 or 3800 < z Initial program 43.3%
Taylor expanded in z around inf 83.7%
if -2.8e9 < z < 2.4499999999999999e-254 or 1.1e-150 < z < 3800Initial program 87.6%
Taylor expanded in x around 0 87.6%
Taylor expanded in z around 0 84.3%
if 2.4499999999999999e-254 < z < 1.1e-150Initial program 91.7%
Taylor expanded in a around 0 83.8%
Final simplification84.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))) (t_2 (/ (- t a) (- b y))))
(if (<= z -135000000000.0)
t_2
(if (<= z -1.55e-160)
(/ (* z (- t a)) t_1)
(if (<= z 5.6e-241)
(/ (+ x (/ (* z t) y)) (- 1.0 z))
(if (<= z 1.08e-29) (* x (/ y t_1)) 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 tmp;
if (z <= -135000000000.0) {
tmp = t_2;
} else if (z <= -1.55e-160) {
tmp = (z * (t - a)) / t_1;
} else if (z <= 5.6e-241) {
tmp = (x + ((z * t) / y)) / (1.0 - z);
} else if (z <= 1.08e-29) {
tmp = x * (y / 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 = y + (z * (b - y))
t_2 = (t - a) / (b - y)
if (z <= (-135000000000.0d0)) then
tmp = t_2
else if (z <= (-1.55d-160)) then
tmp = (z * (t - a)) / t_1
else if (z <= 5.6d-241) then
tmp = (x + ((z * t) / y)) / (1.0d0 - z)
else if (z <= 1.08d-29) then
tmp = x * (y / 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 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -135000000000.0) {
tmp = t_2;
} else if (z <= -1.55e-160) {
tmp = (z * (t - a)) / t_1;
} else if (z <= 5.6e-241) {
tmp = (x + ((z * t) / y)) / (1.0 - z);
} else if (z <= 1.08e-29) {
tmp = x * (y / t_1);
} 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) tmp = 0 if z <= -135000000000.0: tmp = t_2 elif z <= -1.55e-160: tmp = (z * (t - a)) / t_1 elif z <= 5.6e-241: tmp = (x + ((z * t) / y)) / (1.0 - z) elif z <= 1.08e-29: tmp = x * (y / t_1) 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)) tmp = 0.0 if (z <= -135000000000.0) tmp = t_2; elseif (z <= -1.55e-160) tmp = Float64(Float64(z * Float64(t - a)) / t_1); elseif (z <= 5.6e-241) tmp = Float64(Float64(x + Float64(Float64(z * t) / y)) / Float64(1.0 - z)); elseif (z <= 1.08e-29) tmp = Float64(x * Float64(y / t_1)); 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); tmp = 0.0; if (z <= -135000000000.0) tmp = t_2; elseif (z <= -1.55e-160) tmp = (z * (t - a)) / t_1; elseif (z <= 5.6e-241) tmp = (x + ((z * t) / y)) / (1.0 - z); elseif (z <= 1.08e-29) tmp = x * (y / t_1); 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]}, If[LessEqual[z, -135000000000.0], t$95$2, If[LessEqual[z, -1.55e-160], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 5.6e-241], N[(N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.08e-29], N[(x * N[(y / t$95$1), $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}\\
\mathbf{if}\;z \leq -135000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-160}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{t\_1}\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-241}:\\
\;\;\;\;\frac{x + \frac{z \cdot t}{y}}{1 - z}\\
\mathbf{elif}\;z \leq 1.08 \cdot 10^{-29}:\\
\;\;\;\;x \cdot \frac{y}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.35e11 or 1.07999999999999995e-29 < z Initial program 45.8%
Taylor expanded in z around inf 81.9%
if -1.35e11 < z < -1.55e-160Initial program 96.2%
Taylor expanded in x around 0 77.2%
if -1.55e-160 < z < 5.5999999999999998e-241Initial program 87.4%
Taylor expanded in y around inf 87.4%
associate-/l*68.2%
Simplified68.2%
Taylor expanded in y around -inf 64.3%
associate-*r*64.3%
neg-mul-164.3%
sub-neg64.3%
metadata-eval64.3%
Simplified64.3%
Taylor expanded in a around 0 79.1%
mul-1-neg79.1%
sub-neg79.1%
metadata-eval79.1%
Simplified79.1%
if 5.5999999999999998e-241 < z < 1.07999999999999995e-29Initial program 84.2%
Taylor expanded in t around inf 77.6%
mul-1-neg77.6%
unsub-neg77.6%
associate-/l*77.6%
Simplified77.6%
Taylor expanded in x around inf 54.1%
associate-/l*69.5%
Simplified69.5%
Final simplification78.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.6e-160)
t_1
(if (<= z 9.5e-240)
(/ (+ x (/ (* z t) y)) (- 1.0 z))
(if (<= z 1.18e-29) (* x (/ y (+ y (* z (- b y))))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.6e-160) {
tmp = t_1;
} else if (z <= 9.5e-240) {
tmp = (x + ((z * t) / y)) / (1.0 - z);
} else if (z <= 1.18e-29) {
tmp = x * (y / (y + (z * (b - y))));
} else {
tmp = t_1;
}
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) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-1.6d-160)) then
tmp = t_1
else if (z <= 9.5d-240) then
tmp = (x + ((z * t) / y)) / (1.0d0 - z)
else if (z <= 1.18d-29) then
tmp = x * (y / (y + (z * (b - y))))
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 b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.6e-160) {
tmp = t_1;
} else if (z <= 9.5e-240) {
tmp = (x + ((z * t) / y)) / (1.0 - z);
} else if (z <= 1.18e-29) {
tmp = x * (y / (y + (z * (b - y))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.6e-160: tmp = t_1 elif z <= 9.5e-240: tmp = (x + ((z * t) / y)) / (1.0 - z) elif z <= 1.18e-29: tmp = x * (y / (y + (z * (b - y)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.6e-160) tmp = t_1; elseif (z <= 9.5e-240) tmp = Float64(Float64(x + Float64(Float64(z * t) / y)) / Float64(1.0 - z)); elseif (z <= 1.18e-29) tmp = Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - y))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.6e-160) tmp = t_1; elseif (z <= 9.5e-240) tmp = (x + ((z * t) / y)) / (1.0 - z); elseif (z <= 1.18e-29) tmp = x * (y / (y + (z * (b - y)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e-160], t$95$1, If[LessEqual[z, 9.5e-240], N[(N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.18e-29], N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{-160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-240}:\\
\;\;\;\;\frac{x + \frac{z \cdot t}{y}}{1 - z}\\
\mathbf{elif}\;z \leq 1.18 \cdot 10^{-29}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.60000000000000004e-160 or 1.17999999999999996e-29 < z Initial program 54.5%
Taylor expanded in z around inf 76.9%
if -1.60000000000000004e-160 < z < 9.5000000000000005e-240Initial program 87.4%
Taylor expanded in y around inf 87.4%
associate-/l*68.2%
Simplified68.2%
Taylor expanded in y around -inf 64.3%
associate-*r*64.3%
neg-mul-164.3%
sub-neg64.3%
metadata-eval64.3%
Simplified64.3%
Taylor expanded in a around 0 79.1%
mul-1-neg79.1%
sub-neg79.1%
metadata-eval79.1%
Simplified79.1%
if 9.5000000000000005e-240 < z < 1.17999999999999996e-29Initial program 84.2%
Taylor expanded in t around inf 77.6%
mul-1-neg77.6%
unsub-neg77.6%
associate-/l*77.6%
Simplified77.6%
Taylor expanded in x around inf 54.1%
associate-/l*69.5%
Simplified69.5%
Final simplification76.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -1.25e+186)
t_1
(if (<= z -3.85e+64)
(- (/ a b))
(if (or (<= z -1.6e-160) (not (<= z 4.4e-44))) t_1 x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -1.25e+186) {
tmp = t_1;
} else if (z <= -3.85e+64) {
tmp = -(a / b);
} else if ((z <= -1.6e-160) || !(z <= 4.4e-44)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t / (b - y)
if (z <= (-1.25d+186)) then
tmp = t_1
else if (z <= (-3.85d+64)) then
tmp = -(a / b)
else if ((z <= (-1.6d-160)) .or. (.not. (z <= 4.4d-44))) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -1.25e+186) {
tmp = t_1;
} else if (z <= -3.85e+64) {
tmp = -(a / b);
} else if ((z <= -1.6e-160) || !(z <= 4.4e-44)) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -1.25e+186: tmp = t_1 elif z <= -3.85e+64: tmp = -(a / b) elif (z <= -1.6e-160) or not (z <= 4.4e-44): tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -1.25e+186) tmp = t_1; elseif (z <= -3.85e+64) tmp = Float64(-Float64(a / b)); elseif ((z <= -1.6e-160) || !(z <= 4.4e-44)) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -1.25e+186) tmp = t_1; elseif (z <= -3.85e+64) tmp = -(a / b); elseif ((z <= -1.6e-160) || ~((z <= 4.4e-44))) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e+186], t$95$1, If[LessEqual[z, -3.85e+64], (-N[(a / b), $MachinePrecision]), If[Or[LessEqual[z, -1.6e-160], N[Not[LessEqual[z, 4.4e-44]], $MachinePrecision]], t$95$1, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{+186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.85 \cdot 10^{+64}:\\
\;\;\;\;-\frac{a}{b}\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-160} \lor \neg \left(z \leq 4.4 \cdot 10^{-44}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.24999999999999988e186 or -3.85e64 < z < -1.60000000000000004e-160 or 4.40000000000000024e-44 < z Initial program 55.4%
Taylor expanded in x around inf 49.8%
Taylor expanded in z around inf 61.4%
div-sub62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in t around inf 44.4%
if -1.24999999999999988e186 < z < -3.85e64Initial program 52.9%
Taylor expanded in a around inf 28.8%
mul-1-neg28.8%
distribute-lft-neg-out28.8%
*-commutative28.8%
Simplified28.8%
Taylor expanded in y around 0 36.7%
associate-*r/36.7%
mul-1-neg36.7%
Simplified36.7%
if -1.60000000000000004e-160 < z < 4.40000000000000024e-44Initial program 86.3%
Taylor expanded in z around 0 51.8%
Final simplification46.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4600000000.0) (not (<= z 24000.0))) (/ (- t a) (- b y)) (+ x (/ (* z (- t a)) (+ y (* z (- b y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4600000000.0) || !(z <= 24000.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / (y + (z * (b - 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 <= (-4600000000.0d0)) .or. (.not. (z <= 24000.0d0))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((z * (t - a)) / (y + (z * (b - 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 <= -4600000000.0) || !(z <= 24000.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4600000000.0) or not (z <= 24000.0): tmp = (t - a) / (b - y) else: tmp = x + ((z * (t - a)) / (y + (z * (b - y)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4600000000.0) || !(z <= 24000.0)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4600000000.0) || ~((z <= 24000.0))) tmp = (t - a) / (b - y); else tmp = x + ((z * (t - a)) / (y + (z * (b - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4600000000.0], N[Not[LessEqual[z, 24000.0]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4600000000 \lor \neg \left(z \leq 24000\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -4.6e9 or 24000 < z Initial program 43.3%
Taylor expanded in z around inf 83.7%
if -4.6e9 < z < 24000Initial program 88.4%
Taylor expanded in x around 0 88.4%
Taylor expanded in z around 0 79.7%
Final simplification81.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.35e-160) (not (<= z 1e-29))) (/ (- t a) (- b y)) (* x (/ y (+ y (* z (- b y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.35e-160) || !(z <= 1e-29)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * (y / (y + (z * (b - 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.35d-160)) .or. (.not. (z <= 1d-29))) then
tmp = (t - a) / (b - y)
else
tmp = x * (y / (y + (z * (b - 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.35e-160) || !(z <= 1e-29)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * (y / (y + (z * (b - y))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.35e-160) or not (z <= 1e-29): tmp = (t - a) / (b - y) else: tmp = x * (y / (y + (z * (b - y)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.35e-160) || !(z <= 1e-29)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.35e-160) || ~((z <= 1e-29))) tmp = (t - a) / (b - y); else tmp = x * (y / (y + (z * (b - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.35e-160], N[Not[LessEqual[z, 1e-29]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-160} \lor \neg \left(z \leq 10^{-29}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -1.35000000000000005e-160 or 9.99999999999999943e-30 < z Initial program 54.5%
Taylor expanded in z around inf 76.9%
if -1.35000000000000005e-160 < z < 9.99999999999999943e-30Initial program 85.9%
Taylor expanded in t around inf 82.6%
mul-1-neg82.6%
unsub-neg82.6%
associate-/l*82.4%
Simplified82.4%
Taylor expanded in x around inf 49.6%
associate-/l*63.4%
Simplified63.4%
Final simplification72.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -3.1e+56)
t_1
(if (<= y -1.7e-105)
(/ a (- y b))
(if (<= y 2.6e+48) (/ (- t a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.1e+56) {
tmp = t_1;
} else if (y <= -1.7e-105) {
tmp = a / (y - b);
} else if (y <= 2.6e+48) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
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) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-3.1d+56)) then
tmp = t_1
else if (y <= (-1.7d-105)) then
tmp = a / (y - b)
else if (y <= 2.6d+48) then
tmp = (t - a) / b
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 b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.1e+56) {
tmp = t_1;
} else if (y <= -1.7e-105) {
tmp = a / (y - b);
} else if (y <= 2.6e+48) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -3.1e+56: tmp = t_1 elif y <= -1.7e-105: tmp = a / (y - b) elif y <= 2.6e+48: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -3.1e+56) tmp = t_1; elseif (y <= -1.7e-105) tmp = Float64(a / Float64(y - b)); elseif (y <= 2.6e+48) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -3.1e+56) tmp = t_1; elseif (y <= -1.7e-105) tmp = a / (y - b); elseif (y <= 2.6e+48) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.1e+56], t$95$1, If[LessEqual[y, -1.7e-105], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e+48], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-105}:\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+48}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.10000000000000005e56 or 2.59999999999999995e48 < y Initial program 44.3%
Taylor expanded in y around inf 48.1%
mul-1-neg48.1%
unsub-neg48.1%
Simplified48.1%
if -3.10000000000000005e56 < y < -1.69999999999999996e-105Initial program 73.4%
Taylor expanded in a around inf 31.6%
mul-1-neg31.6%
distribute-lft-neg-out31.6%
*-commutative31.6%
Simplified31.6%
Taylor expanded in z around inf 44.7%
associate-*r/44.7%
mul-1-neg44.7%
Simplified44.7%
if -1.69999999999999996e-105 < y < 2.59999999999999995e48Initial program 79.2%
Taylor expanded in y around 0 58.7%
Final simplification52.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -7.8e+111)
t_1
(if (<= y -145000.0)
(/ (- a t) y)
(if (<= y 2.4e+45) (/ (- t a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -7.8e+111) {
tmp = t_1;
} else if (y <= -145000.0) {
tmp = (a - t) / y;
} else if (y <= 2.4e+45) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
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) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-7.8d+111)) then
tmp = t_1
else if (y <= (-145000.0d0)) then
tmp = (a - t) / y
else if (y <= 2.4d+45) then
tmp = (t - a) / b
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 b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -7.8e+111) {
tmp = t_1;
} else if (y <= -145000.0) {
tmp = (a - t) / y;
} else if (y <= 2.4e+45) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -7.8e+111: tmp = t_1 elif y <= -145000.0: tmp = (a - t) / y elif y <= 2.4e+45: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -7.8e+111) tmp = t_1; elseif (y <= -145000.0) tmp = Float64(Float64(a - t) / y); elseif (y <= 2.4e+45) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -7.8e+111) tmp = t_1; elseif (y <= -145000.0) tmp = (a - t) / y; elseif (y <= 2.4e+45) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e+111], t$95$1, If[LessEqual[y, -145000.0], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 2.4e+45], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -145000:\\
\;\;\;\;\frac{a - t}{y}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+45}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.79999999999999958e111 or 2.39999999999999989e45 < y Initial program 43.3%
Taylor expanded in y around inf 52.1%
mul-1-neg52.1%
unsub-neg52.1%
Simplified52.1%
if -7.79999999999999958e111 < y < -145000Initial program 64.6%
Taylor expanded in x around inf 68.6%
Taylor expanded in z around inf 49.3%
div-sub49.3%
*-commutative49.3%
Simplified49.3%
Taylor expanded in b around 0 41.4%
associate-*r/41.4%
mul-1-neg41.4%
Simplified41.4%
if -145000 < y < 2.39999999999999989e45Initial program 78.0%
Taylor expanded in y around 0 55.0%
Final simplification52.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.32e+48) x (if (<= y -2.7e-208) (- (/ a b)) (if (<= y 8.4e+37) (/ t b) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.32e+48) {
tmp = x;
} else if (y <= -2.7e-208) {
tmp = -(a / b);
} else if (y <= 8.4e+37) {
tmp = t / 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 (y <= (-1.32d+48)) then
tmp = x
else if (y <= (-2.7d-208)) then
tmp = -(a / b)
else if (y <= 8.4d+37) then
tmp = t / 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 (y <= -1.32e+48) {
tmp = x;
} else if (y <= -2.7e-208) {
tmp = -(a / b);
} else if (y <= 8.4e+37) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.32e+48: tmp = x elif y <= -2.7e-208: tmp = -(a / b) elif y <= 8.4e+37: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.32e+48) tmp = x; elseif (y <= -2.7e-208) tmp = Float64(-Float64(a / b)); elseif (y <= 8.4e+37) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.32e+48) tmp = x; elseif (y <= -2.7e-208) tmp = -(a / b); elseif (y <= 8.4e+37) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.32e+48], x, If[LessEqual[y, -2.7e-208], (-N[(a / b), $MachinePrecision]), If[LessEqual[y, 8.4e+37], N[(t / b), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.32 \cdot 10^{+48}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{-208}:\\
\;\;\;\;-\frac{a}{b}\\
\mathbf{elif}\;y \leq 8.4 \cdot 10^{+37}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.32e48 or 8.4000000000000004e37 < y Initial program 44.3%
Taylor expanded in z around 0 37.6%
if -1.32e48 < y < -2.7e-208Initial program 81.7%
Taylor expanded in a around inf 36.5%
mul-1-neg36.5%
distribute-lft-neg-out36.5%
*-commutative36.5%
Simplified36.5%
Taylor expanded in y around 0 30.4%
associate-*r/30.4%
mul-1-neg30.4%
Simplified30.4%
if -2.7e-208 < y < 8.4000000000000004e37Initial program 78.2%
Taylor expanded in x around inf 60.1%
Taylor expanded in b around inf 55.2%
Taylor expanded in t around inf 41.0%
Final simplification37.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.6e-160) (not (<= z 2e-47))) (/ (- t a) (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.6e-160) || !(z <= 2e-47)) {
tmp = (t - a) / (b - y);
} 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 <= (-1.6d-160)) .or. (.not. (z <= 2d-47))) then
tmp = (t - a) / (b - y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.6e-160) || !(z <= 2e-47)) {
tmp = (t - a) / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.6e-160) or not (z <= 2e-47): tmp = (t - a) / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.6e-160) || !(z <= 2e-47)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.6e-160) || ~((z <= 2e-47))) tmp = (t - a) / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.6e-160], N[Not[LessEqual[z, 2e-47]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-160} \lor \neg \left(z \leq 2 \cdot 10^{-47}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.60000000000000004e-160 or 1.9999999999999999e-47 < z Initial program 55.0%
Taylor expanded in z around inf 75.7%
if -1.60000000000000004e-160 < z < 1.9999999999999999e-47Initial program 86.3%
Taylor expanded in z around 0 51.8%
Final simplification67.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.2e+108) (not (<= y 3.7e+37))) (/ x (- 1.0 z)) (/ t (- b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.2e+108) || !(y <= 3.7e+37)) {
tmp = x / (1.0 - z);
} else {
tmp = t / (b - 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 ((y <= (-8.2d+108)) .or. (.not. (y <= 3.7d+37))) then
tmp = x / (1.0d0 - z)
else
tmp = t / (b - 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 ((y <= -8.2e+108) || !(y <= 3.7e+37)) {
tmp = x / (1.0 - z);
} else {
tmp = t / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8.2e+108) or not (y <= 3.7e+37): tmp = x / (1.0 - z) else: tmp = t / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8.2e+108) || !(y <= 3.7e+37)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(t / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8.2e+108) || ~((y <= 3.7e+37))) tmp = x / (1.0 - z); else tmp = t / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8.2e+108], N[Not[LessEqual[y, 3.7e+37]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+108} \lor \neg \left(y \leq 3.7 \cdot 10^{+37}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y}\\
\end{array}
\end{array}
if y < -8.1999999999999998e108 or 3.6999999999999999e37 < y Initial program 43.9%
Taylor expanded in y around inf 49.9%
mul-1-neg49.9%
unsub-neg49.9%
Simplified49.9%
if -8.1999999999999998e108 < y < 3.6999999999999999e37Initial program 77.3%
Taylor expanded in x around inf 64.1%
Taylor expanded in z around inf 54.3%
div-sub55.0%
*-commutative55.0%
Simplified55.0%
Taylor expanded in t around inf 39.1%
Final simplification43.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.1e+45) (not (<= y 1.55e+45))) (/ 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 <= -5.1e+45) || !(y <= 1.55e+45)) {
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 <= (-5.1d+45)) .or. (.not. (y <= 1.55d+45))) 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 <= -5.1e+45) || !(y <= 1.55e+45)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.1e+45) or not (y <= 1.55e+45): 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 <= -5.1e+45) || !(y <= 1.55e+45)) 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 <= -5.1e+45) || ~((y <= 1.55e+45))) 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, -5.1e+45], N[Not[LessEqual[y, 1.55e+45]], $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 -5.1 \cdot 10^{+45} \lor \neg \left(y \leq 1.55 \cdot 10^{+45}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -5.0999999999999997e45 or 1.54999999999999994e45 < y Initial program 43.9%
Taylor expanded in y around inf 47.6%
mul-1-neg47.6%
unsub-neg47.6%
Simplified47.6%
if -5.0999999999999997e45 < y < 1.54999999999999994e45Initial program 78.3%
Taylor expanded in y around 0 52.9%
Final simplification50.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.22e-29) x (if (<= y 5.8e+37) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.22e-29) {
tmp = x;
} else if (y <= 5.8e+37) {
tmp = t / 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 (y <= (-1.22d-29)) then
tmp = x
else if (y <= 5.8d+37) then
tmp = t / 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 (y <= -1.22e-29) {
tmp = x;
} else if (y <= 5.8e+37) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.22e-29: tmp = x elif y <= 5.8e+37: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.22e-29) tmp = x; elseif (y <= 5.8e+37) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.22e-29) tmp = x; elseif (y <= 5.8e+37) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.22e-29], x, If[LessEqual[y, 5.8e+37], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.22 \cdot 10^{-29}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+37}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.21999999999999996e-29 or 5.79999999999999957e37 < y Initial program 49.7%
Taylor expanded in z around 0 34.7%
if -1.21999999999999996e-29 < y < 5.79999999999999957e37Initial program 79.5%
Taylor expanded in x around inf 62.7%
Taylor expanded in b around inf 55.2%
Taylor expanded in t around inf 36.3%
Final simplification35.6%
(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 65.3%
Taylor expanded in z around 0 21.0%
Final simplification21.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 2024079
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))