
(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 19 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 (* z (- t a)))
(t_2 (+ y (* z (- b y))))
(t_3 (fma x y t_1))
(t_4 (/ (- (* z (- a t)) (* x y)) (- (* z (- y b)) y)))
(t_5 (/ (- t a) (- b y)))
(t_6
(+
(+ t_5 (* (/ y z) (/ x (- b y))))
(* (/ y z) (/ (- a t) (pow (- b y) 2.0))))))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -2e-267)
(/ t_3 t_2)
(if (<= t_4 0.0)
t_6
(if (<= t_4 1e+299)
(/ t_3 (fma z (- b y) y))
(if (<= t_4 INFINITY)
(* x (+ (/ y t_2) (/ t_1 (* x t_2))))
t_6)))))))
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 = fma(x, y, t_1);
double t_4 = ((z * (a - t)) - (x * y)) / ((z * (y - b)) - y);
double t_5 = (t - a) / (b - y);
double t_6 = (t_5 + ((y / z) * (x / (b - y)))) + ((y / z) * ((a - t) / pow((b - y), 2.0)));
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -2e-267) {
tmp = t_3 / t_2;
} else if (t_4 <= 0.0) {
tmp = t_6;
} else if (t_4 <= 1e+299) {
tmp = t_3 / fma(z, (b - y), y);
} else if (t_4 <= ((double) INFINITY)) {
tmp = x * ((y / t_2) + (t_1 / (x * t_2)));
} else {
tmp = t_6;
}
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 = fma(x, y, t_1) t_4 = Float64(Float64(Float64(z * Float64(a - t)) - Float64(x * y)) / Float64(Float64(z * Float64(y - b)) - y)) t_5 = Float64(Float64(t - a) / Float64(b - y)) t_6 = Float64(Float64(t_5 + Float64(Float64(y / z) * Float64(x / Float64(b - y)))) + Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -2e-267) tmp = Float64(t_3 / t_2); elseif (t_4 <= 0.0) tmp = t_6; elseif (t_4 <= 1e+299) tmp = Float64(t_3 / fma(z, Float64(b - y), y)); elseif (t_4 <= Inf) tmp = Float64(x * Float64(Float64(y / t_2) + Float64(t_1 / Float64(x * t_2)))); else tmp = t_6; end return 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[(x * y + t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(t$95$5 + N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -2e-267], N[(t$95$3 / t$95$2), $MachinePrecision], If[LessEqual[t$95$4, 0.0], t$95$6, If[LessEqual[t$95$4, 1e+299], N[(t$95$3 / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(x * N[(N[(y / t$95$2), $MachinePrecision] + N[(t$95$1 / N[(x * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$6]]]]]]]]]]]
\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 := \mathsf{fma}\left(x, y, t\_1\right)\\
t_4 := \frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}\\
t_5 := \frac{t - a}{b - y}\\
t_6 := \left(t\_5 + \frac{y}{z} \cdot \frac{x}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq -2 \cdot 10^{-267}:\\
\;\;\;\;\frac{t\_3}{t\_2}\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_4 \leq 10^{+299}:\\
\;\;\;\;\frac{t\_3}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_2} + \frac{t\_1}{x \cdot t\_2}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_6\\
\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 41.0%
Taylor expanded in z around inf 80.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-267Initial program 99.5%
fma-define99.5%
Simplified99.5%
if -2e-267 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 9.2%
Taylor expanded in z around inf 52.3%
associate--r+52.3%
+-commutative52.3%
associate--l+52.3%
*-commutative52.3%
times-frac62.6%
div-sub62.6%
times-frac99.8%
Simplified99.8%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.0000000000000001e299Initial program 99.7%
fma-define99.7%
+-commutative99.7%
fma-define99.7%
Simplified99.7%
if 1.0000000000000001e299 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 29.5%
Taylor expanded in x around inf 72.6%
Final simplification94.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ y (* z (- b y))))
(t_3 (/ (fma x y t_1) t_2))
(t_4 (/ (- (* z (- a t)) (* x y)) (- (* z (- y b)) y)))
(t_5 (/ (- t a) (- b y)))
(t_6
(+
(+ t_5 (* (/ y z) (/ x (- b y))))
(* (/ y z) (/ (- a t) (pow (- b y) 2.0))))))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -2e-267)
t_3
(if (<= t_4 0.0)
t_6
(if (<= t_4 1e+299)
t_3
(if (<= t_4 INFINITY)
(* x (+ (/ y t_2) (/ t_1 (* x t_2))))
t_6)))))))
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 = fma(x, y, t_1) / t_2;
double t_4 = ((z * (a - t)) - (x * y)) / ((z * (y - b)) - y);
double t_5 = (t - a) / (b - y);
double t_6 = (t_5 + ((y / z) * (x / (b - y)))) + ((y / z) * ((a - t) / pow((b - y), 2.0)));
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -2e-267) {
tmp = t_3;
} else if (t_4 <= 0.0) {
tmp = t_6;
} else if (t_4 <= 1e+299) {
tmp = t_3;
} else if (t_4 <= ((double) INFINITY)) {
tmp = x * ((y / t_2) + (t_1 / (x * t_2)));
} else {
tmp = t_6;
}
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(fma(x, y, t_1) / t_2) t_4 = Float64(Float64(Float64(z * Float64(a - t)) - Float64(x * y)) / Float64(Float64(z * Float64(y - b)) - y)) t_5 = Float64(Float64(t - a) / Float64(b - y)) t_6 = Float64(Float64(t_5 + Float64(Float64(y / z) * Float64(x / Float64(b - y)))) + Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -2e-267) tmp = t_3; elseif (t_4 <= 0.0) tmp = t_6; elseif (t_4 <= 1e+299) tmp = t_3; elseif (t_4 <= Inf) tmp = Float64(x * Float64(Float64(y / t_2) + Float64(t_1 / Float64(x * t_2)))); else tmp = t_6; end return 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[(x * y + t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(t$95$5 + N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -2e-267], t$95$3, If[LessEqual[t$95$4, 0.0], t$95$6, If[LessEqual[t$95$4, 1e+299], t$95$3, If[LessEqual[t$95$4, Infinity], N[(x * N[(N[(y / t$95$2), $MachinePrecision] + N[(t$95$1 / N[(x * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$6]]]]]]]]]]]
\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{\mathsf{fma}\left(x, y, t\_1\right)}{t\_2}\\
t_4 := \frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}\\
t_5 := \frac{t - a}{b - y}\\
t_6 := \left(t\_5 + \frac{y}{z} \cdot \frac{x}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq -2 \cdot 10^{-267}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_4 \leq 10^{+299}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_2} + \frac{t\_1}{x \cdot t\_2}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_6\\
\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 41.0%
Taylor expanded in z around inf 80.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-267 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.0000000000000001e299Initial program 99.6%
fma-define99.6%
Simplified99.6%
if -2e-267 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 9.2%
Taylor expanded in z around inf 52.3%
associate--r+52.3%
+-commutative52.3%
associate--l+52.3%
*-commutative52.3%
times-frac62.6%
div-sub62.6%
times-frac99.8%
Simplified99.8%
if 1.0000000000000001e299 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 29.5%
Taylor expanded in x around inf 72.6%
Final simplification94.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))))
(if (or (<= z -2.15e+105) (not (<= z 0.027)))
(/ (- t a) (- b y))
(* x (+ (/ y t_1) (/ (* z (- t a)) (* x t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if ((z <= -2.15e+105) || !(z <= 0.027)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * 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 = y + (z * (b - y))
if ((z <= (-2.15d+105)) .or. (.not. (z <= 0.027d0))) then
tmp = (t - a) / (b - y)
else
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * 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 = y + (z * (b - y));
double tmp;
if ((z <= -2.15e+105) || !(z <= 0.027)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) tmp = 0 if (z <= -2.15e+105) or not (z <= 0.027): tmp = (t - a) / (b - y) else: tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if ((z <= -2.15e+105) || !(z <= 0.027)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); tmp = 0.0; if ((z <= -2.15e+105) || ~((z <= 0.027))) tmp = (t - a) / (b - y); else tmp = x * ((y / t_1) + ((z * (t - a)) / (x * 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]}, If[Or[LessEqual[z, -2.15e+105], N[Not[LessEqual[z, 0.027]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -2.15 \cdot 10^{+105} \lor \neg \left(z \leq 0.027\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_1}\right)\\
\end{array}
\end{array}
if z < -2.1500000000000001e105 or 0.0269999999999999997 < z Initial program 44.3%
Taylor expanded in z around inf 84.9%
if -2.1500000000000001e105 < z < 0.0269999999999999997Initial program 84.8%
Taylor expanded in x around inf 89.6%
Final simplification87.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -2.55e+14)
t_1
(if (<= y -3.4e-62)
(/ a (- y b))
(if (<= y -8.2e-72)
(/ (* x y) y)
(if (<= y 3.9e-30)
(/ (- t a) b)
(if (or (<= y 4.5e+200) (not (<= y 2.5e+220)))
t_1
(/ (- a t) y))))))))
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 <= -2.55e+14) {
tmp = t_1;
} else if (y <= -3.4e-62) {
tmp = a / (y - b);
} else if (y <= -8.2e-72) {
tmp = (x * y) / y;
} else if (y <= 3.9e-30) {
tmp = (t - a) / b;
} else if ((y <= 4.5e+200) || !(y <= 2.5e+220)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-2.55d+14)) then
tmp = t_1
else if (y <= (-3.4d-62)) then
tmp = a / (y - b)
else if (y <= (-8.2d-72)) then
tmp = (x * y) / y
else if (y <= 3.9d-30) then
tmp = (t - a) / b
else if ((y <= 4.5d+200) .or. (.not. (y <= 2.5d+220))) then
tmp = t_1
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 t_1 = x / (1.0 - z);
double tmp;
if (y <= -2.55e+14) {
tmp = t_1;
} else if (y <= -3.4e-62) {
tmp = a / (y - b);
} else if (y <= -8.2e-72) {
tmp = (x * y) / y;
} else if (y <= 3.9e-30) {
tmp = (t - a) / b;
} else if ((y <= 4.5e+200) || !(y <= 2.5e+220)) {
tmp = t_1;
} else {
tmp = (a - t) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -2.55e+14: tmp = t_1 elif y <= -3.4e-62: tmp = a / (y - b) elif y <= -8.2e-72: tmp = (x * y) / y elif y <= 3.9e-30: tmp = (t - a) / b elif (y <= 4.5e+200) or not (y <= 2.5e+220): tmp = t_1 else: tmp = (a - t) / y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -2.55e+14) tmp = t_1; elseif (y <= -3.4e-62) tmp = Float64(a / Float64(y - b)); elseif (y <= -8.2e-72) tmp = Float64(Float64(x * y) / y); elseif (y <= 3.9e-30) tmp = Float64(Float64(t - a) / b); elseif ((y <= 4.5e+200) || !(y <= 2.5e+220)) tmp = t_1; else tmp = Float64(Float64(a - t) / y); 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 <= -2.55e+14) tmp = t_1; elseif (y <= -3.4e-62) tmp = a / (y - b); elseif (y <= -8.2e-72) tmp = (x * y) / y; elseif (y <= 3.9e-30) tmp = (t - a) / b; elseif ((y <= 4.5e+200) || ~((y <= 2.5e+220))) tmp = t_1; else tmp = (a - t) / y; 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, -2.55e+14], t$95$1, If[LessEqual[y, -3.4e-62], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8.2e-72], N[(N[(x * y), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 3.9e-30], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[Or[LessEqual[y, 4.5e+200], N[Not[LessEqual[y, 2.5e+220]], $MachinePrecision]], t$95$1, N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.55 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-62}:\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{elif}\;y \leq -8.2 \cdot 10^{-72}:\\
\;\;\;\;\frac{x \cdot y}{y}\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{-30}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+200} \lor \neg \left(y \leq 2.5 \cdot 10^{+220}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{a - t}{y}\\
\end{array}
\end{array}
if y < -2.55e14 or 3.9000000000000003e-30 < y < 4.49999999999999969e200 or 2.5000000000000001e220 < y Initial program 50.4%
Taylor expanded in y around inf 55.9%
mul-1-neg55.9%
unsub-neg55.9%
Simplified55.9%
if -2.55e14 < y < -3.39999999999999988e-62Initial program 71.6%
Taylor expanded in t around 0 53.5%
+-commutative53.5%
mul-1-neg53.5%
unsub-neg53.5%
*-commutative53.5%
*-commutative53.5%
Simplified53.5%
Taylor expanded in z around inf 52.0%
associate-*r/52.0%
mul-1-neg52.0%
Simplified52.0%
if -3.39999999999999988e-62 < y < -8.20000000000000007e-72Initial program 69.7%
Taylor expanded in x around inf 67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in z around 0 67.2%
if -8.20000000000000007e-72 < y < 3.9000000000000003e-30Initial program 82.9%
Taylor expanded in y around 0 67.9%
if 4.49999999999999969e200 < y < 2.5000000000000001e220Initial program 46.3%
Taylor expanded in z around inf 63.1%
Taylor expanded in b around 0 63.1%
associate-*r/63.1%
mul-1-neg63.1%
Simplified63.1%
Final simplification61.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (* x y) (* z a)) (+ y (* z (- b y)))))
(t_2 (/ (- t a) (- b y))))
(if (<= z -5.8e-49)
t_2
(if (<= z -2.1e-183)
t_1
(if (<= z 2e-233) (/ x (- 1.0 z)) (if (<= z 0.027) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) - (z * a)) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -5.8e-49) {
tmp = t_2;
} else if (z <= -2.1e-183) {
tmp = t_1;
} else if (z <= 2e-233) {
tmp = x / (1.0 - z);
} else if (z <= 0.027) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * y) - (z * a)) / (y + (z * (b - y)))
t_2 = (t - a) / (b - y)
if (z <= (-5.8d-49)) then
tmp = t_2
else if (z <= (-2.1d-183)) then
tmp = t_1
else if (z <= 2d-233) then
tmp = x / (1.0d0 - z)
else if (z <= 0.027d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) - (z * a)) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -5.8e-49) {
tmp = t_2;
} else if (z <= -2.1e-183) {
tmp = t_1;
} else if (z <= 2e-233) {
tmp = x / (1.0 - z);
} else if (z <= 0.027) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) - (z * a)) / (y + (z * (b - y))) t_2 = (t - a) / (b - y) tmp = 0 if z <= -5.8e-49: tmp = t_2 elif z <= -2.1e-183: tmp = t_1 elif z <= 2e-233: tmp = x / (1.0 - z) elif z <= 0.027: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * y) - Float64(z * a)) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -5.8e-49) tmp = t_2; elseif (z <= -2.1e-183) tmp = t_1; elseif (z <= 2e-233) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= 0.027) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x * y) - (z * a)) / (y + (z * (b - y))); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -5.8e-49) tmp = t_2; elseif (z <= -2.1e-183) tmp = t_1; elseif (z <= 2e-233) tmp = x / (1.0 - z); elseif (z <= 0.027) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e-49], t$95$2, If[LessEqual[z, -2.1e-183], t$95$1, If[LessEqual[z, 2e-233], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.027], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y - z \cdot a}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{-49}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-183}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-233}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq 0.027:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -5.8e-49 or 0.0269999999999999997 < z Initial program 51.4%
Taylor expanded in z around inf 80.3%
if -5.8e-49 < z < -2.1000000000000002e-183 or 1.99999999999999992e-233 < z < 0.0269999999999999997Initial program 93.5%
Taylor expanded in t around 0 73.2%
+-commutative73.2%
mul-1-neg73.2%
unsub-neg73.2%
*-commutative73.2%
*-commutative73.2%
Simplified73.2%
if -2.1000000000000002e-183 < z < 1.99999999999999992e-233Initial program 76.6%
Taylor expanded in y around inf 76.8%
mul-1-neg76.8%
unsub-neg76.8%
Simplified76.8%
Final simplification78.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.1e-52)
t_1
(if (<= z -6.8e-191)
(/ (* y (+ x (* z (/ (- t a) y)))) y)
(if (<= z 7e-227)
(/ x (- 1.0 z))
(if (<= z 8.6e-20) (/ (+ (* z (- t a)) (* x y)) 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 <= -2.1e-52) {
tmp = t_1;
} else if (z <= -6.8e-191) {
tmp = (y * (x + (z * ((t - a) / y)))) / y;
} else if (z <= 7e-227) {
tmp = x / (1.0 - z);
} else if (z <= 8.6e-20) {
tmp = ((z * (t - a)) + (x * y)) / 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 <= (-2.1d-52)) then
tmp = t_1
else if (z <= (-6.8d-191)) then
tmp = (y * (x + (z * ((t - a) / y)))) / y
else if (z <= 7d-227) then
tmp = x / (1.0d0 - z)
else if (z <= 8.6d-20) then
tmp = ((z * (t - a)) + (x * y)) / 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 <= -2.1e-52) {
tmp = t_1;
} else if (z <= -6.8e-191) {
tmp = (y * (x + (z * ((t - a) / y)))) / y;
} else if (z <= 7e-227) {
tmp = x / (1.0 - z);
} else if (z <= 8.6e-20) {
tmp = ((z * (t - a)) + (x * y)) / 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 <= -2.1e-52: tmp = t_1 elif z <= -6.8e-191: tmp = (y * (x + (z * ((t - a) / y)))) / y elif z <= 7e-227: tmp = x / (1.0 - z) elif z <= 8.6e-20: tmp = ((z * (t - a)) + (x * y)) / 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 <= -2.1e-52) tmp = t_1; elseif (z <= -6.8e-191) tmp = Float64(Float64(y * Float64(x + Float64(z * Float64(Float64(t - a) / y)))) / y); elseif (z <= 7e-227) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= 8.6e-20) tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / 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 <= -2.1e-52) tmp = t_1; elseif (z <= -6.8e-191) tmp = (y * (x + (z * ((t - a) / y)))) / y; elseif (z <= 7e-227) tmp = x / (1.0 - z); elseif (z <= 8.6e-20) tmp = ((z * (t - a)) + (x * y)) / 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, -2.1e-52], t$95$1, If[LessEqual[z, -6.8e-191], N[(N[(y * N[(x + N[(z * N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 7e-227], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.6e-20], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-191}:\\
\;\;\;\;\frac{y \cdot \left(x + z \cdot \frac{t - a}{y}\right)}{y}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-227}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{-20}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.0999999999999999e-52 or 8.60000000000000022e-20 < z Initial program 52.6%
Taylor expanded in z around inf 79.2%
if -2.0999999999999999e-52 < z < -6.79999999999999988e-191Initial program 90.8%
Taylor expanded in y around inf 86.3%
associate-/l*81.9%
Simplified81.9%
Taylor expanded in z around 0 77.0%
if -6.79999999999999988e-191 < z < 7.0000000000000002e-227Initial program 75.3%
Taylor expanded in y around inf 78.1%
mul-1-neg78.1%
unsub-neg78.1%
Simplified78.1%
if 7.0000000000000002e-227 < z < 8.60000000000000022e-20Initial program 97.0%
Taylor expanded in z around 0 61.5%
Final simplification76.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* z (- t a)) (* x y)) y)) (t_2 (/ (- t a) (- b y))))
(if (<= z -1.7e-49)
t_2
(if (<= z -9e-191)
t_1
(if (<= z 4.2e-233) (/ x (- 1.0 z)) (if (<= z 7e-20) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * (t - a)) + (x * y)) / y;
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.7e-49) {
tmp = t_2;
} else if (z <= -9e-191) {
tmp = t_1;
} else if (z <= 4.2e-233) {
tmp = x / (1.0 - z);
} else if (z <= 7e-20) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((z * (t - a)) + (x * y)) / y
t_2 = (t - a) / (b - y)
if (z <= (-1.7d-49)) then
tmp = t_2
else if (z <= (-9d-191)) then
tmp = t_1
else if (z <= 4.2d-233) then
tmp = x / (1.0d0 - z)
else if (z <= 7d-20) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * (t - a)) + (x * y)) / y;
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.7e-49) {
tmp = t_2;
} else if (z <= -9e-191) {
tmp = t_1;
} else if (z <= 4.2e-233) {
tmp = x / (1.0 - z);
} else if (z <= 7e-20) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((z * (t - a)) + (x * y)) / y t_2 = (t - a) / (b - y) tmp = 0 if z <= -1.7e-49: tmp = t_2 elif z <= -9e-191: tmp = t_1 elif z <= 4.2e-233: tmp = x / (1.0 - z) elif z <= 7e-20: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / y) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.7e-49) tmp = t_2; elseif (z <= -9e-191) tmp = t_1; elseif (z <= 4.2e-233) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= 7e-20) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((z * (t - a)) + (x * y)) / y; t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.7e-49) tmp = t_2; elseif (z <= -9e-191) tmp = t_1; elseif (z <= 4.2e-233) tmp = x / (1.0 - z); elseif (z <= 7e-20) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.7e-49], t$95$2, If[LessEqual[z, -9e-191], t$95$1, If[LessEqual[z, 4.2e-233], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-20], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(t - a\right) + x \cdot y}{y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.7 \cdot 10^{-49}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-191}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-233}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.70000000000000002e-49 or 7.00000000000000007e-20 < z Initial program 52.6%
Taylor expanded in z around inf 79.2%
if -1.70000000000000002e-49 < z < -9.00000000000000017e-191 or 4.1999999999999997e-233 < z < 7.00000000000000007e-20Initial program 94.7%
Taylor expanded in z around 0 67.2%
if -9.00000000000000017e-191 < z < 4.1999999999999997e-233Initial program 75.3%
Taylor expanded in y around inf 78.1%
mul-1-neg78.1%
unsub-neg78.1%
Simplified78.1%
Final simplification76.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2e+106) (not (<= z 1e+77))) (/ (- t a) (- b y)) (/ (- (* z (- a t)) (* x y)) (- (* z (- y b)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2e+106) || !(z <= 1e+77)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (a - t)) - (x * y)) / ((z * (y - 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 <= (-2d+106)) .or. (.not. (z <= 1d+77))) then
tmp = (t - a) / (b - y)
else
tmp = ((z * (a - t)) - (x * y)) / ((z * (y - 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 <= -2e+106) || !(z <= 1e+77)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (a - t)) - (x * y)) / ((z * (y - b)) - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2e+106) or not (z <= 1e+77): tmp = (t - a) / (b - y) else: tmp = ((z * (a - t)) - (x * y)) / ((z * (y - b)) - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2e+106) || !(z <= 1e+77)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(z * Float64(a - t)) - Float64(x * y)) / Float64(Float64(z * Float64(y - b)) - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2e+106) || ~((z <= 1e+77))) tmp = (t - a) / (b - y); else tmp = ((z * (a - t)) - (x * y)) / ((z * (y - b)) - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2e+106], N[Not[LessEqual[z, 1e+77]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+106} \lor \neg \left(z \leq 10^{+77}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(a - t\right) - x \cdot y}{z \cdot \left(y - b\right) - y}\\
\end{array}
\end{array}
if z < -2.00000000000000018e106 or 9.99999999999999983e76 < z Initial program 36.6%
Taylor expanded in z around inf 84.4%
if -2.00000000000000018e106 < z < 9.99999999999999983e76Initial program 85.4%
Final simplification84.9%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -1.6e+33)
(not (or (<= z -4.2e-10) (and (not (<= z -3e-68)) (<= z 0.00195)))))
(/ t (- b y))
(/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.6e+33) || !((z <= -4.2e-10) || (!(z <= -3e-68) && (z <= 0.00195)))) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.6d+33)) .or. (.not. (z <= (-4.2d-10)) .or. (.not. (z <= (-3d-68))) .and. (z <= 0.00195d0))) then
tmp = t / (b - y)
else
tmp = x / (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.6e+33) || !((z <= -4.2e-10) || (!(z <= -3e-68) && (z <= 0.00195)))) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.6e+33) or not ((z <= -4.2e-10) or (not (z <= -3e-68) and (z <= 0.00195))): tmp = t / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.6e+33) || !((z <= -4.2e-10) || (!(z <= -3e-68) && (z <= 0.00195)))) tmp = Float64(t / Float64(b - y)); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.6e+33) || ~(((z <= -4.2e-10) || (~((z <= -3e-68)) && (z <= 0.00195))))) tmp = t / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.6e+33], N[Not[Or[LessEqual[z, -4.2e-10], And[N[Not[LessEqual[z, -3e-68]], $MachinePrecision], LessEqual[z, 0.00195]]]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+33} \lor \neg \left(z \leq -4.2 \cdot 10^{-10} \lor \neg \left(z \leq -3 \cdot 10^{-68}\right) \land z \leq 0.00195\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -1.60000000000000009e33 or -4.2e-10 < z < -3e-68 or 0.0019499999999999999 < z Initial program 51.4%
Taylor expanded in z around inf 81.8%
Taylor expanded in t around inf 46.4%
if -1.60000000000000009e33 < z < -4.2e-10 or -3e-68 < z < 0.0019499999999999999Initial program 85.4%
Taylor expanded in y around inf 57.2%
mul-1-neg57.2%
unsub-neg57.2%
Simplified57.2%
Final simplification50.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -6.5e+16)
t_1
(if (<= y -3.3e-62)
(/ a (- y b))
(if (<= y -8.2e-72)
(/ (* x y) y)
(if (<= y 7e-30) (/ (- 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 <= -6.5e+16) {
tmp = t_1;
} else if (y <= -3.3e-62) {
tmp = a / (y - b);
} else if (y <= -8.2e-72) {
tmp = (x * y) / y;
} else if (y <= 7e-30) {
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 <= (-6.5d+16)) then
tmp = t_1
else if (y <= (-3.3d-62)) then
tmp = a / (y - b)
else if (y <= (-8.2d-72)) then
tmp = (x * y) / y
else if (y <= 7d-30) 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 <= -6.5e+16) {
tmp = t_1;
} else if (y <= -3.3e-62) {
tmp = a / (y - b);
} else if (y <= -8.2e-72) {
tmp = (x * y) / y;
} else if (y <= 7e-30) {
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 <= -6.5e+16: tmp = t_1 elif y <= -3.3e-62: tmp = a / (y - b) elif y <= -8.2e-72: tmp = (x * y) / y elif y <= 7e-30: 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 <= -6.5e+16) tmp = t_1; elseif (y <= -3.3e-62) tmp = Float64(a / Float64(y - b)); elseif (y <= -8.2e-72) tmp = Float64(Float64(x * y) / y); elseif (y <= 7e-30) 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 <= -6.5e+16) tmp = t_1; elseif (y <= -3.3e-62) tmp = a / (y - b); elseif (y <= -8.2e-72) tmp = (x * y) / y; elseif (y <= 7e-30) 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, -6.5e+16], t$95$1, If[LessEqual[y, -3.3e-62], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8.2e-72], N[(N[(x * y), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 7e-30], 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 -6.5 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.3 \cdot 10^{-62}:\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{elif}\;y \leq -8.2 \cdot 10^{-72}:\\
\;\;\;\;\frac{x \cdot y}{y}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-30}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.5e16 or 7.0000000000000006e-30 < y Initial program 50.1%
Taylor expanded in y around inf 53.0%
mul-1-neg53.0%
unsub-neg53.0%
Simplified53.0%
if -6.5e16 < y < -3.30000000000000004e-62Initial program 71.6%
Taylor expanded in t around 0 53.5%
+-commutative53.5%
mul-1-neg53.5%
unsub-neg53.5%
*-commutative53.5%
*-commutative53.5%
Simplified53.5%
Taylor expanded in z around inf 52.0%
associate-*r/52.0%
mul-1-neg52.0%
Simplified52.0%
if -3.30000000000000004e-62 < y < -8.20000000000000007e-72Initial program 69.7%
Taylor expanded in x around inf 67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in z around 0 67.2%
if -8.20000000000000007e-72 < y < 7.0000000000000006e-30Initial program 82.9%
Taylor expanded in y around 0 67.9%
Final simplification59.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a) b)))
(if (<= z -1.8e+186)
t_1
(if (<= z -6.5e+54)
(/ t b)
(if (or (<= z -1.25e-39) (not (<= z 5.4e-91))) t_1 x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (z <= -1.8e+186) {
tmp = t_1;
} else if (z <= -6.5e+54) {
tmp = t / b;
} else if ((z <= -1.25e-39) || !(z <= 5.4e-91)) {
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 = -a / b
if (z <= (-1.8d+186)) then
tmp = t_1
else if (z <= (-6.5d+54)) then
tmp = t / b
else if ((z <= (-1.25d-39)) .or. (.not. (z <= 5.4d-91))) 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 = -a / b;
double tmp;
if (z <= -1.8e+186) {
tmp = t_1;
} else if (z <= -6.5e+54) {
tmp = t / b;
} else if ((z <= -1.25e-39) || !(z <= 5.4e-91)) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a / b tmp = 0 if z <= -1.8e+186: tmp = t_1 elif z <= -6.5e+54: tmp = t / b elif (z <= -1.25e-39) or not (z <= 5.4e-91): tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) / b) tmp = 0.0 if (z <= -1.8e+186) tmp = t_1; elseif (z <= -6.5e+54) tmp = Float64(t / b); elseif ((z <= -1.25e-39) || !(z <= 5.4e-91)) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -a / b; tmp = 0.0; if (z <= -1.8e+186) tmp = t_1; elseif (z <= -6.5e+54) tmp = t / b; elseif ((z <= -1.25e-39) || ~((z <= 5.4e-91))) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) / b), $MachinePrecision]}, If[LessEqual[z, -1.8e+186], t$95$1, If[LessEqual[z, -6.5e+54], N[(t / b), $MachinePrecision], If[Or[LessEqual[z, -1.25e-39], N[Not[LessEqual[z, 5.4e-91]], $MachinePrecision]], t$95$1, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-a}{b}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{+54}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-39} \lor \neg \left(z \leq 5.4 \cdot 10^{-91}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.8000000000000001e186 or -6.5e54 < z < -1.25e-39 or 5.3999999999999995e-91 < z Initial program 54.8%
Taylor expanded in t around 0 37.9%
+-commutative37.9%
mul-1-neg37.9%
unsub-neg37.9%
*-commutative37.9%
*-commutative37.9%
Simplified37.9%
Taylor expanded in y around 0 30.3%
associate-*r/30.3%
mul-1-neg30.3%
Simplified30.3%
if -1.8000000000000001e186 < z < -6.5e54Initial program 65.3%
Taylor expanded in y around inf 56.4%
associate-/l*56.4%
Simplified56.4%
Taylor expanded in b around inf 15.9%
associate-/l*15.3%
associate-/l*15.3%
*-commutative15.3%
Simplified15.3%
Taylor expanded in t around inf 24.3%
if -1.25e-39 < z < 5.3999999999999995e-91Initial program 83.8%
Taylor expanded in z around 0 62.7%
Final simplification40.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a) b)))
(if (<= z -2.8e+185)
t_1
(if (<= z -0.76) (/ x (- z)) (if (<= z 1.3e-90) (+ x (* x z)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (z <= -2.8e+185) {
tmp = t_1;
} else if (z <= -0.76) {
tmp = x / -z;
} else if (z <= 1.3e-90) {
tmp = x + (x * z);
} 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 = -a / b
if (z <= (-2.8d+185)) then
tmp = t_1
else if (z <= (-0.76d0)) then
tmp = x / -z
else if (z <= 1.3d-90) then
tmp = x + (x * z)
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 = -a / b;
double tmp;
if (z <= -2.8e+185) {
tmp = t_1;
} else if (z <= -0.76) {
tmp = x / -z;
} else if (z <= 1.3e-90) {
tmp = x + (x * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a / b tmp = 0 if z <= -2.8e+185: tmp = t_1 elif z <= -0.76: tmp = x / -z elif z <= 1.3e-90: tmp = x + (x * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) / b) tmp = 0.0 if (z <= -2.8e+185) tmp = t_1; elseif (z <= -0.76) tmp = Float64(x / Float64(-z)); elseif (z <= 1.3e-90) tmp = Float64(x + Float64(x * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -a / b; tmp = 0.0; if (z <= -2.8e+185) tmp = t_1; elseif (z <= -0.76) tmp = x / -z; elseif (z <= 1.3e-90) tmp = x + (x * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) / b), $MachinePrecision]}, If[LessEqual[z, -2.8e+185], t$95$1, If[LessEqual[z, -0.76], N[(x / (-z)), $MachinePrecision], If[LessEqual[z, 1.3e-90], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-a}{b}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+185}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -0.76:\\
\;\;\;\;\frac{x}{-z}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-90}:\\
\;\;\;\;x + x \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.79999999999999982e185 or 1.3e-90 < z Initial program 51.0%
Taylor expanded in t around 0 36.2%
+-commutative36.2%
mul-1-neg36.2%
unsub-neg36.2%
*-commutative36.2%
*-commutative36.2%
Simplified36.2%
Taylor expanded in y around 0 30.4%
associate-*r/30.4%
mul-1-neg30.4%
Simplified30.4%
if -2.79999999999999982e185 < z < -0.76000000000000001Initial program 65.3%
Taylor expanded in x around inf 17.9%
*-commutative17.9%
Simplified17.9%
Taylor expanded in b around 0 13.4%
mul-1-neg13.4%
distribute-lft-neg-out13.4%
*-commutative13.4%
Simplified13.4%
Taylor expanded in z around inf 31.7%
associate-*r/31.7%
mul-1-neg31.7%
Simplified31.7%
if -0.76000000000000001 < z < 1.3e-90Initial program 85.2%
Taylor expanded in t around 0 66.1%
+-commutative66.1%
mul-1-neg66.1%
unsub-neg66.1%
*-commutative66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in z around 0 53.4%
associate-*r/53.4%
mul-1-neg53.4%
*-commutative53.4%
Simplified53.4%
Taylor expanded in y around inf 57.9%
*-commutative57.9%
Simplified57.9%
Final simplification40.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a) b)))
(if (<= z -2.9e+186)
t_1
(if (<= z -0.75) (/ x (- z)) (if (<= z 7.2e-91) (+ x (* x z)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (z <= -2.9e+186) {
tmp = t_1;
} else if (z <= -0.75) {
tmp = x / -z;
} else if (z <= 7.2e-91) {
tmp = x + (x * z);
} 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 = -a / b
if (z <= (-2.9d+186)) then
tmp = t_1
else if (z <= (-0.75d0)) then
tmp = x / -z
else if (z <= 7.2d-91) then
tmp = x + (x * z)
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 = -a / b;
double tmp;
if (z <= -2.9e+186) {
tmp = t_1;
} else if (z <= -0.75) {
tmp = x / -z;
} else if (z <= 7.2e-91) {
tmp = x + (x * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a / b tmp = 0 if z <= -2.9e+186: tmp = t_1 elif z <= -0.75: tmp = x / -z elif z <= 7.2e-91: tmp = x + (x * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) / b) tmp = 0.0 if (z <= -2.9e+186) tmp = t_1; elseif (z <= -0.75) tmp = Float64(x / Float64(-z)); elseif (z <= 7.2e-91) tmp = Float64(x + Float64(x * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -a / b; tmp = 0.0; if (z <= -2.9e+186) tmp = t_1; elseif (z <= -0.75) tmp = x / -z; elseif (z <= 7.2e-91) tmp = x + (x * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) / b), $MachinePrecision]}, If[LessEqual[z, -2.9e+186], t$95$1, If[LessEqual[z, -0.75], N[(x / (-z)), $MachinePrecision], If[LessEqual[z, 7.2e-91], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-a}{b}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -0.75:\\
\;\;\;\;\frac{x}{-z}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-91}:\\
\;\;\;\;x + x \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.9e186 or 7.2000000000000001e-91 < z Initial program 51.0%
Taylor expanded in t around 0 36.2%
+-commutative36.2%
mul-1-neg36.2%
unsub-neg36.2%
*-commutative36.2%
*-commutative36.2%
Simplified36.2%
Taylor expanded in y around 0 30.4%
associate-*r/30.4%
mul-1-neg30.4%
Simplified30.4%
if -2.9e186 < z < -0.75Initial program 65.3%
Taylor expanded in x around inf 17.9%
*-commutative17.9%
Simplified17.9%
Taylor expanded in b around 0 13.4%
mul-1-neg13.4%
distribute-lft-neg-out13.4%
*-commutative13.4%
Simplified13.4%
Taylor expanded in z around inf 31.7%
associate-*r/31.7%
mul-1-neg31.7%
Simplified31.7%
if -0.75 < z < 7.2000000000000001e-91Initial program 85.2%
Taylor expanded in x around inf 47.8%
*-commutative47.8%
Simplified47.8%
Taylor expanded in b around 0 44.9%
mul-1-neg44.9%
distribute-lft-neg-out44.9%
*-commutative44.9%
Simplified44.9%
Taylor expanded in z around 0 57.9%
Final simplification40.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a) b)))
(if (<= z -3.9e+182)
t_1
(if (<= z -1.0) (/ x (- z)) (if (<= z 1.3e-90) x t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (z <= -3.9e+182) {
tmp = t_1;
} else if (z <= -1.0) {
tmp = x / -z;
} else if (z <= 1.3e-90) {
tmp = x;
} 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 = -a / b
if (z <= (-3.9d+182)) then
tmp = t_1
else if (z <= (-1.0d0)) then
tmp = x / -z
else if (z <= 1.3d-90) then
tmp = x
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 = -a / b;
double tmp;
if (z <= -3.9e+182) {
tmp = t_1;
} else if (z <= -1.0) {
tmp = x / -z;
} else if (z <= 1.3e-90) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a / b tmp = 0 if z <= -3.9e+182: tmp = t_1 elif z <= -1.0: tmp = x / -z elif z <= 1.3e-90: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) / b) tmp = 0.0 if (z <= -3.9e+182) tmp = t_1; elseif (z <= -1.0) tmp = Float64(x / Float64(-z)); elseif (z <= 1.3e-90) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -a / b; tmp = 0.0; if (z <= -3.9e+182) tmp = t_1; elseif (z <= -1.0) tmp = x / -z; elseif (z <= 1.3e-90) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) / b), $MachinePrecision]}, If[LessEqual[z, -3.9e+182], t$95$1, If[LessEqual[z, -1.0], N[(x / (-z)), $MachinePrecision], If[LessEqual[z, 1.3e-90], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-a}{b}\\
\mathbf{if}\;z \leq -3.9 \cdot 10^{+182}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1:\\
\;\;\;\;\frac{x}{-z}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-90}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.8999999999999999e182 or 1.3e-90 < z Initial program 51.0%
Taylor expanded in t around 0 36.2%
+-commutative36.2%
mul-1-neg36.2%
unsub-neg36.2%
*-commutative36.2%
*-commutative36.2%
Simplified36.2%
Taylor expanded in y around 0 30.4%
associate-*r/30.4%
mul-1-neg30.4%
Simplified30.4%
if -3.8999999999999999e182 < z < -1Initial program 65.3%
Taylor expanded in x around inf 17.9%
*-commutative17.9%
Simplified17.9%
Taylor expanded in b around 0 13.4%
mul-1-neg13.4%
distribute-lft-neg-out13.4%
*-commutative13.4%
Simplified13.4%
Taylor expanded in z around inf 31.7%
associate-*r/31.7%
mul-1-neg31.7%
Simplified31.7%
if -1 < z < 1.3e-90Initial program 85.2%
Taylor expanded in z around 0 57.7%
Final simplification40.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.2e-70) (not (<= z 1.3e-90))) (/ (- t a) (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.2e-70) || !(z <= 1.3e-90)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3.2d-70)) .or. (.not. (z <= 1.3d-90))) then
tmp = (t - a) / (b - y)
else
tmp = x / (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.2e-70) || !(z <= 1.3e-90)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.2e-70) or not (z <= 1.3e-90): tmp = (t - a) / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.2e-70) || !(z <= 1.3e-90)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.2e-70) || ~((z <= 1.3e-90))) tmp = (t - a) / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.2e-70], N[Not[LessEqual[z, 1.3e-90]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{-70} \lor \neg \left(z \leq 1.3 \cdot 10^{-90}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -3.1999999999999997e-70 or 1.3e-90 < z Initial program 57.4%
Taylor expanded in z around inf 75.4%
if -3.1999999999999997e-70 < z < 1.3e-90Initial program 84.0%
Taylor expanded in y around inf 64.1%
mul-1-neg64.1%
unsub-neg64.1%
Simplified64.1%
Final simplification72.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.2e-72) (not (<= y 3.1e-32))) (/ 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 <= -8.2e-72) || !(y <= 3.1e-32)) {
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 <= (-8.2d-72)) .or. (.not. (y <= 3.1d-32))) 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 <= -8.2e-72) || !(y <= 3.1e-32)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8.2e-72) or not (y <= 3.1e-32): 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 <= -8.2e-72) || !(y <= 3.1e-32)) 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 <= -8.2e-72) || ~((y <= 3.1e-32))) 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, -8.2e-72], N[Not[LessEqual[y, 3.1e-32]], $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 -8.2 \cdot 10^{-72} \lor \neg \left(y \leq 3.1 \cdot 10^{-32}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -8.20000000000000007e-72 or 3.10000000000000011e-32 < y Initial program 52.8%
Taylor expanded in y around inf 50.3%
mul-1-neg50.3%
unsub-neg50.3%
Simplified50.3%
if -8.20000000000000007e-72 < y < 3.10000000000000011e-32Initial program 82.9%
Taylor expanded in y around 0 67.9%
Final simplification57.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.55e-69) (not (<= z 2.75e-43))) (/ t (- b y)) (+ x (* x z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.55e-69) || !(z <= 2.75e-43)) {
tmp = t / (b - y);
} else {
tmp = x + (x * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.55d-69)) .or. (.not. (z <= 2.75d-43))) then
tmp = t / (b - y)
else
tmp = x + (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.55e-69) || !(z <= 2.75e-43)) {
tmp = t / (b - y);
} else {
tmp = x + (x * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.55e-69) or not (z <= 2.75e-43): tmp = t / (b - y) else: tmp = x + (x * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.55e-69) || !(z <= 2.75e-43)) tmp = Float64(t / Float64(b - y)); else tmp = Float64(x + Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.55e-69) || ~((z <= 2.75e-43))) tmp = t / (b - y); else tmp = x + (x * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.55e-69], N[Not[LessEqual[z, 2.75e-43]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{-69} \lor \neg \left(z \leq 2.75 \cdot 10^{-43}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot z\\
\end{array}
\end{array}
if z < -1.55e-69 or 2.75000000000000006e-43 < z Initial program 54.9%
Taylor expanded in z around inf 76.8%
Taylor expanded in t around inf 43.5%
if -1.55e-69 < z < 2.75000000000000006e-43Initial program 85.8%
Taylor expanded in t around 0 70.6%
+-commutative70.6%
mul-1-neg70.6%
unsub-neg70.6%
*-commutative70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in z around 0 53.3%
associate-*r/53.3%
mul-1-neg53.3%
*-commutative53.3%
Simplified53.3%
Taylor expanded in y around inf 59.4%
*-commutative59.4%
Simplified59.4%
Final simplification48.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -8.2e-72) x (if (<= y 3.4e-63) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.2e-72) {
tmp = x;
} else if (y <= 3.4e-63) {
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 <= (-8.2d-72)) then
tmp = x
else if (y <= 3.4d-63) 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 <= -8.2e-72) {
tmp = x;
} else if (y <= 3.4e-63) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -8.2e-72: tmp = x elif y <= 3.4e-63: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -8.2e-72) tmp = x; elseif (y <= 3.4e-63) 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 <= -8.2e-72) tmp = x; elseif (y <= 3.4e-63) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -8.2e-72], x, If[LessEqual[y, 3.4e-63], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{-72}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-63}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -8.20000000000000007e-72 or 3.39999999999999998e-63 < y Initial program 53.1%
Taylor expanded in z around 0 34.6%
if -8.20000000000000007e-72 < y < 3.39999999999999998e-63Initial program 84.5%
Taylor expanded in y around inf 61.4%
associate-/l*51.9%
Simplified51.9%
Taylor expanded in b around inf 36.8%
associate-/l*32.5%
associate-/l*28.6%
*-commutative28.6%
Simplified28.6%
Taylor expanded in t around inf 38.1%
(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.4%
Taylor expanded in z around 0 24.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 2024103
(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)))))