
(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 21 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 (- y b))))
(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 (- z (* t (/ z a))))) t_1)
(if (<= z 2.45e-254)
(+ x (/ t_4 t_1))
(if (<= z 2e-229)
(/ (+ (* x y) t_4) (- y (* y (- z (* b (/ z y))))))
(if (<= z 2.4e+36)
(* x (+ (/ y t_1) (/ t_4 (* x t_1))))
(+
(+ t_3 (* (/ y z) (/ x (- b y))))
(* y (/ (- a t) (* z t_2)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (z * (y - b));
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 * (z - (t * (z / a))))) / 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 * (z - (b * (z / y)))));
} 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 * ((a - t) / (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 * (y - b))
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 * (z - (t * (z / a))))) / 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 * (z - (b * (z / y)))))
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 * ((a - t) / (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 * (y - b));
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 * (z - (t * (z / a))))) / 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 * (z - (b * (z / y)))));
} 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 * ((a - t) / (z * t_2)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y - (z * (y - b)) 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 * (z - (t * (z / a))))) / t_1 elif z <= 2.45e-254: tmp = x + (t_4 / t_1) elif z <= 2e-229: tmp = ((x * y) + t_4) / (y - (y * (z - (b * (z / y))))) 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 * ((a - t) / (z * t_2))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y - Float64(z * Float64(y - b))) 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(z - Float64(t * Float64(z / a))))) / 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(z - Float64(b * Float64(z / y)))))); 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(a - t) / Float64(z * t_2)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y - (z * (y - b)); 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 * (z - (t * (z / a))))) / t_1; elseif (z <= 2.45e-254) tmp = x + (t_4 / t_1); elseif (z <= 2e-229) tmp = ((x * y) + t_4) / (y - (y * (z - (b * (z / y))))); 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 * ((a - t) / (z * t_2))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y - N[(z * N[(y - b), $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[(z - N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), $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[(z - N[(b * N[(z / y), $MachinePrecision]), $MachinePrecision]), $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[(a - t), $MachinePrecision] / N[(z * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - z \cdot \left(y - b\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(z - t \cdot \frac{z}{a}\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(z - b \cdot \frac{z}{y}\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{a - t}{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 (- y b))))
(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 (/ (- a t) (* 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 * (y - b));
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 * ((a - t) / (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 * (y - b));
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 * ((a - t) / (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 * (y - b)) 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 * ((a - t) / (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(y - b))) 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(a - t) / 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 * (y - b)); 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 * ((a - t) / (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[(y - b), $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[(a - t), $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(y - b\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{a - t}{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 (- y b))))
(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 (/ (- a t) (* 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 * (y - b));
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 * ((a - t) / (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 * (y - b));
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 * ((a - t) / (z * Math.pow((b - y), 2.0))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y - (z * (y - b)) 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 * ((a - t) / (z * math.pow((b - y), 2.0)))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y - Float64(z * Float64(y - b))) 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(a - t) / 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 * (y - b)); 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 * ((a - t) / (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[(y - b), $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[(a - t), $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(y - b\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{a - t}{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 (- y b))))
(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 * (y - b));
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 * (y - b));
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 * (y - b)) 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(y - b))) 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 * (y - b)); 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[(y - b), $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(y - b\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 (- y b)))) (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 * (y - b));
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 * (y - b));
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 * (y - b)) 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(y - b))) 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 * (y - b)); 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[(y - b), $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(y - b\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 (/ (- t a) b)) (t_2 (/ t (- b y))))
(if (<= z -1.52e+237)
t_2
(if (<= z -8.5e+131)
(/ a (- y b))
(if (<= z -1.32e-86)
t_1
(if (<= z -1.95e-100)
(* z (/ (- t a) y))
(if (<= z -2.4e-107)
(- x (* a (/ z y)))
(if (<= z -1.55e-160)
t_1
(if (<= z 3.2e-44)
(+ x (/ (* z t) y))
(if (<= z 1.9e+150)
t_1
(if (<= z 1.06e+260) (/ (- a t) y) t_2)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / b;
double t_2 = t / (b - y);
double tmp;
if (z <= -1.52e+237) {
tmp = t_2;
} else if (z <= -8.5e+131) {
tmp = a / (y - b);
} else if (z <= -1.32e-86) {
tmp = t_1;
} else if (z <= -1.95e-100) {
tmp = z * ((t - a) / y);
} else if (z <= -2.4e-107) {
tmp = x - (a * (z / y));
} else if (z <= -1.55e-160) {
tmp = t_1;
} else if (z <= 3.2e-44) {
tmp = x + ((z * t) / y);
} else if (z <= 1.9e+150) {
tmp = t_1;
} else if (z <= 1.06e+260) {
tmp = (a - t) / y;
} 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 = (t - a) / b
t_2 = t / (b - y)
if (z <= (-1.52d+237)) then
tmp = t_2
else if (z <= (-8.5d+131)) then
tmp = a / (y - b)
else if (z <= (-1.32d-86)) then
tmp = t_1
else if (z <= (-1.95d-100)) then
tmp = z * ((t - a) / y)
else if (z <= (-2.4d-107)) then
tmp = x - (a * (z / y))
else if (z <= (-1.55d-160)) then
tmp = t_1
else if (z <= 3.2d-44) then
tmp = x + ((z * t) / y)
else if (z <= 1.9d+150) then
tmp = t_1
else if (z <= 1.06d+260) then
tmp = (a - t) / y
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 = (t - a) / b;
double t_2 = t / (b - y);
double tmp;
if (z <= -1.52e+237) {
tmp = t_2;
} else if (z <= -8.5e+131) {
tmp = a / (y - b);
} else if (z <= -1.32e-86) {
tmp = t_1;
} else if (z <= -1.95e-100) {
tmp = z * ((t - a) / y);
} else if (z <= -2.4e-107) {
tmp = x - (a * (z / y));
} else if (z <= -1.55e-160) {
tmp = t_1;
} else if (z <= 3.2e-44) {
tmp = x + ((z * t) / y);
} else if (z <= 1.9e+150) {
tmp = t_1;
} else if (z <= 1.06e+260) {
tmp = (a - t) / y;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / b t_2 = t / (b - y) tmp = 0 if z <= -1.52e+237: tmp = t_2 elif z <= -8.5e+131: tmp = a / (y - b) elif z <= -1.32e-86: tmp = t_1 elif z <= -1.95e-100: tmp = z * ((t - a) / y) elif z <= -2.4e-107: tmp = x - (a * (z / y)) elif z <= -1.55e-160: tmp = t_1 elif z <= 3.2e-44: tmp = x + ((z * t) / y) elif z <= 1.9e+150: tmp = t_1 elif z <= 1.06e+260: tmp = (a - t) / y else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / b) t_2 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -1.52e+237) tmp = t_2; elseif (z <= -8.5e+131) tmp = Float64(a / Float64(y - b)); elseif (z <= -1.32e-86) tmp = t_1; elseif (z <= -1.95e-100) tmp = Float64(z * Float64(Float64(t - a) / y)); elseif (z <= -2.4e-107) tmp = Float64(x - Float64(a * Float64(z / y))); elseif (z <= -1.55e-160) tmp = t_1; elseif (z <= 3.2e-44) tmp = Float64(x + Float64(Float64(z * t) / y)); elseif (z <= 1.9e+150) tmp = t_1; elseif (z <= 1.06e+260) tmp = Float64(Float64(a - t) / y); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / b; t_2 = t / (b - y); tmp = 0.0; if (z <= -1.52e+237) tmp = t_2; elseif (z <= -8.5e+131) tmp = a / (y - b); elseif (z <= -1.32e-86) tmp = t_1; elseif (z <= -1.95e-100) tmp = z * ((t - a) / y); elseif (z <= -2.4e-107) tmp = x - (a * (z / y)); elseif (z <= -1.55e-160) tmp = t_1; elseif (z <= 3.2e-44) tmp = x + ((z * t) / y); elseif (z <= 1.9e+150) tmp = t_1; elseif (z <= 1.06e+260) tmp = (a - t) / y; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.52e+237], t$95$2, If[LessEqual[z, -8.5e+131], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.32e-86], t$95$1, If[LessEqual[z, -1.95e-100], N[(z * N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.4e-107], N[(x - N[(a * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.55e-160], t$95$1, If[LessEqual[z, 3.2e-44], N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+150], t$95$1, If[LessEqual[z, 1.06e+260], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b}\\
t_2 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -1.52 \cdot 10^{+237}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{+131}:\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{elif}\;z \leq -1.32 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-100}:\\
\;\;\;\;z \cdot \frac{t - a}{y}\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-107}:\\
\;\;\;\;x - a \cdot \frac{z}{y}\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-44}:\\
\;\;\;\;x + \frac{z \cdot t}{y}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{+260}:\\
\;\;\;\;\frac{a - t}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.51999999999999995e237 or 1.06e260 < z Initial program 31.9%
Taylor expanded in x around inf 23.9%
Taylor expanded in z around inf 71.3%
div-sub71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in t around inf 62.4%
if -1.51999999999999995e237 < z < -8.50000000000000063e131Initial program 19.8%
Taylor expanded in a around inf 11.8%
mul-1-neg11.8%
distribute-lft-neg-out11.8%
*-commutative11.8%
Simplified11.8%
Taylor expanded in z around inf 69.0%
associate-*r/69.0%
mul-1-neg69.0%
Simplified69.0%
if -8.50000000000000063e131 < z < -1.32e-86 or -2.39999999999999994e-107 < z < -1.55e-160 or 3.19999999999999995e-44 < z < 1.89999999999999995e150Initial program 74.1%
Taylor expanded in y around 0 49.5%
if -1.32e-86 < z < -1.94999999999999989e-100Initial program 99.5%
Taylor expanded in y around inf 99.5%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in y around 0 99.5%
associate-*r/100.0%
Simplified100.0%
if -1.94999999999999989e-100 < z < -2.39999999999999994e-107Initial program 99.2%
Taylor expanded in y around inf 99.2%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in t around 0 99.2%
mul-1-neg99.2%
unsub-neg99.2%
associate-/l*100.0%
Simplified100.0%
if -1.55e-160 < z < 3.19999999999999995e-44Initial program 86.3%
Taylor expanded in y around inf 85.2%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in z around 0 58.0%
Taylor expanded in a around 0 68.2%
if 1.89999999999999995e150 < z < 1.06e260Initial program 40.8%
Taylor expanded in x around inf 31.8%
Taylor expanded in z around inf 70.2%
div-sub70.2%
*-commutative70.2%
Simplified70.2%
Taylor expanded in b around 0 64.0%
associate-*r/64.0%
mul-1-neg64.0%
Simplified64.0%
Final simplification61.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (- y (* z (- y b))))
(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 * (y - b));
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 * (y - b))
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 * (y - b));
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 * (y - b)) 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(y - b))) 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 * (y - b)); 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[(y - b), $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(y - b\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 (/ (- t a) b)) (t_2 (/ t (- b y))))
(if (<= z -6.6e+237)
t_2
(if (<= z -1.35e+135)
(/ a (- y b))
(if (<= z -1.6e-160)
t_1
(if (<= z 7e-49)
(+ x (/ (* z t) y))
(if (<= z 2.7e+150)
t_1
(if (<= z 5.6e+260) (/ (- a t) y) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / b;
double t_2 = t / (b - y);
double tmp;
if (z <= -6.6e+237) {
tmp = t_2;
} else if (z <= -1.35e+135) {
tmp = a / (y - b);
} else if (z <= -1.6e-160) {
tmp = t_1;
} else if (z <= 7e-49) {
tmp = x + ((z * t) / y);
} else if (z <= 2.7e+150) {
tmp = t_1;
} else if (z <= 5.6e+260) {
tmp = (a - t) / y;
} 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 = (t - a) / b
t_2 = t / (b - y)
if (z <= (-6.6d+237)) then
tmp = t_2
else if (z <= (-1.35d+135)) then
tmp = a / (y - b)
else if (z <= (-1.6d-160)) then
tmp = t_1
else if (z <= 7d-49) then
tmp = x + ((z * t) / y)
else if (z <= 2.7d+150) then
tmp = t_1
else if (z <= 5.6d+260) then
tmp = (a - t) / y
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 = (t - a) / b;
double t_2 = t / (b - y);
double tmp;
if (z <= -6.6e+237) {
tmp = t_2;
} else if (z <= -1.35e+135) {
tmp = a / (y - b);
} else if (z <= -1.6e-160) {
tmp = t_1;
} else if (z <= 7e-49) {
tmp = x + ((z * t) / y);
} else if (z <= 2.7e+150) {
tmp = t_1;
} else if (z <= 5.6e+260) {
tmp = (a - t) / y;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / b t_2 = t / (b - y) tmp = 0 if z <= -6.6e+237: tmp = t_2 elif z <= -1.35e+135: tmp = a / (y - b) elif z <= -1.6e-160: tmp = t_1 elif z <= 7e-49: tmp = x + ((z * t) / y) elif z <= 2.7e+150: tmp = t_1 elif z <= 5.6e+260: tmp = (a - t) / y else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / b) t_2 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -6.6e+237) tmp = t_2; elseif (z <= -1.35e+135) tmp = Float64(a / Float64(y - b)); elseif (z <= -1.6e-160) tmp = t_1; elseif (z <= 7e-49) tmp = Float64(x + Float64(Float64(z * t) / y)); elseif (z <= 2.7e+150) tmp = t_1; elseif (z <= 5.6e+260) tmp = Float64(Float64(a - t) / y); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / b; t_2 = t / (b - y); tmp = 0.0; if (z <= -6.6e+237) tmp = t_2; elseif (z <= -1.35e+135) tmp = a / (y - b); elseif (z <= -1.6e-160) tmp = t_1; elseif (z <= 7e-49) tmp = x + ((z * t) / y); elseif (z <= 2.7e+150) tmp = t_1; elseif (z <= 5.6e+260) tmp = (a - t) / y; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e+237], t$95$2, If[LessEqual[z, -1.35e+135], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.6e-160], t$95$1, If[LessEqual[z, 7e-49], N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+150], t$95$1, If[LessEqual[z, 5.6e+260], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b}\\
t_2 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{+237}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{+135}:\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-49}:\\
\;\;\;\;x + \frac{z \cdot t}{y}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+260}:\\
\;\;\;\;\frac{a - t}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.6000000000000001e237 or 5.5999999999999996e260 < z Initial program 31.9%
Taylor expanded in x around inf 23.9%
Taylor expanded in z around inf 71.3%
div-sub71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in t around inf 62.4%
if -6.6000000000000001e237 < z < -1.34999999999999992e135Initial program 19.8%
Taylor expanded in a around inf 11.8%
mul-1-neg11.8%
distribute-lft-neg-out11.8%
*-commutative11.8%
Simplified11.8%
Taylor expanded in z around inf 69.0%
associate-*r/69.0%
mul-1-neg69.0%
Simplified69.0%
if -1.34999999999999992e135 < z < -1.60000000000000004e-160 or 7.00000000000000012e-49 < z < 2.70000000000000008e150Initial program 75.5%
Taylor expanded in y around 0 46.9%
if -1.60000000000000004e-160 < z < 7.00000000000000012e-49Initial program 86.3%
Taylor expanded in y around inf 85.2%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in z around 0 58.0%
Taylor expanded in a around 0 68.2%
if 2.70000000000000008e150 < z < 5.5999999999999996e260Initial program 40.8%
Taylor expanded in x around inf 31.8%
Taylor expanded in z around inf 70.2%
div-sub70.2%
*-commutative70.2%
Simplified70.2%
Taylor expanded in b around 0 64.0%
associate-*r/64.0%
mul-1-neg64.0%
Simplified64.0%
Final simplification59.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- y (* z (- y b))))
(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 * (y - b));
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 * (y - b))
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 * (y - b));
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 * (y - b)) 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(y - b))) 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 * (y - b)); 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[(y - b), $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(y - b\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 (* z (- t a))) (t_2 (/ (- t a) (- b y))))
(if (<= z -135000000000.0)
t_2
(if (<= z -1.6e-160)
(/ t_1 (- y (* z (- y b))))
(if (<= z 7e-48) (* x (+ (/ t_1 (* x y)) 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 <= -135000000000.0) {
tmp = t_2;
} else if (z <= -1.6e-160) {
tmp = t_1 / (y - (z * (y - b)));
} else if (z <= 7e-48) {
tmp = x * ((t_1 / (x * y)) + 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 <= (-135000000000.0d0)) then
tmp = t_2
else if (z <= (-1.6d-160)) then
tmp = t_1 / (y - (z * (y - b)))
else if (z <= 7d-48) then
tmp = x * ((t_1 / (x * y)) + 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 <= -135000000000.0) {
tmp = t_2;
} else if (z <= -1.6e-160) {
tmp = t_1 / (y - (z * (y - b)));
} else if (z <= 7e-48) {
tmp = x * ((t_1 / (x * y)) + 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 <= -135000000000.0: tmp = t_2 elif z <= -1.6e-160: tmp = t_1 / (y - (z * (y - b))) elif z <= 7e-48: tmp = x * ((t_1 / (x * y)) + 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 <= -135000000000.0) tmp = t_2; elseif (z <= -1.6e-160) tmp = Float64(t_1 / Float64(y - Float64(z * Float64(y - b)))); elseif (z <= 7e-48) tmp = Float64(x * Float64(Float64(t_1 / Float64(x * y)) + 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 <= -135000000000.0) tmp = t_2; elseif (z <= -1.6e-160) tmp = t_1 / (y - (z * (y - b))); elseif (z <= 7e-48) tmp = x * ((t_1 / (x * y)) + 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, -135000000000.0], t$95$2, If[LessEqual[z, -1.6e-160], N[(t$95$1 / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-48], N[(x * N[(N[(t$95$1 / N[(x * y), $MachinePrecision]), $MachinePrecision] + 1.0), $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 -135000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-160}:\\
\;\;\;\;\frac{t\_1}{y - z \cdot \left(y - b\right)}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-48}:\\
\;\;\;\;x \cdot \left(\frac{t\_1}{x \cdot y} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.35e11 or 6.99999999999999982e-48 < z Initial program 46.7%
Taylor expanded in z around inf 80.3%
if -1.35e11 < z < -1.60000000000000004e-160Initial program 96.2%
Taylor expanded in x around 0 77.2%
if -1.60000000000000004e-160 < z < 6.99999999999999982e-48Initial program 86.3%
Taylor expanded in y around inf 85.2%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in z around 0 58.0%
Taylor expanded in x around inf 70.0%
Final simplification76.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -5.6e+186)
t_1
(if (<= z -3.8e+64)
(/ a (- b))
(if (or (<= z -1.6e-160) (not (<= z 1.55e-43))) 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 <= -5.6e+186) {
tmp = t_1;
} else if (z <= -3.8e+64) {
tmp = a / -b;
} else if ((z <= -1.6e-160) || !(z <= 1.55e-43)) {
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 <= (-5.6d+186)) then
tmp = t_1
else if (z <= (-3.8d+64)) then
tmp = a / -b
else if ((z <= (-1.6d-160)) .or. (.not. (z <= 1.55d-43))) 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 <= -5.6e+186) {
tmp = t_1;
} else if (z <= -3.8e+64) {
tmp = a / -b;
} else if ((z <= -1.6e-160) || !(z <= 1.55e-43)) {
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 <= -5.6e+186: tmp = t_1 elif z <= -3.8e+64: tmp = a / -b elif (z <= -1.6e-160) or not (z <= 1.55e-43): 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 <= -5.6e+186) tmp = t_1; elseif (z <= -3.8e+64) tmp = Float64(a / Float64(-b)); elseif ((z <= -1.6e-160) || !(z <= 1.55e-43)) 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 <= -5.6e+186) tmp = t_1; elseif (z <= -3.8e+64) tmp = a / -b; elseif ((z <= -1.6e-160) || ~((z <= 1.55e-43))) 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, -5.6e+186], t$95$1, If[LessEqual[z, -3.8e+64], N[(a / (-b)), $MachinePrecision], If[Or[LessEqual[z, -1.6e-160], N[Not[LessEqual[z, 1.55e-43]], $MachinePrecision]], t$95$1, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{+186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{+64}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-160} \lor \neg \left(z \leq 1.55 \cdot 10^{-43}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.60000000000000037e186 or -3.8000000000000001e64 < z < -1.60000000000000004e-160 or 1.55e-43 < 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 -5.60000000000000037e186 < z < -3.8000000000000001e64Initial 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 < 1.55e-43Initial 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 (- y b)))))))
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 * (y - 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 ((z <= (-4600000000.0d0)) .or. (.not. (z <= 24000.0d0))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((z * (t - a)) / (y - (z * (y - 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 ((z <= -4600000000.0) || !(z <= 24000.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / (y - (z * (y - b))));
}
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 * (y - b)))) 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(y - b))))); 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 * (y - b)))); 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[(y - b), $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(y - b\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.6e-160) (not (<= z 5e-43))) (/ (- t a) (- b y)) (* x (+ (/ (* z (- t a)) (* x y)) 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.6e-160) || !(z <= 5e-43)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * (((z * (t - a)) / (x * y)) + 1.0);
}
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 <= 5d-43))) then
tmp = (t - a) / (b - y)
else
tmp = x * (((z * (t - a)) / (x * y)) + 1.0d0)
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 <= 5e-43)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * (((z * (t - a)) / (x * y)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.6e-160) or not (z <= 5e-43): tmp = (t - a) / (b - y) else: tmp = x * (((z * (t - a)) / (x * y)) + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.6e-160) || !(z <= 5e-43)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x * Float64(Float64(Float64(z * Float64(t - a)) / Float64(x * y)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.6e-160) || ~((z <= 5e-43))) tmp = (t - a) / (b - y); else tmp = x * (((z * (t - a)) / (x * y)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.6e-160], N[Not[LessEqual[z, 5e-43]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-160} \lor \neg \left(z \leq 5 \cdot 10^{-43}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{z \cdot \left(t - a\right)}{x \cdot y} + 1\right)\\
\end{array}
\end{array}
if z < -1.60000000000000004e-160 or 5.00000000000000019e-43 < z Initial program 55.0%
Taylor expanded in z around inf 75.7%
if -1.60000000000000004e-160 < z < 5.00000000000000019e-43Initial program 86.3%
Taylor expanded in y around inf 85.2%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in z around 0 58.0%
Taylor expanded in x around inf 70.0%
Final simplification73.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -1.25e+60)
t_1
(if (<= y -2.1e-105)
(/ a (- y b))
(if (<= y 2.8e+46) (/ (- 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 <= -1.25e+60) {
tmp = t_1;
} else if (y <= -2.1e-105) {
tmp = a / (y - b);
} else if (y <= 2.8e+46) {
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 <= (-1.25d+60)) then
tmp = t_1
else if (y <= (-2.1d-105)) then
tmp = a / (y - b)
else if (y <= 2.8d+46) 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 <= -1.25e+60) {
tmp = t_1;
} else if (y <= -2.1e-105) {
tmp = a / (y - b);
} else if (y <= 2.8e+46) {
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 <= -1.25e+60: tmp = t_1 elif y <= -2.1e-105: tmp = a / (y - b) elif y <= 2.8e+46: 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 <= -1.25e+60) tmp = t_1; elseif (y <= -2.1e-105) tmp = Float64(a / Float64(y - b)); elseif (y <= 2.8e+46) 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 <= -1.25e+60) tmp = t_1; elseif (y <= -2.1e-105) tmp = a / (y - b); elseif (y <= 2.8e+46) 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, -1.25e+60], t$95$1, If[LessEqual[y, -2.1e-105], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e+46], 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 -1.25 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-105}:\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+46}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.24999999999999994e60 or 2.80000000000000018e46 < y Initial program 44.3%
Taylor expanded in y around inf 48.1%
mul-1-neg48.1%
unsub-neg48.1%
Simplified48.1%
if -1.24999999999999994e60 < y < -2.1e-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 -2.1e-105 < y < 2.80000000000000018e46Initial program 79.2%
Taylor expanded in y around 0 58.7%
Final simplification52.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -5.8e+45) x (if (<= y -5.7e-208) (/ a (- b)) (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 <= -5.8e+45) {
tmp = x;
} else if (y <= -5.7e-208) {
tmp = a / -b;
} 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 <= (-5.8d+45)) then
tmp = x
else if (y <= (-5.7d-208)) then
tmp = a / -b
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 <= -5.8e+45) {
tmp = x;
} else if (y <= -5.7e-208) {
tmp = a / -b;
} 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 <= -5.8e+45: tmp = x elif y <= -5.7e-208: tmp = a / -b 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 <= -5.8e+45) tmp = x; elseif (y <= -5.7e-208) tmp = Float64(a / Float64(-b)); 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 <= -5.8e+45) tmp = x; elseif (y <= -5.7e-208) tmp = a / -b; 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, -5.8e+45], x, If[LessEqual[y, -5.7e-208], N[(a / (-b)), $MachinePrecision], If[LessEqual[y, 5.8e+37], N[(t / b), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+45}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -5.7 \cdot 10^{-208}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+37}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -5.7999999999999994e45 or 5.79999999999999957e37 < y Initial program 44.3%
Taylor expanded in z around 0 37.6%
if -5.7999999999999994e45 < y < -5.7000000000000004e-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 -5.7000000000000004e-208 < y < 5.79999999999999957e37Initial 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 4.6e-48))) (/ (- 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.6e-160) || !(z <= 4.6e-48)) {
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.6d-160)) .or. (.not. (z <= 4.6d-48))) 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.6e-160) || !(z <= 4.6e-48)) {
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.6e-160) or not (z <= 4.6e-48): 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.6e-160) || !(z <= 4.6e-48)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * t) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.6e-160) || ~((z <= 4.6e-48))) 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.6e-160], N[Not[LessEqual[z, 4.6e-48]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-160} \lor \neg \left(z \leq 4.6 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot t}{y}\\
\end{array}
\end{array}
if z < -1.60000000000000004e-160 or 4.6000000000000001e-48 < z Initial program 55.0%
Taylor expanded in z around inf 75.7%
if -1.60000000000000004e-160 < z < 4.6000000000000001e-48Initial program 86.3%
Taylor expanded in y around inf 85.2%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in z around 0 58.0%
Taylor expanded in a around 0 68.2%
Final simplification73.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.2e+108) (not (<= y 4.6e+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 <= 4.6e+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 <= 4.6d+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 <= 4.6e+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 <= 4.6e+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 <= 4.6e+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 <= 4.6e+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, 4.6e+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 4.6 \cdot 10^{+37}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y}\\
\end{array}
\end{array}
if y < -8.1999999999999998e108 or 4.60000000000000005e37 < 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 < 4.60000000000000005e37Initial 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 -1.35e+46) (not (<= y 5.2e+47))) (/ 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 <= -1.35e+46) || !(y <= 5.2e+47)) {
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 <= (-1.35d+46)) .or. (.not. (y <= 5.2d+47))) 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 <= -1.35e+46) || !(y <= 5.2e+47)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.35e+46) or not (y <= 5.2e+47): 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 <= -1.35e+46) || !(y <= 5.2e+47)) 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 <= -1.35e+46) || ~((y <= 5.2e+47))) 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, -1.35e+46], N[Not[LessEqual[y, 5.2e+47]], $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 -1.35 \cdot 10^{+46} \lor \neg \left(y \leq 5.2 \cdot 10^{+47}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -1.3500000000000001e46 or 5.20000000000000007e47 < y Initial program 43.9%
Taylor expanded in y around inf 47.6%
mul-1-neg47.6%
unsub-neg47.6%
Simplified47.6%
if -1.3500000000000001e46 < y < 5.20000000000000007e47Initial program 78.3%
Taylor expanded in y around 0 52.9%
Final simplification50.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.8e-5) (not (<= b 3.6e-29))) (/ (- t a) b) (/ (- a t) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.8e-5) || !(b <= 3.6e-29)) {
tmp = (t - a) / b;
} else {
tmp = (a - 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 ((b <= (-2.8d-5)) .or. (.not. (b <= 3.6d-29))) then
tmp = (t - a) / b
else
tmp = (a - 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 ((b <= -2.8e-5) || !(b <= 3.6e-29)) {
tmp = (t - a) / b;
} else {
tmp = (a - t) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.8e-5) or not (b <= 3.6e-29): tmp = (t - a) / b else: tmp = (a - t) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.8e-5) || !(b <= 3.6e-29)) tmp = Float64(Float64(t - a) / b); else tmp = Float64(Float64(a - t) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2.8e-5) || ~((b <= 3.6e-29))) tmp = (t - a) / b; else tmp = (a - t) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.8e-5], N[Not[LessEqual[b, 3.6e-29]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.8 \cdot 10^{-5} \lor \neg \left(b \leq 3.6 \cdot 10^{-29}\right):\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{a - t}{y}\\
\end{array}
\end{array}
if b < -2.79999999999999996e-5 or 3.59999999999999974e-29 < b Initial program 62.1%
Taylor expanded in y around 0 52.0%
if -2.79999999999999996e-5 < b < 3.59999999999999974e-29Initial program 69.0%
Taylor expanded in x around inf 65.3%
Taylor expanded in z around inf 44.5%
div-sub45.4%
*-commutative45.4%
Simplified45.4%
Taylor expanded in b around 0 44.7%
associate-*r/44.7%
mul-1-neg44.7%
Simplified44.7%
Final simplification48.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.85e-29) x (if (<= y 6e+37) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.85e-29) {
tmp = x;
} else if (y <= 6e+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.85d-29)) then
tmp = x
else if (y <= 6d+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.85e-29) {
tmp = x;
} else if (y <= 6e+37) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.85e-29: tmp = x elif y <= 6e+37: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.85e-29) tmp = x; elseif (y <= 6e+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.85e-29) tmp = x; elseif (y <= 6e+37) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.85e-29], x, If[LessEqual[y, 6e+37], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{-29}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+37}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.8499999999999999e-29 or 6.00000000000000043e37 < y Initial program 49.7%
Taylor expanded in z around 0 34.7%
if -1.8499999999999999e-29 < y < 6.00000000000000043e37Initial 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)))))