
(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 (/ t (- b y))) (t_2 (pow (- b y) 2.0)) (t_3 (/ a (- b y))))
(if (<= z -1.85e+59)
(+ (* (/ y (- b y)) (/ x z)) (+ t_1 (- (* (/ y t_2) (/ (- a t) z)) t_3)))
(if (<= z 1.5e+35)
(/ (+ (* y x) (- (* z t) (* z a))) (+ y (* z (- b y))))
(+ t_1 (- (/ (+ (/ y (/ (- b y) x)) (/ (- a t) (/ t_2 y))) z) t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double t_2 = pow((b - y), 2.0);
double t_3 = a / (b - y);
double tmp;
if (z <= -1.85e+59) {
tmp = ((y / (b - y)) * (x / z)) + (t_1 + (((y / t_2) * ((a - t) / z)) - t_3));
} else if (z <= 1.5e+35) {
tmp = ((y * x) + ((z * t) - (z * a))) / (y + (z * (b - y)));
} else {
tmp = t_1 + ((((y / ((b - y) / x)) + ((a - t) / (t_2 / y))) / z) - 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 = t / (b - y)
t_2 = (b - y) ** 2.0d0
t_3 = a / (b - y)
if (z <= (-1.85d+59)) then
tmp = ((y / (b - y)) * (x / z)) + (t_1 + (((y / t_2) * ((a - t) / z)) - t_3))
else if (z <= 1.5d+35) then
tmp = ((y * x) + ((z * t) - (z * a))) / (y + (z * (b - y)))
else
tmp = t_1 + ((((y / ((b - y) / x)) + ((a - t) / (t_2 / y))) / z) - 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 = t / (b - y);
double t_2 = Math.pow((b - y), 2.0);
double t_3 = a / (b - y);
double tmp;
if (z <= -1.85e+59) {
tmp = ((y / (b - y)) * (x / z)) + (t_1 + (((y / t_2) * ((a - t) / z)) - t_3));
} else if (z <= 1.5e+35) {
tmp = ((y * x) + ((z * t) - (z * a))) / (y + (z * (b - y)));
} else {
tmp = t_1 + ((((y / ((b - y) / x)) + ((a - t) / (t_2 / y))) / z) - t_3);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) t_2 = math.pow((b - y), 2.0) t_3 = a / (b - y) tmp = 0 if z <= -1.85e+59: tmp = ((y / (b - y)) * (x / z)) + (t_1 + (((y / t_2) * ((a - t) / z)) - t_3)) elif z <= 1.5e+35: tmp = ((y * x) + ((z * t) - (z * a))) / (y + (z * (b - y))) else: tmp = t_1 + ((((y / ((b - y) / x)) + ((a - t) / (t_2 / y))) / z) - t_3) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) t_2 = Float64(b - y) ^ 2.0 t_3 = Float64(a / Float64(b - y)) tmp = 0.0 if (z <= -1.85e+59) tmp = Float64(Float64(Float64(y / Float64(b - y)) * Float64(x / z)) + Float64(t_1 + Float64(Float64(Float64(y / t_2) * Float64(Float64(a - t) / z)) - t_3))); elseif (z <= 1.5e+35) tmp = Float64(Float64(Float64(y * x) + Float64(Float64(z * t) - Float64(z * a))) / Float64(y + Float64(z * Float64(b - y)))); else tmp = Float64(t_1 + Float64(Float64(Float64(Float64(y / Float64(Float64(b - y) / x)) + Float64(Float64(a - t) / Float64(t_2 / y))) / z) - t_3)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); t_2 = (b - y) ^ 2.0; t_3 = a / (b - y); tmp = 0.0; if (z <= -1.85e+59) tmp = ((y / (b - y)) * (x / z)) + (t_1 + (((y / t_2) * ((a - t) / z)) - t_3)); elseif (z <= 1.5e+35) tmp = ((y * x) + ((z * t) - (z * a))) / (y + (z * (b - y))); else tmp = t_1 + ((((y / ((b - y) / x)) + ((a - t) / (t_2 / y))) / z) - t_3); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.85e+59], N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + N[(N[(N[(y / t$95$2), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+35], N[(N[(N[(y * x), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(N[(N[(y / N[(N[(b - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(a - t), $MachinePrecision] / N[(t$95$2 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
t_2 := {\left(b - y\right)}^{2}\\
t_3 := \frac{a}{b - y}\\
\mathbf{if}\;z \leq -1.85 \cdot 10^{+59}:\\
\;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} + \left(t_1 + \left(\frac{y}{t_2} \cdot \frac{a - t}{z} - t_3\right)\right)\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+35}:\\
\;\;\;\;\frac{y \cdot x + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(\frac{\frac{y}{\frac{b - y}{x}} + \frac{a - t}{\frac{t_2}{y}}}{z} - t_3\right)\\
\end{array}
\end{array}
if z < -1.84999999999999999e59Initial program 27.6%
Taylor expanded in z around inf 65.0%
associate--l+65.0%
*-commutative65.0%
times-frac71.9%
+-commutative71.9%
times-frac98.2%
Simplified98.2%
if -1.84999999999999999e59 < z < 1.49999999999999995e35Initial program 89.8%
sub-neg89.8%
distribute-lft-in89.8%
Applied egg-rr89.8%
if 1.49999999999999995e35 < z Initial program 32.6%
Taylor expanded in z around -inf 75.4%
associate--l+75.4%
mul-1-neg75.4%
distribute-lft-out--75.4%
associate-/l*84.0%
associate-/l*99.9%
Simplified99.9%
Final simplification93.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (+ (* y x) (* z (- t a))) t_1))
(t_3 (/ (- t a) (- b y))))
(if (<= t_2 (- INFINITY))
(- (/ (- a t) y) (/ x (+ z -1.0)))
(if (<= t_2 -1e-294)
t_2
(if (<= t_2 0.0)
(+
(/ (+ (/ (* y x) (- b y)) (/ (- a t) (/ (pow (- b y) 2.0) y))) z)
t_3)
(if (<= t_2 2e+270) (/ (+ (* y x) (- (* z t) (* z a))) t_1) t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((y * x) + (z * (t - a))) / t_1;
double t_3 = (t - a) / (b - y);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if (t_2 <= -1e-294) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = ((((y * x) / (b - y)) + ((a - t) / (pow((b - y), 2.0) / y))) / z) + t_3;
} else if (t_2 <= 2e+270) {
tmp = ((y * x) + ((z * t) - (z * a))) / t_1;
} else {
tmp = t_3;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((y * x) + (z * (t - a))) / t_1;
double t_3 = (t - a) / (b - y);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if (t_2 <= -1e-294) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = ((((y * x) / (b - y)) + ((a - t) / (Math.pow((b - y), 2.0) / y))) / z) + t_3;
} else if (t_2 <= 2e+270) {
tmp = ((y * x) + ((z * t) - (z * a))) / t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = ((y * x) + (z * (t - a))) / t_1 t_3 = (t - a) / (b - y) tmp = 0 if t_2 <= -math.inf: tmp = ((a - t) / y) - (x / (z + -1.0)) elif t_2 <= -1e-294: tmp = t_2 elif t_2 <= 0.0: tmp = ((((y * x) / (b - y)) + ((a - t) / (math.pow((b - y), 2.0) / y))) / z) + t_3 elif t_2 <= 2e+270: tmp = ((y * x) + ((z * t) - (z * a))) / t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / t_1) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))); elseif (t_2 <= -1e-294) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(Float64(Float64(Float64(y * x) / Float64(b - y)) + Float64(Float64(a - t) / Float64((Float64(b - y) ^ 2.0) / y))) / z) + t_3); elseif (t_2 <= 2e+270) tmp = Float64(Float64(Float64(y * x) + Float64(Float64(z * t) - Float64(z * a))) / t_1); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = ((y * x) + (z * (t - a))) / t_1; t_3 = (t - a) / (b - y); tmp = 0.0; if (t_2 <= -Inf) tmp = ((a - t) / y) - (x / (z + -1.0)); elseif (t_2 <= -1e-294) tmp = t_2; elseif (t_2 <= 0.0) tmp = ((((y * x) / (b - y)) + ((a - t) / (((b - y) ^ 2.0) / y))) / z) + t_3; elseif (t_2 <= 2e+270) tmp = ((y * x) + ((z * t) - (z * a))) / t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-294], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(N[(N[(N[(y * x), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(a - t), $MachinePrecision] / N[(N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + t$95$3), $MachinePrecision], If[LessEqual[t$95$2, 2e+270], N[(N[(N[(y * x), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{y \cdot x + z \cdot \left(t - a\right)}{t_1}\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-294}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;\frac{\frac{y \cdot x}{b - y} + \frac{a - t}{\frac{{\left(b - y\right)}^{2}}{y}}}{z} + t_3\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+270}:\\
\;\;\;\;\frac{y \cdot x + \left(z \cdot t - z \cdot a\right)}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\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 20.7%
Taylor expanded in y around -inf 55.0%
mul-1-neg55.0%
unsub-neg55.0%
mul-1-neg55.0%
distribute-neg-frac55.0%
cancel-sign-sub-inv55.0%
associate-/l*62.4%
metadata-eval62.4%
*-lft-identity62.4%
associate-/l*66.3%
Simplified66.3%
Taylor expanded in z around inf 77.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.00000000000000002e-294Initial program 99.6%
if -1.00000000000000002e-294 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 18.7%
Taylor expanded in z around -inf 85.7%
+-commutative85.7%
associate--l+85.7%
Simplified100.0%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.0000000000000001e270Initial program 99.4%
sub-neg99.4%
distribute-lft-in99.4%
Applied egg-rr99.4%
if 2.0000000000000001e270 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 9.6%
Taylor expanded in z around inf 78.0%
Final simplification92.2%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -1.85e+59) (not (<= z 5.5e+32)))
(+
(* (/ y (- b y)) (/ x z))
(+
(/ t (- b y))
(- (* (/ y (pow (- b y) 2.0)) (/ (- a t) z)) (/ a (- b y)))))
(/ (+ (* y x) (- (* z t) (* z a))) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.85e+59) || !(z <= 5.5e+32)) {
tmp = ((y / (b - y)) * (x / z)) + ((t / (b - y)) + (((y / pow((b - y), 2.0)) * ((a - t) / z)) - (a / (b - y))));
} else {
tmp = ((y * x) + ((z * t) - (z * a))) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.85d+59)) .or. (.not. (z <= 5.5d+32))) then
tmp = ((y / (b - y)) * (x / z)) + ((t / (b - y)) + (((y / ((b - y) ** 2.0d0)) * ((a - t) / z)) - (a / (b - y))))
else
tmp = ((y * x) + ((z * t) - (z * a))) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.85e+59) || !(z <= 5.5e+32)) {
tmp = ((y / (b - y)) * (x / z)) + ((t / (b - y)) + (((y / Math.pow((b - y), 2.0)) * ((a - t) / z)) - (a / (b - y))));
} else {
tmp = ((y * x) + ((z * t) - (z * a))) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.85e+59) or not (z <= 5.5e+32): tmp = ((y / (b - y)) * (x / z)) + ((t / (b - y)) + (((y / math.pow((b - y), 2.0)) * ((a - t) / z)) - (a / (b - y)))) else: tmp = ((y * x) + ((z * t) - (z * a))) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.85e+59) || !(z <= 5.5e+32)) tmp = Float64(Float64(Float64(y / Float64(b - y)) * Float64(x / z)) + Float64(Float64(t / Float64(b - y)) + Float64(Float64(Float64(y / (Float64(b - y) ^ 2.0)) * Float64(Float64(a - t) / z)) - Float64(a / Float64(b - y))))); else tmp = Float64(Float64(Float64(y * x) + Float64(Float64(z * t) - Float64(z * a))) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.85e+59) || ~((z <= 5.5e+32))) tmp = ((y / (b - y)) * (x / z)) + ((t / (b - y)) + (((y / ((b - y) ^ 2.0)) * ((a - t) / z)) - (a / (b - y)))); else tmp = ((y * x) + ((z * t) - (z * a))) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.85e+59], N[Not[LessEqual[z, 5.5e+32]], $MachinePrecision]], N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+59} \lor \neg \left(z \leq 5.5 \cdot 10^{+32}\right):\\
\;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} + \left(\frac{t}{b - y} + \left(\frac{y}{{\left(b - y\right)}^{2}} \cdot \frac{a - t}{z} - \frac{a}{b - y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -1.84999999999999999e59 or 5.49999999999999984e32 < z Initial program 31.3%
Taylor expanded in z around inf 69.0%
associate--l+69.0%
*-commutative69.0%
times-frac78.3%
+-commutative78.3%
times-frac99.1%
Simplified99.1%
if -1.84999999999999999e59 < z < 5.49999999999999984e32Initial program 89.6%
sub-neg89.6%
distribute-lft-in89.6%
Applied egg-rr89.6%
Final simplification93.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))) (t_2 (/ (+ (* y x) (* z (- t a))) t_1)))
(if (<= t_2 (- INFINITY))
(- (/ (- a t) y) (/ x (+ z -1.0)))
(if (<= t_2 -1e-294)
t_2
(if (or (<= t_2 0.0) (not (<= t_2 2e+270)))
(/ (- t a) (- b y))
(/ (+ (* y x) (- (* z t) (* z a))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((y * x) + (z * (t - a))) / t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if (t_2 <= -1e-294) {
tmp = t_2;
} else if ((t_2 <= 0.0) || !(t_2 <= 2e+270)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + ((z * t) - (z * a))) / t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((y * x) + (z * (t - a))) / t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if (t_2 <= -1e-294) {
tmp = t_2;
} else if ((t_2 <= 0.0) || !(t_2 <= 2e+270)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + ((z * t) - (z * a))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = ((y * x) + (z * (t - a))) / t_1 tmp = 0 if t_2 <= -math.inf: tmp = ((a - t) / y) - (x / (z + -1.0)) elif t_2 <= -1e-294: tmp = t_2 elif (t_2 <= 0.0) or not (t_2 <= 2e+270): tmp = (t - a) / (b - y) else: tmp = ((y * x) + ((z * t) - (z * a))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))); elseif (t_2 <= -1e-294) tmp = t_2; elseif ((t_2 <= 0.0) || !(t_2 <= 2e+270)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(y * x) + Float64(Float64(z * t) - Float64(z * a))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = ((y * x) + (z * (t - a))) / t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = ((a - t) / y) - (x / (z + -1.0)); elseif (t_2 <= -1e-294) tmp = t_2; elseif ((t_2 <= 0.0) || ~((t_2 <= 2e+270))) tmp = (t - a) / (b - y); else tmp = ((y * x) + ((z * t) - (z * a))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-294], t$95$2, If[Or[LessEqual[t$95$2, 0.0], N[Not[LessEqual[t$95$2, 2e+270]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{y \cdot x + z \cdot \left(t - a\right)}{t_1}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-294}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 0 \lor \neg \left(t_2 \leq 2 \cdot 10^{+270}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x + \left(z \cdot t - z \cdot a\right)}{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 20.7%
Taylor expanded in y around -inf 55.0%
mul-1-neg55.0%
unsub-neg55.0%
mul-1-neg55.0%
distribute-neg-frac55.0%
cancel-sign-sub-inv55.0%
associate-/l*62.4%
metadata-eval62.4%
*-lft-identity62.4%
associate-/l*66.3%
Simplified66.3%
Taylor expanded in z around inf 77.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.00000000000000002e-294Initial program 99.6%
if -1.00000000000000002e-294 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 2.0000000000000001e270 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 11.9%
Taylor expanded in z around inf 80.1%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.0000000000000001e270Initial program 99.4%
sub-neg99.4%
distribute-lft-in99.4%
Applied egg-rr99.4%
Final simplification91.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* y x) (* z (- t a))) (+ y (* z (- b y))))))
(if (<= t_1 (- INFINITY))
(- (/ (- a t) y) (/ x (+ z -1.0)))
(if (or (<= t_1 -1e-294) (and (not (<= t_1 0.0)) (<= t_1 2e+270)))
t_1
(/ (- t a) (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * x) + (z * (t - a))) / (y + (z * (b - y)));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if ((t_1 <= -1e-294) || (!(t_1 <= 0.0) && (t_1 <= 2e+270))) {
tmp = t_1;
} 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 * x) + (z * (t - a))) / (y + (z * (b - y)));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if ((t_1 <= -1e-294) || (!(t_1 <= 0.0) && (t_1 <= 2e+270))) {
tmp = t_1;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y * x) + (z * (t - a))) / (y + (z * (b - y))) tmp = 0 if t_1 <= -math.inf: tmp = ((a - t) / y) - (x / (z + -1.0)) elif (t_1 <= -1e-294) or (not (t_1 <= 0.0) and (t_1 <= 2e+270)): tmp = t_1 else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))); elseif ((t_1 <= -1e-294) || (!(t_1 <= 0.0) && (t_1 <= 2e+270))) tmp = t_1; 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 * x) + (z * (t - a))) / (y + (z * (b - y))); tmp = 0.0; if (t_1 <= -Inf) tmp = ((a - t) / y) - (x / (z + -1.0)); elseif ((t_1 <= -1e-294) || (~((t_1 <= 0.0)) && (t_1 <= 2e+270))) tmp = t_1; else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, -1e-294], And[N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision], LessEqual[t$95$1, 2e+270]]], t$95$1, N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot x + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-294} \lor \neg \left(t_1 \leq 0\right) \land t_1 \leq 2 \cdot 10^{+270}:\\
\;\;\;\;t_1\\
\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 20.7%
Taylor expanded in y around -inf 55.0%
mul-1-neg55.0%
unsub-neg55.0%
mul-1-neg55.0%
distribute-neg-frac55.0%
cancel-sign-sub-inv55.0%
associate-/l*62.4%
metadata-eval62.4%
*-lft-identity62.4%
associate-/l*66.3%
Simplified66.3%
Taylor expanded in z around inf 77.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.00000000000000002e-294 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.0000000000000001e270Initial program 99.5%
if -1.00000000000000002e-294 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 2.0000000000000001e270 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 11.9%
Taylor expanded in z around inf 80.1%
Final simplification91.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.6e-15)
t_1
(if (<= z -3.8e-80)
(+ x (* z (- x (/ a y))))
(if (<= z -2.7e-122)
(/ (- (/ (* y x) z) a) b)
(if (<= z 0.26) (/ (+ (* y x) (- (* z t) (* z a))) y) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.6e-15) {
tmp = t_1;
} else if (z <= -3.8e-80) {
tmp = x + (z * (x - (a / y)));
} else if (z <= -2.7e-122) {
tmp = (((y * x) / z) - a) / b;
} else if (z <= 0.26) {
tmp = ((y * x) + ((z * t) - (z * a))) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-1.6d-15)) then
tmp = t_1
else if (z <= (-3.8d-80)) then
tmp = x + (z * (x - (a / y)))
else if (z <= (-2.7d-122)) then
tmp = (((y * x) / z) - a) / b
else if (z <= 0.26d0) then
tmp = ((y * x) + ((z * t) - (z * a))) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.6e-15) {
tmp = t_1;
} else if (z <= -3.8e-80) {
tmp = x + (z * (x - (a / y)));
} else if (z <= -2.7e-122) {
tmp = (((y * x) / z) - a) / b;
} else if (z <= 0.26) {
tmp = ((y * x) + ((z * t) - (z * a))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.6e-15: tmp = t_1 elif z <= -3.8e-80: tmp = x + (z * (x - (a / y))) elif z <= -2.7e-122: tmp = (((y * x) / z) - a) / b elif z <= 0.26: tmp = ((y * x) + ((z * t) - (z * a))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.6e-15) tmp = t_1; elseif (z <= -3.8e-80) tmp = Float64(x + Float64(z * Float64(x - Float64(a / y)))); elseif (z <= -2.7e-122) tmp = Float64(Float64(Float64(Float64(y * x) / z) - a) / b); elseif (z <= 0.26) tmp = Float64(Float64(Float64(y * x) + Float64(Float64(z * t) - Float64(z * a))) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.6e-15) tmp = t_1; elseif (z <= -3.8e-80) tmp = x + (z * (x - (a / y))); elseif (z <= -2.7e-122) tmp = (((y * x) / z) - a) / b; elseif (z <= 0.26) tmp = ((y * x) + ((z * t) - (z * a))) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e-15], t$95$1, If[LessEqual[z, -3.8e-80], N[(x + N[(z * N[(x - N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.7e-122], N[(N[(N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 0.26], N[(N[(N[(y * x), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{-15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-80}:\\
\;\;\;\;x + z \cdot \left(x - \frac{a}{y}\right)\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-122}:\\
\;\;\;\;\frac{\frac{y \cdot x}{z} - a}{b}\\
\mathbf{elif}\;z \leq 0.26:\\
\;\;\;\;\frac{y \cdot x + \left(z \cdot t - z \cdot a\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.6e-15 or 0.26000000000000001 < z Initial program 38.5%
Taylor expanded in z around inf 82.9%
if -1.6e-15 < z < -3.79999999999999967e-80Initial program 64.3%
Taylor expanded in y around -inf 87.7%
mul-1-neg87.7%
unsub-neg87.7%
mul-1-neg87.7%
distribute-neg-frac87.7%
cancel-sign-sub-inv87.7%
associate-/l*87.7%
metadata-eval87.7%
*-lft-identity87.7%
associate-/l*87.7%
Simplified87.7%
Taylor expanded in a around inf 99.6%
associate-*r/99.6%
associate-*r*99.6%
neg-mul-199.6%
*-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 100.0%
if -3.79999999999999967e-80 < z < -2.70000000000000009e-122Initial program 99.7%
Taylor expanded in z around inf 51.0%
associate--l+51.0%
*-commutative51.0%
times-frac22.4%
+-commutative22.4%
times-frac32.0%
Simplified32.0%
Taylor expanded in b around inf 70.7%
associate--l+70.7%
associate-*r/51.7%
Simplified51.7%
Taylor expanded in t around 0 70.7%
if -2.70000000000000009e-122 < z < 0.26000000000000001Initial program 90.1%
sub-neg90.1%
distribute-lft-in90.1%
Applied egg-rr90.1%
Taylor expanded in z around 0 70.6%
Final simplification77.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.1e-16)
t_1
(if (<= z -2.55e-79)
(+ x (* z (- x (/ a y))))
(if (<= z -8.6e-125)
(/ (- (/ (* y x) z) a) b)
(if (<= z 2.8e-17) (- x (* (/ t (+ z -1.0)) (/ z 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-16) {
tmp = t_1;
} else if (z <= -2.55e-79) {
tmp = x + (z * (x - (a / y)));
} else if (z <= -8.6e-125) {
tmp = (((y * x) / z) - a) / b;
} else if (z <= 2.8e-17) {
tmp = x - ((t / (z + -1.0)) * (z / 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-16)) then
tmp = t_1
else if (z <= (-2.55d-79)) then
tmp = x + (z * (x - (a / y)))
else if (z <= (-8.6d-125)) then
tmp = (((y * x) / z) - a) / b
else if (z <= 2.8d-17) then
tmp = x - ((t / (z + (-1.0d0))) * (z / 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-16) {
tmp = t_1;
} else if (z <= -2.55e-79) {
tmp = x + (z * (x - (a / y)));
} else if (z <= -8.6e-125) {
tmp = (((y * x) / z) - a) / b;
} else if (z <= 2.8e-17) {
tmp = x - ((t / (z + -1.0)) * (z / 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-16: tmp = t_1 elif z <= -2.55e-79: tmp = x + (z * (x - (a / y))) elif z <= -8.6e-125: tmp = (((y * x) / z) - a) / b elif z <= 2.8e-17: tmp = x - ((t / (z + -1.0)) * (z / 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-16) tmp = t_1; elseif (z <= -2.55e-79) tmp = Float64(x + Float64(z * Float64(x - Float64(a / y)))); elseif (z <= -8.6e-125) tmp = Float64(Float64(Float64(Float64(y * x) / z) - a) / b); elseif (z <= 2.8e-17) tmp = Float64(x - Float64(Float64(t / Float64(z + -1.0)) * Float64(z / 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-16) tmp = t_1; elseif (z <= -2.55e-79) tmp = x + (z * (x - (a / y))); elseif (z <= -8.6e-125) tmp = (((y * x) / z) - a) / b; elseif (z <= 2.8e-17) tmp = x - ((t / (z + -1.0)) * (z / 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-16], t$95$1, If[LessEqual[z, -2.55e-79], N[(x + N[(z * N[(x - N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.6e-125], N[(N[(N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 2.8e-17], N[(x - N[(N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision] * N[(z / y), $MachinePrecision]), $MachinePrecision]), $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^{-16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{-79}:\\
\;\;\;\;x + z \cdot \left(x - \frac{a}{y}\right)\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{-125}:\\
\;\;\;\;\frac{\frac{y \cdot x}{z} - a}{b}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-17}:\\
\;\;\;\;x - \frac{t}{z + -1} \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.1000000000000001e-16 or 2.7999999999999999e-17 < z Initial program 40.3%
Taylor expanded in z around inf 81.2%
if -2.1000000000000001e-16 < z < -2.55e-79Initial program 64.3%
Taylor expanded in y around -inf 87.7%
mul-1-neg87.7%
unsub-neg87.7%
mul-1-neg87.7%
distribute-neg-frac87.7%
cancel-sign-sub-inv87.7%
associate-/l*87.7%
metadata-eval87.7%
*-lft-identity87.7%
associate-/l*87.7%
Simplified87.7%
Taylor expanded in a around inf 99.6%
associate-*r/99.6%
associate-*r*99.6%
neg-mul-199.6%
*-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 100.0%
if -2.55e-79 < z < -8.6000000000000004e-125Initial program 99.7%
Taylor expanded in z around inf 46.3%
associate--l+46.3%
*-commutative46.3%
times-frac20.3%
+-commutative20.3%
times-frac29.1%
Simplified29.1%
Taylor expanded in b around inf 64.9%
associate--l+64.9%
associate-*r/47.7%
Simplified47.7%
Taylor expanded in t around 0 64.9%
if -8.6000000000000004e-125 < z < 2.7999999999999999e-17Initial program 89.6%
Taylor expanded in y around -inf 77.1%
mul-1-neg77.1%
unsub-neg77.1%
mul-1-neg77.1%
distribute-neg-frac77.1%
cancel-sign-sub-inv77.1%
associate-/l*77.1%
metadata-eval77.1%
*-lft-identity77.1%
associate-/l*77.1%
Simplified77.1%
Taylor expanded in t around inf 66.9%
times-frac64.2%
sub-neg64.2%
metadata-eval64.2%
Simplified64.2%
Taylor expanded in z around 0 64.2%
Final simplification74.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.52e+16) (not (<= z 44000000.0))) (/ (- t a) (- b y)) (/ (+ (* y x) (* z (- t a))) (+ y (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.52e+16) || !(z <= 44000000.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + (z * (t - a))) / (y + (z * 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 <= (-1.52d+16)) .or. (.not. (z <= 44000000.0d0))) then
tmp = (t - a) / (b - y)
else
tmp = ((y * x) + (z * (t - a))) / (y + (z * 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 <= -1.52e+16) || !(z <= 44000000.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + (z * (t - a))) / (y + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.52e+16) or not (z <= 44000000.0): tmp = (t - a) / (b - y) else: tmp = ((y * x) + (z * (t - a))) / (y + (z * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.52e+16) || !(z <= 44000000.0)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.52e+16) || ~((z <= 44000000.0))) tmp = (t - a) / (b - y); else tmp = ((y * x) + (z * (t - a))) / (y + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.52e+16], N[Not[LessEqual[z, 44000000.0]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.52 \cdot 10^{+16} \lor \neg \left(z \leq 44000000\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y + z \cdot b}\\
\end{array}
\end{array}
if z < -1.52e16 or 4.4e7 < z Initial program 36.8%
Taylor expanded in z around inf 84.5%
if -1.52e16 < z < 4.4e7Initial program 88.9%
Taylor expanded in b around inf 88.1%
Final simplification86.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (- x (/ a y))))) (t_2 (/ (- t a) (- b y))))
(if (<= z -3e-16)
t_2
(if (<= z -3.7e-80)
t_1
(if (<= z -1.3e-122)
(/ (- (/ (* y x) z) a) b)
(if (<= z 0.054) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (x - (a / y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3e-16) {
tmp = t_2;
} else if (z <= -3.7e-80) {
tmp = t_1;
} else if (z <= -1.3e-122) {
tmp = (((y * x) / z) - a) / b;
} else if (z <= 0.054) {
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 + (z * (x - (a / y)))
t_2 = (t - a) / (b - y)
if (z <= (-3d-16)) then
tmp = t_2
else if (z <= (-3.7d-80)) then
tmp = t_1
else if (z <= (-1.3d-122)) then
tmp = (((y * x) / z) - a) / b
else if (z <= 0.054d0) 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 + (z * (x - (a / y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3e-16) {
tmp = t_2;
} else if (z <= -3.7e-80) {
tmp = t_1;
} else if (z <= -1.3e-122) {
tmp = (((y * x) / z) - a) / b;
} else if (z <= 0.054) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (x - (a / y))) t_2 = (t - a) / (b - y) tmp = 0 if z <= -3e-16: tmp = t_2 elif z <= -3.7e-80: tmp = t_1 elif z <= -1.3e-122: tmp = (((y * x) / z) - a) / b elif z <= 0.054: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(x - Float64(a / y)))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3e-16) tmp = t_2; elseif (z <= -3.7e-80) tmp = t_1; elseif (z <= -1.3e-122) tmp = Float64(Float64(Float64(Float64(y * x) / z) - a) / b); elseif (z <= 0.054) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * (x - (a / y))); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -3e-16) tmp = t_2; elseif (z <= -3.7e-80) tmp = t_1; elseif (z <= -1.3e-122) tmp = (((y * x) / z) - a) / b; elseif (z <= 0.054) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * N[(x - N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e-16], t$95$2, If[LessEqual[z, -3.7e-80], t$95$1, If[LessEqual[z, -1.3e-122], N[(N[(N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 0.054], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \left(x - \frac{a}{y}\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3 \cdot 10^{-16}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-80}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-122}:\\
\;\;\;\;\frac{\frac{y \cdot x}{z} - a}{b}\\
\mathbf{elif}\;z \leq 0.054:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.99999999999999994e-16 or 0.0539999999999999994 < z Initial program 38.5%
Taylor expanded in z around inf 82.9%
if -2.99999999999999994e-16 < z < -3.70000000000000033e-80 or -1.29999999999999988e-122 < z < 0.0539999999999999994Initial program 88.3%
Taylor expanded in y around -inf 77.9%
mul-1-neg77.9%
unsub-neg77.9%
mul-1-neg77.9%
distribute-neg-frac77.9%
cancel-sign-sub-inv77.9%
associate-/l*77.9%
metadata-eval77.9%
*-lft-identity77.9%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in a around inf 66.8%
associate-*r/66.8%
associate-*r*66.8%
neg-mul-166.8%
*-commutative66.8%
sub-neg66.8%
metadata-eval66.8%
Simplified66.8%
Taylor expanded in z around 0 59.5%
if -3.70000000000000033e-80 < z < -1.29999999999999988e-122Initial program 99.7%
Taylor expanded in z around inf 51.0%
associate--l+51.0%
*-commutative51.0%
times-frac22.4%
+-commutative22.4%
times-frac32.0%
Simplified32.0%
Taylor expanded in b around inf 70.7%
associate--l+70.7%
associate-*r/51.7%
Simplified51.7%
Taylor expanded in t around 0 70.7%
Final simplification71.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t) y)))
(if (<= z -6.1e+286)
t_1
(if (<= z -9.5e+245)
(/ a y)
(if (<= z -820.0)
t_1
(if (<= z 0.95) x (if (<= z 7e+212) t_1 (/ t b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -t / y;
double tmp;
if (z <= -6.1e+286) {
tmp = t_1;
} else if (z <= -9.5e+245) {
tmp = a / y;
} else if (z <= -820.0) {
tmp = t_1;
} else if (z <= 0.95) {
tmp = x;
} else if (z <= 7e+212) {
tmp = t_1;
} else {
tmp = t / 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) :: t_1
real(8) :: tmp
t_1 = -t / y
if (z <= (-6.1d+286)) then
tmp = t_1
else if (z <= (-9.5d+245)) then
tmp = a / y
else if (z <= (-820.0d0)) then
tmp = t_1
else if (z <= 0.95d0) then
tmp = x
else if (z <= 7d+212) then
tmp = t_1
else
tmp = t / b
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 / y;
double tmp;
if (z <= -6.1e+286) {
tmp = t_1;
} else if (z <= -9.5e+245) {
tmp = a / y;
} else if (z <= -820.0) {
tmp = t_1;
} else if (z <= 0.95) {
tmp = x;
} else if (z <= 7e+212) {
tmp = t_1;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -t / y tmp = 0 if z <= -6.1e+286: tmp = t_1 elif z <= -9.5e+245: tmp = a / y elif z <= -820.0: tmp = t_1 elif z <= 0.95: tmp = x elif z <= 7e+212: tmp = t_1 else: tmp = t / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-t) / y) tmp = 0.0 if (z <= -6.1e+286) tmp = t_1; elseif (z <= -9.5e+245) tmp = Float64(a / y); elseif (z <= -820.0) tmp = t_1; elseif (z <= 0.95) tmp = x; elseif (z <= 7e+212) tmp = t_1; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -t / y; tmp = 0.0; if (z <= -6.1e+286) tmp = t_1; elseif (z <= -9.5e+245) tmp = a / y; elseif (z <= -820.0) tmp = t_1; elseif (z <= 0.95) tmp = x; elseif (z <= 7e+212) tmp = t_1; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-t) / y), $MachinePrecision]}, If[LessEqual[z, -6.1e+286], t$95$1, If[LessEqual[z, -9.5e+245], N[(a / y), $MachinePrecision], If[LessEqual[z, -820.0], t$95$1, If[LessEqual[z, 0.95], x, If[LessEqual[z, 7e+212], t$95$1, N[(t / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-t}{y}\\
\mathbf{if}\;z \leq -6.1 \cdot 10^{+286}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{+245}:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq -820:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 0.95:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+212}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -6.1000000000000002e286 or -9.49999999999999939e245 < z < -820 or 0.94999999999999996 < z < 6.99999999999999974e212Initial program 50.0%
Taylor expanded in y around -inf 38.3%
mul-1-neg38.3%
unsub-neg38.3%
mul-1-neg38.3%
distribute-neg-frac38.3%
cancel-sign-sub-inv38.3%
associate-/l*53.0%
metadata-eval53.0%
*-lft-identity53.0%
associate-/l*57.8%
Simplified57.8%
Taylor expanded in t around inf 33.4%
times-frac50.2%
sub-neg50.2%
metadata-eval50.2%
Simplified50.2%
Taylor expanded in z around inf 41.0%
associate-*r/41.0%
neg-mul-141.0%
Simplified41.0%
if -6.1000000000000002e286 < z < -9.49999999999999939e245Initial program 13.4%
Taylor expanded in y around -inf 23.1%
mul-1-neg23.1%
unsub-neg23.1%
mul-1-neg23.1%
distribute-neg-frac23.1%
cancel-sign-sub-inv23.1%
associate-/l*28.6%
metadata-eval28.6%
*-lft-identity28.6%
associate-/l*45.4%
Simplified45.4%
Taylor expanded in a around inf 13.9%
associate-*r/13.9%
associate-*r*13.9%
neg-mul-113.9%
*-commutative13.9%
sub-neg13.9%
metadata-eval13.9%
Simplified13.9%
Taylor expanded in z around inf 37.2%
if -820 < z < 0.94999999999999996Initial program 88.6%
Taylor expanded in z around 0 49.1%
if 6.99999999999999974e212 < z Initial program 14.8%
Taylor expanded in z around inf 79.2%
associate--l+79.2%
*-commutative79.2%
times-frac87.4%
+-commutative87.4%
times-frac99.9%
Simplified99.9%
Taylor expanded in b around inf 61.8%
associate--l+61.8%
associate-*r/68.1%
Simplified68.1%
Taylor expanded in t around inf 37.9%
Final simplification44.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.9e-16) (not (<= z 0.054))) (/ (- t a) (- b y)) (+ x (* z (- x (/ a y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.9e-16) || !(z <= 0.054)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * (x - (a / y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3.9d-16)) .or. (.not. (z <= 0.054d0))) then
tmp = (t - a) / (b - y)
else
tmp = x + (z * (x - (a / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.9e-16) || !(z <= 0.054)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * (x - (a / y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.9e-16) or not (z <= 0.054): tmp = (t - a) / (b - y) else: tmp = x + (z * (x - (a / y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.9e-16) || !(z <= 0.054)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(z * Float64(x - Float64(a / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.9e-16) || ~((z <= 0.054))) tmp = (t - a) / (b - y); else tmp = x + (z * (x - (a / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.9e-16], N[Not[LessEqual[z, 0.054]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(x - N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{-16} \lor \neg \left(z \leq 0.054\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(x - \frac{a}{y}\right)\\
\end{array}
\end{array}
if z < -3.89999999999999977e-16 or 0.0539999999999999994 < z Initial program 38.5%
Taylor expanded in z around inf 82.9%
if -3.89999999999999977e-16 < z < 0.0539999999999999994Initial program 89.2%
Taylor expanded in y around -inf 74.3%
mul-1-neg74.3%
unsub-neg74.3%
mul-1-neg74.3%
distribute-neg-frac74.3%
cancel-sign-sub-inv74.3%
associate-/l*74.2%
metadata-eval74.2%
*-lft-identity74.2%
associate-/l*74.2%
Simplified74.2%
Taylor expanded in a around inf 64.1%
associate-*r/64.1%
associate-*r*64.1%
neg-mul-164.1%
*-commutative64.1%
sub-neg64.1%
metadata-eval64.1%
Simplified64.1%
Taylor expanded in z around 0 56.6%
Final simplification70.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.95e-16) (not (<= z 1.6e-48))) (/ (- t a) (- b y)) (+ x (* z x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.95e-16) || !(z <= 1.6e-48)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * x);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.95d-16)) .or. (.not. (z <= 1.6d-48))) then
tmp = (t - a) / (b - y)
else
tmp = x + (z * x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.95e-16) || !(z <= 1.6e-48)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.95e-16) or not (z <= 1.6e-48): tmp = (t - a) / (b - y) else: tmp = x + (z * x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.95e-16) || !(z <= 1.6e-48)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(z * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.95e-16) || ~((z <= 1.6e-48))) tmp = (t - a) / (b - y); else tmp = x + (z * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.95e-16], N[Not[LessEqual[z, 1.6e-48]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{-16} \lor \neg \left(z \leq 1.6 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot x\\
\end{array}
\end{array}
if z < -1.94999999999999989e-16 or 1.5999999999999999e-48 < z Initial program 41.8%
Taylor expanded in z around inf 79.8%
if -1.94999999999999989e-16 < z < 1.5999999999999999e-48Initial program 89.2%
Taylor expanded in y around inf 51.6%
+-commutative51.6%
mul-1-neg51.6%
unsub-neg51.6%
Simplified51.6%
Taylor expanded in z around 0 51.6%
Final simplification66.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.12) (not (<= z 2.45e-48))) (/ t (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.12) || !(z <= 2.45e-48)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.12d0)) .or. (.not. (z <= 2.45d-48))) then
tmp = t / (b - y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.12) || !(z <= 2.45e-48)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.12) or not (z <= 2.45e-48): tmp = t / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.12) || !(z <= 2.45e-48)) tmp = Float64(t / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.12) || ~((z <= 2.45e-48))) tmp = t / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.12], N[Not[LessEqual[z, 2.45e-48]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.12 \lor \neg \left(z \leq 2.45 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.1200000000000001 or 2.4500000000000001e-48 < z Initial program 41.6%
Taylor expanded in z around inf 80.2%
Taylor expanded in t around inf 49.5%
if -1.1200000000000001 < z < 2.4500000000000001e-48Initial program 88.6%
Taylor expanded in z around 0 50.9%
Final simplification50.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.46) (not (<= z 2.45e-48))) (/ 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.46) || !(z <= 2.45e-48)) {
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.46d0)) .or. (.not. (z <= 2.45d-48))) 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.46) || !(z <= 2.45e-48)) {
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.46) or not (z <= 2.45e-48): 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.46) || !(z <= 2.45e-48)) 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.46) || ~((z <= 2.45e-48))) 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.46], N[Not[LessEqual[z, 2.45e-48]], $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.46 \lor \neg \left(z \leq 2.45 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -1.46 or 2.4500000000000001e-48 < z Initial program 41.6%
Taylor expanded in z around inf 80.2%
Taylor expanded in t around inf 49.5%
if -1.46 < z < 2.4500000000000001e-48Initial program 88.6%
Taylor expanded in y around inf 51.6%
+-commutative51.6%
mul-1-neg51.6%
unsub-neg51.6%
Simplified51.6%
Final simplification50.4%
(FPCore (x y z t a b) :precision binary64 (if (<= z -730.0) (/ t (- b y)) (if (<= z 6e+22) (/ x (- 1.0 z)) (/ (- t a) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -730.0) {
tmp = t / (b - y);
} else if (z <= 6e+22) {
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 (z <= (-730.0d0)) then
tmp = t / (b - y)
else if (z <= 6d+22) 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 (z <= -730.0) {
tmp = t / (b - y);
} else if (z <= 6e+22) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -730.0: tmp = t / (b - y) elif z <= 6e+22: tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -730.0) tmp = Float64(t / Float64(b - y)); elseif (z <= 6e+22) 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 (z <= -730.0) tmp = t / (b - y); elseif (z <= 6e+22) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -730.0], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+22], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -730:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+22}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if z < -730Initial program 36.5%
Taylor expanded in z around inf 88.1%
Taylor expanded in t around inf 55.7%
if -730 < z < 6e22Initial program 88.9%
Taylor expanded in y around inf 49.3%
+-commutative49.3%
mul-1-neg49.3%
unsub-neg49.3%
Simplified49.3%
if 6e22 < z Initial program 37.1%
Taylor expanded in y around 0 50.2%
Final simplification51.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -62000000000.0) (/ a y) (if (<= z 2.9e+33) x (/ a y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -62000000000.0) {
tmp = a / y;
} else if (z <= 2.9e+33) {
tmp = x;
} else {
tmp = a / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-62000000000.0d0)) then
tmp = a / y
else if (z <= 2.9d+33) then
tmp = x
else
tmp = a / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -62000000000.0) {
tmp = a / y;
} else if (z <= 2.9e+33) {
tmp = x;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -62000000000.0: tmp = a / y elif z <= 2.9e+33: tmp = x else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -62000000000.0) tmp = Float64(a / y); elseif (z <= 2.9e+33) tmp = x; else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -62000000000.0) tmp = a / y; elseif (z <= 2.9e+33) tmp = x; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -62000000000.0], N[(a / y), $MachinePrecision], If[LessEqual[z, 2.9e+33], x, N[(a / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -62000000000:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+33}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -6.2e10 or 2.90000000000000025e33 < z Initial program 34.1%
Taylor expanded in y around -inf 31.1%
mul-1-neg31.1%
unsub-neg31.1%
mul-1-neg31.1%
distribute-neg-frac31.1%
cancel-sign-sub-inv31.1%
associate-/l*44.9%
metadata-eval44.9%
*-lft-identity44.9%
associate-/l*52.5%
Simplified52.5%
Taylor expanded in a around inf 17.8%
associate-*r/17.8%
associate-*r*17.8%
neg-mul-117.8%
*-commutative17.8%
sub-neg17.8%
metadata-eval17.8%
Simplified17.8%
Taylor expanded in z around inf 19.1%
if -6.2e10 < z < 2.90000000000000025e33Initial program 89.3%
Taylor expanded in z around 0 46.4%
Final simplification33.6%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.12) (/ t b) (if (<= z 2.4e-48) x (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.12) {
tmp = t / b;
} else if (z <= 2.4e-48) {
tmp = x;
} else {
tmp = t / 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 <= (-1.12d0)) then
tmp = t / b
else if (z <= 2.4d-48) then
tmp = x
else
tmp = t / 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 <= -1.12) {
tmp = t / b;
} else if (z <= 2.4e-48) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.12: tmp = t / b elif z <= 2.4e-48: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.12) tmp = Float64(t / b); elseif (z <= 2.4e-48) tmp = x; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.12) tmp = t / b; elseif (z <= 2.4e-48) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.12], N[(t / b), $MachinePrecision], If[LessEqual[z, 2.4e-48], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.12:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-48}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -1.1200000000000001 or 2.4e-48 < z Initial program 41.6%
Taylor expanded in z around inf 65.9%
associate--l+65.9%
*-commutative65.9%
times-frac73.7%
+-commutative73.7%
times-frac92.7%
Simplified92.7%
Taylor expanded in b around inf 46.7%
associate--l+46.7%
associate-*r/50.6%
Simplified50.6%
Taylor expanded in t around inf 25.7%
if -1.1200000000000001 < z < 2.4e-48Initial program 88.6%
Taylor expanded in z around 0 50.9%
Final simplification37.4%
(FPCore (x y z t a b) :precision binary64 (if (<= z -7.2e-16) (/ (- a) b) (if (<= z 1.8e-48) x (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7.2e-16) {
tmp = -a / b;
} else if (z <= 1.8e-48) {
tmp = x;
} else {
tmp = t / 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 <= (-7.2d-16)) then
tmp = -a / b
else if (z <= 1.8d-48) then
tmp = x
else
tmp = t / 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 <= -7.2e-16) {
tmp = -a / b;
} else if (z <= 1.8e-48) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -7.2e-16: tmp = -a / b elif z <= 1.8e-48: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -7.2e-16) tmp = Float64(Float64(-a) / b); elseif (z <= 1.8e-48) tmp = x; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -7.2e-16) tmp = -a / b; elseif (z <= 1.8e-48) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7.2e-16], N[((-a) / b), $MachinePrecision], If[LessEqual[z, 1.8e-48], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{-16}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-48}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -7.19999999999999965e-16Initial program 36.9%
Taylor expanded in a around inf 18.3%
mul-1-neg18.3%
distribute-lft-neg-out18.3%
*-commutative18.3%
Simplified18.3%
Taylor expanded in y around 0 25.9%
associate-*r/25.9%
neg-mul-125.9%
Simplified25.9%
if -7.19999999999999965e-16 < z < 1.8000000000000001e-48Initial program 89.2%
Taylor expanded in z around 0 51.6%
if 1.8000000000000001e-48 < z Initial program 46.2%
Taylor expanded in z around inf 68.4%
associate--l+68.4%
*-commutative68.4%
times-frac77.8%
+-commutative77.8%
times-frac88.8%
Simplified88.8%
Taylor expanded in b around inf 52.2%
associate--l+52.2%
associate-*r/55.6%
Simplified55.6%
Taylor expanded in t around inf 26.9%
Final simplification37.9%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 63.4%
Taylor expanded in z around 0 26.1%
Final simplification26.1%
(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 2023274
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:herbie-target
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))