
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2
(+
(/ (- (* x (/ y (- b y))) (* y (/ (- t a) (pow (- b y) 2.0)))) z)
(/ (- a t) (- y b))))
(t_3 (/ (+ (* x y) (* z (- t a))) t_1))
(t_4 (/ (- t a) (* x (- b y)))))
(if (<= t_3 (- INFINITY))
(* x (+ (/ -1.0 (+ z -1.0)) t_4))
(if (<= t_3 -5e-276)
t_3
(if (<= t_3 0.0)
t_2
(if (<= t_3 2e+244)
t_3
(if (<= t_3 INFINITY) (* x (+ t_4 (/ y t_1))) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (((x * (y / (b - y))) - (y * ((t - a) / pow((b - y), 2.0)))) / z) + ((a - t) / (y - b));
double t_3 = ((x * y) + (z * (t - a))) / t_1;
double t_4 = (t - a) / (x * (b - y));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = x * ((-1.0 / (z + -1.0)) + t_4);
} else if (t_3 <= -5e-276) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_2;
} else if (t_3 <= 2e+244) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = x * (t_4 + (y / t_1));
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (((x * (y / (b - y))) - (y * ((t - a) / Math.pow((b - y), 2.0)))) / z) + ((a - t) / (y - b));
double t_3 = ((x * y) + (z * (t - a))) / t_1;
double t_4 = (t - a) / (x * (b - y));
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = x * ((-1.0 / (z + -1.0)) + t_4);
} else if (t_3 <= -5e-276) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_2;
} else if (t_3 <= 2e+244) {
tmp = t_3;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = x * (t_4 + (y / t_1));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (((x * (y / (b - y))) - (y * ((t - a) / math.pow((b - y), 2.0)))) / z) + ((a - t) / (y - b)) t_3 = ((x * y) + (z * (t - a))) / t_1 t_4 = (t - a) / (x * (b - y)) tmp = 0 if t_3 <= -math.inf: tmp = x * ((-1.0 / (z + -1.0)) + t_4) elif t_3 <= -5e-276: tmp = t_3 elif t_3 <= 0.0: tmp = t_2 elif t_3 <= 2e+244: tmp = t_3 elif t_3 <= math.inf: tmp = x * (t_4 + (y / t_1)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(Float64(Float64(x * Float64(y / Float64(b - y))) - Float64(y * Float64(Float64(t - a) / (Float64(b - y) ^ 2.0)))) / z) + Float64(Float64(a - t) / Float64(y - b))) t_3 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_1) t_4 = Float64(Float64(t - a) / Float64(x * Float64(b - y))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(x * Float64(Float64(-1.0 / Float64(z + -1.0)) + t_4)); elseif (t_3 <= -5e-276) tmp = t_3; elseif (t_3 <= 0.0) tmp = t_2; elseif (t_3 <= 2e+244) tmp = t_3; elseif (t_3 <= Inf) tmp = Float64(x * Float64(t_4 + Float64(y / t_1))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (((x * (y / (b - y))) - (y * ((t - a) / ((b - y) ^ 2.0)))) / z) + ((a - t) / (y - b)); t_3 = ((x * y) + (z * (t - a))) / t_1; t_4 = (t - a) / (x * (b - y)); tmp = 0.0; if (t_3 <= -Inf) tmp = x * ((-1.0 / (z + -1.0)) + t_4); elseif (t_3 <= -5e-276) tmp = t_3; elseif (t_3 <= 0.0) tmp = t_2; elseif (t_3 <= 2e+244) tmp = t_3; elseif (t_3 <= Inf) tmp = x * (t_4 + (y / t_1)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(t - a), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(x * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(x * N[(N[(-1.0 / N[(z + -1.0), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -5e-276], t$95$3, If[LessEqual[t$95$3, 0.0], t$95$2, If[LessEqual[t$95$3, 2e+244], t$95$3, If[LessEqual[t$95$3, Infinity], N[(x * N[(t$95$4 + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{x \cdot \frac{y}{b - y} - y \cdot \frac{t - a}{{\left(b - y\right)}^{2}}}{z} + \frac{a - t}{y - b}\\
t_3 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t\_1}\\
t_4 := \frac{t - a}{x \cdot \left(b - y\right)}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;x \cdot \left(\frac{-1}{z + -1} + t\_4\right)\\
\mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-276}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+244}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;x \cdot \left(t\_4 + \frac{y}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 47.0%
Taylor expanded in x around inf 79.5%
Taylor expanded in z around inf 93.5%
Taylor expanded in y around inf 93.9%
neg-mul-193.9%
sub-neg93.9%
Simplified93.9%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99999999999999967e-276 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000015e244Initial program 99.5%
if -4.99999999999999967e-276 < (/.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 7.1%
Taylor expanded in z around -inf 59.7%
associate--l+59.7%
mul-1-neg59.7%
distribute-lft-out--59.7%
associate-/l*67.3%
associate-/l*99.9%
div-sub99.9%
Simplified99.9%
if 2.00000000000000015e244 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 20.9%
Taylor expanded in x around inf 65.4%
Taylor expanded in z around inf 87.2%
Final simplification97.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y))))))
(if (or (<= t_1 (- INFINITY))
(and (not (<= t_1 -5e-276))
(or (<= t_1 0.0) (not (<= t_1 2e+244)))))
(* x (+ (/ -1.0 (+ z -1.0)) (/ (- t a) (* x (- b y)))))
t_1)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double tmp;
if ((t_1 <= -((double) INFINITY)) || (!(t_1 <= -5e-276) && ((t_1 <= 0.0) || !(t_1 <= 2e+244)))) {
tmp = x * ((-1.0 / (z + -1.0)) + ((t - a) / (x * (b - y))));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || (!(t_1 <= -5e-276) && ((t_1 <= 0.0) || !(t_1 <= 2e+244)))) {
tmp = x * ((-1.0 / (z + -1.0)) + ((t - a) / (x * (b - y))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) tmp = 0 if (t_1 <= -math.inf) or (not (t_1 <= -5e-276) and ((t_1 <= 0.0) or not (t_1 <= 2e+244))): tmp = x * ((-1.0 / (z + -1.0)) + ((t - a) / (x * (b - y)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || (!(t_1 <= -5e-276) && ((t_1 <= 0.0) || !(t_1 <= 2e+244)))) tmp = Float64(x * Float64(Float64(-1.0 / Float64(z + -1.0)) + Float64(Float64(t - a) / Float64(x * Float64(b - y))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); tmp = 0.0; if ((t_1 <= -Inf) || (~((t_1 <= -5e-276)) && ((t_1 <= 0.0) || ~((t_1 <= 2e+244))))) tmp = x * ((-1.0 / (z + -1.0)) + ((t - a) / (x * (b - y)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[Or[LessEqual[t$95$1, (-Infinity)], And[N[Not[LessEqual[t$95$1, -5e-276]], $MachinePrecision], Or[LessEqual[t$95$1, 0.0], N[Not[LessEqual[t$95$1, 2e+244]], $MachinePrecision]]]], N[(x * N[(N[(-1.0 / N[(z + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(x * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq -5 \cdot 10^{-276}\right) \land \left(t\_1 \leq 0 \lor \neg \left(t\_1 \leq 2 \cdot 10^{+244}\right)\right):\\
\;\;\;\;x \cdot \left(\frac{-1}{z + -1} + \frac{t - a}{x \cdot \left(b - y\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;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.0 or -4.99999999999999967e-276 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 2.00000000000000015e244 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 21.0%
Taylor expanded in x around inf 41.9%
Taylor expanded in z around inf 73.9%
Taylor expanded in y around inf 82.4%
neg-mul-182.4%
sub-neg82.4%
Simplified82.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99999999999999967e-276 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000015e244Initial program 99.5%
Final simplification92.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (+ (/ -1.0 (+ z -1.0)) (/ (- t a) (* x (- b y)))))))
(if (<= y -1.55e+31)
t_1
(if (<= y -5.5e-103)
(/ (+ (* x y) (* z t)) (+ y (* z (- b y))))
(if (<= y 2.1e+30) (/ (- a t) (- y b)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * ((-1.0 / (z + -1.0)) + ((t - a) / (x * (b - y))));
double tmp;
if (y <= -1.55e+31) {
tmp = t_1;
} else if (y <= -5.5e-103) {
tmp = ((x * y) + (z * t)) / (y + (z * (b - y)));
} else if (y <= 2.1e+30) {
tmp = (a - t) / (y - 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 + (-1.0d0))) + ((t - a) / (x * (b - y))))
if (y <= (-1.55d+31)) then
tmp = t_1
else if (y <= (-5.5d-103)) then
tmp = ((x * y) + (z * t)) / (y + (z * (b - y)))
else if (y <= 2.1d+30) then
tmp = (a - t) / (y - 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 + -1.0)) + ((t - a) / (x * (b - y))));
double tmp;
if (y <= -1.55e+31) {
tmp = t_1;
} else if (y <= -5.5e-103) {
tmp = ((x * y) + (z * t)) / (y + (z * (b - y)));
} else if (y <= 2.1e+30) {
tmp = (a - t) / (y - b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * ((-1.0 / (z + -1.0)) + ((t - a) / (x * (b - y)))) tmp = 0 if y <= -1.55e+31: tmp = t_1 elif y <= -5.5e-103: tmp = ((x * y) + (z * t)) / (y + (z * (b - y))) elif y <= 2.1e+30: tmp = (a - t) / (y - b) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(Float64(-1.0 / Float64(z + -1.0)) + Float64(Float64(t - a) / Float64(x * Float64(b - y))))) tmp = 0.0 if (y <= -1.55e+31) tmp = t_1; elseif (y <= -5.5e-103) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) / Float64(y + Float64(z * Float64(b - y)))); elseif (y <= 2.1e+30) tmp = Float64(Float64(a - t) / Float64(y - 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 + -1.0)) + ((t - a) / (x * (b - y)))); tmp = 0.0; if (y <= -1.55e+31) tmp = t_1; elseif (y <= -5.5e-103) tmp = ((x * y) + (z * t)) / (y + (z * (b - y))); elseif (y <= 2.1e+30) tmp = (a - t) / (y - b); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[(-1.0 / N[(z + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(x * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.55e+31], t$95$1, If[LessEqual[y, -5.5e-103], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+30], N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{-1}{z + -1} + \frac{t - a}{x \cdot \left(b - y\right)}\right)\\
\mathbf{if}\;y \leq -1.55 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-103}:\\
\;\;\;\;\frac{x \cdot y + z \cdot t}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+30}:\\
\;\;\;\;\frac{a - t}{y - b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.5500000000000001e31 or 2.1e30 < y Initial program 48.4%
Taylor expanded in x around inf 65.6%
Taylor expanded in z around inf 68.2%
Taylor expanded in y around inf 74.9%
neg-mul-174.9%
sub-neg74.9%
Simplified74.9%
if -1.5500000000000001e31 < y < -5.50000000000000032e-103Initial program 86.9%
Taylor expanded in a around 0 78.1%
if -5.50000000000000032e-103 < y < 2.1e30Initial program 79.4%
Taylor expanded in z around inf 75.5%
Final simplification75.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* x z))))
(if (<= y -2.4e-43)
t_1
(if (<= y 8e-229)
(/ t b)
(if (<= y 1e+61) (/ a (- b)) (if (<= y 2.05e+222) t_1 (/ x (- z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (x * z);
double tmp;
if (y <= -2.4e-43) {
tmp = t_1;
} else if (y <= 8e-229) {
tmp = t / b;
} else if (y <= 1e+61) {
tmp = a / -b;
} else if (y <= 2.05e+222) {
tmp = t_1;
} else {
tmp = x / -z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (x * z)
if (y <= (-2.4d-43)) then
tmp = t_1
else if (y <= 8d-229) then
tmp = t / b
else if (y <= 1d+61) then
tmp = a / -b
else if (y <= 2.05d+222) then
tmp = t_1
else
tmp = x / -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (x * z);
double tmp;
if (y <= -2.4e-43) {
tmp = t_1;
} else if (y <= 8e-229) {
tmp = t / b;
} else if (y <= 1e+61) {
tmp = a / -b;
} else if (y <= 2.05e+222) {
tmp = t_1;
} else {
tmp = x / -z;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (x * z) tmp = 0 if y <= -2.4e-43: tmp = t_1 elif y <= 8e-229: tmp = t / b elif y <= 1e+61: tmp = a / -b elif y <= 2.05e+222: tmp = t_1 else: tmp = x / -z return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(x * z)) tmp = 0.0 if (y <= -2.4e-43) tmp = t_1; elseif (y <= 8e-229) tmp = Float64(t / b); elseif (y <= 1e+61) tmp = Float64(a / Float64(-b)); elseif (y <= 2.05e+222) tmp = t_1; else tmp = Float64(x / Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (x * z); tmp = 0.0; if (y <= -2.4e-43) tmp = t_1; elseif (y <= 8e-229) tmp = t / b; elseif (y <= 1e+61) tmp = a / -b; elseif (y <= 2.05e+222) tmp = t_1; else tmp = x / -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e-43], t$95$1, If[LessEqual[y, 8e-229], N[(t / b), $MachinePrecision], If[LessEqual[y, 1e+61], N[(a / (-b)), $MachinePrecision], If[LessEqual[y, 2.05e+222], t$95$1, N[(x / (-z)), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + x \cdot z\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{-43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-229}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq 10^{+61}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+222}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-z}\\
\end{array}
\end{array}
if y < -2.4000000000000002e-43 or 9.99999999999999949e60 < y < 2.04999999999999994e222Initial program 56.5%
Taylor expanded in x around inf 34.5%
associate-/l*52.6%
+-commutative52.6%
fma-undefine52.7%
Simplified52.7%
Taylor expanded in y around inf 51.4%
mul-1-neg51.4%
unsub-neg51.4%
Simplified51.4%
Taylor expanded in z around 0 39.4%
*-commutative39.4%
Simplified39.4%
if -2.4000000000000002e-43 < y < 8.00000000000000055e-229Initial program 87.6%
Taylor expanded in t around inf 55.2%
*-commutative55.2%
Simplified55.2%
Taylor expanded in y around 0 56.2%
if 8.00000000000000055e-229 < y < 9.99999999999999949e60Initial program 71.1%
Taylor expanded in x around inf 59.4%
associate-/l*55.0%
Simplified55.0%
Taylor expanded in z around inf 55.8%
Taylor expanded in t around 0 40.3%
mul-1-neg40.3%
Simplified40.3%
Taylor expanded in b around inf 38.4%
associate-*r/38.4%
mul-1-neg38.4%
Simplified38.4%
if 2.04999999999999994e222 < y Initial program 17.8%
Taylor expanded in x around inf 7.9%
associate-/l*34.0%
+-commutative34.0%
fma-undefine34.0%
Simplified34.0%
Taylor expanded in y around inf 79.4%
mul-1-neg79.4%
unsub-neg79.4%
Simplified79.4%
Taylor expanded in z around inf 54.2%
associate-*r/54.2%
mul-1-neg54.2%
Simplified54.2%
Final simplification44.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -1.6e+50)
t_1
(if (<= z -5.1)
(/ x (- z))
(if (<= z -4.5e-37) (/ a (- b)) (if (<= z 5.5e-55) x t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -1.6e+50) {
tmp = t_1;
} else if (z <= -5.1) {
tmp = x / -z;
} else if (z <= -4.5e-37) {
tmp = a / -b;
} else if (z <= 5.5e-55) {
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 = t / (b - y)
if (z <= (-1.6d+50)) then
tmp = t_1
else if (z <= (-5.1d0)) then
tmp = x / -z
else if (z <= (-4.5d-37)) then
tmp = a / -b
else if (z <= 5.5d-55) 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 = t / (b - y);
double tmp;
if (z <= -1.6e+50) {
tmp = t_1;
} else if (z <= -5.1) {
tmp = x / -z;
} else if (z <= -4.5e-37) {
tmp = a / -b;
} else if (z <= 5.5e-55) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -1.6e+50: tmp = t_1 elif z <= -5.1: tmp = x / -z elif z <= -4.5e-37: tmp = a / -b elif z <= 5.5e-55: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -1.6e+50) tmp = t_1; elseif (z <= -5.1) tmp = Float64(x / Float64(-z)); elseif (z <= -4.5e-37) tmp = Float64(a / Float64(-b)); elseif (z <= 5.5e-55) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -1.6e+50) tmp = t_1; elseif (z <= -5.1) tmp = x / -z; elseif (z <= -4.5e-37) tmp = a / -b; elseif (z <= 5.5e-55) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+50], t$95$1, If[LessEqual[z, -5.1], N[(x / (-z)), $MachinePrecision], If[LessEqual[z, -4.5e-37], N[(a / (-b)), $MachinePrecision], If[LessEqual[z, 5.5e-55], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.1:\\
\;\;\;\;\frac{x}{-z}\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-37}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-55}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.59999999999999991e50 or 5.4999999999999999e-55 < z Initial program 50.9%
Taylor expanded in t around inf 31.2%
*-commutative31.2%
Simplified31.2%
Taylor expanded in z around inf 48.8%
if -1.59999999999999991e50 < z < -5.0999999999999996Initial program 67.3%
Taylor expanded in x around inf 24.5%
associate-/l*35.3%
+-commutative35.3%
fma-undefine35.3%
Simplified35.3%
Taylor expanded in y around inf 55.9%
mul-1-neg55.9%
unsub-neg55.9%
Simplified55.9%
Taylor expanded in z around inf 54.8%
associate-*r/54.8%
mul-1-neg54.8%
Simplified54.8%
if -5.0999999999999996 < z < -4.5000000000000004e-37Initial program 99.6%
Taylor expanded in x around inf 72.2%
associate-/l*72.2%
Simplified72.2%
Taylor expanded in z around inf 58.3%
Taylor expanded in t around 0 46.4%
mul-1-neg46.4%
Simplified46.4%
Taylor expanded in b around inf 44.9%
associate-*r/44.9%
mul-1-neg44.9%
Simplified44.9%
if -4.5000000000000004e-37 < z < 5.4999999999999999e-55Initial program 83.6%
Taylor expanded in z around 0 53.5%
Final simplification50.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.6e-34) (not (<= z 3500.0))) (/ (- a t) (- y b)) (/ (+ (* x y) (* z t)) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.6e-34) || !(z <= 3500.0)) {
tmp = (a - t) / (y - b);
} else {
tmp = ((x * y) + (z * t)) / (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 <= (-2.6d-34)) .or. (.not. (z <= 3500.0d0))) then
tmp = (a - t) / (y - b)
else
tmp = ((x * y) + (z * t)) / (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 <= -2.6e-34) || !(z <= 3500.0)) {
tmp = (a - t) / (y - b);
} else {
tmp = ((x * y) + (z * t)) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.6e-34) or not (z <= 3500.0): tmp = (a - t) / (y - b) else: tmp = ((x * y) + (z * t)) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.6e-34) || !(z <= 3500.0)) tmp = Float64(Float64(a - t) / Float64(y - b)); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) / 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 <= -2.6e-34) || ~((z <= 3500.0))) tmp = (a - t) / (y - b); else tmp = ((x * y) + (z * t)) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.6e-34], N[Not[LessEqual[z, 3500.0]], $MachinePrecision]], N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-34} \lor \neg \left(z \leq 3500\right):\\
\;\;\;\;\frac{a - t}{y - b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot t}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -2.5999999999999999e-34 or 3500 < z Initial program 48.4%
Taylor expanded in z around inf 77.6%
if -2.5999999999999999e-34 < z < 3500Initial program 85.5%
Taylor expanded in a around 0 70.8%
Final simplification74.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.9e-34)
x
(if (<= y 3.3e-228)
(/ t b)
(if (<= y 1.85e+61) (/ a (- b)) (if (<= y 1.66e+224) x (/ x (- z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.9e-34) {
tmp = x;
} else if (y <= 3.3e-228) {
tmp = t / b;
} else if (y <= 1.85e+61) {
tmp = a / -b;
} else if (y <= 1.66e+224) {
tmp = x;
} else {
tmp = x / -z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-4.9d-34)) then
tmp = x
else if (y <= 3.3d-228) then
tmp = t / b
else if (y <= 1.85d+61) then
tmp = a / -b
else if (y <= 1.66d+224) then
tmp = x
else
tmp = x / -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.9e-34) {
tmp = x;
} else if (y <= 3.3e-228) {
tmp = t / b;
} else if (y <= 1.85e+61) {
tmp = a / -b;
} else if (y <= 1.66e+224) {
tmp = x;
} else {
tmp = x / -z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.9e-34: tmp = x elif y <= 3.3e-228: tmp = t / b elif y <= 1.85e+61: tmp = a / -b elif y <= 1.66e+224: tmp = x else: tmp = x / -z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.9e-34) tmp = x; elseif (y <= 3.3e-228) tmp = Float64(t / b); elseif (y <= 1.85e+61) tmp = Float64(a / Float64(-b)); elseif (y <= 1.66e+224) tmp = x; else tmp = Float64(x / Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.9e-34) tmp = x; elseif (y <= 3.3e-228) tmp = t / b; elseif (y <= 1.85e+61) tmp = a / -b; elseif (y <= 1.66e+224) tmp = x; else tmp = x / -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.9e-34], x, If[LessEqual[y, 3.3e-228], N[(t / b), $MachinePrecision], If[LessEqual[y, 1.85e+61], N[(a / (-b)), $MachinePrecision], If[LessEqual[y, 1.66e+224], x, N[(x / (-z)), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.9 \cdot 10^{-34}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-228}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+61}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;y \leq 1.66 \cdot 10^{+224}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-z}\\
\end{array}
\end{array}
if y < -4.89999999999999962e-34 or 1.85000000000000001e61 < y < 1.65999999999999996e224Initial program 56.5%
Taylor expanded in z around 0 39.2%
if -4.89999999999999962e-34 < y < 3.30000000000000006e-228Initial program 87.6%
Taylor expanded in t around inf 55.2%
*-commutative55.2%
Simplified55.2%
Taylor expanded in y around 0 56.2%
if 3.30000000000000006e-228 < y < 1.85000000000000001e61Initial program 71.1%
Taylor expanded in x around inf 59.4%
associate-/l*55.0%
Simplified55.0%
Taylor expanded in z around inf 55.8%
Taylor expanded in t around 0 40.3%
mul-1-neg40.3%
Simplified40.3%
Taylor expanded in b around inf 38.4%
associate-*r/38.4%
mul-1-neg38.4%
Simplified38.4%
if 1.65999999999999996e224 < y Initial program 17.8%
Taylor expanded in x around inf 7.9%
associate-/l*34.0%
+-commutative34.0%
fma-undefine34.0%
Simplified34.0%
Taylor expanded in y around inf 79.4%
mul-1-neg79.4%
unsub-neg79.4%
Simplified79.4%
Taylor expanded in z around inf 54.2%
associate-*r/54.2%
mul-1-neg54.2%
Simplified54.2%
Final simplification44.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.8e-50) (not (<= z 3.7e-56))) (/ (- a t) (- y b)) (* x (/ y (+ y (* z (- b y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.8e-50) || !(z <= 3.7e-56)) {
tmp = (a - t) / (y - b);
} else {
tmp = x * (y / (y + (z * (b - y))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-6.8d-50)) .or. (.not. (z <= 3.7d-56))) then
tmp = (a - t) / (y - b)
else
tmp = x * (y / (y + (z * (b - y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.8e-50) || !(z <= 3.7e-56)) {
tmp = (a - t) / (y - b);
} else {
tmp = x * (y / (y + (z * (b - y))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.8e-50) or not (z <= 3.7e-56): tmp = (a - t) / (y - b) else: tmp = x * (y / (y + (z * (b - y)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.8e-50) || !(z <= 3.7e-56)) tmp = Float64(Float64(a - t) / Float64(y - b)); else tmp = Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.8e-50) || ~((z <= 3.7e-56))) tmp = (a - t) / (y - b); else tmp = x * (y / (y + (z * (b - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.8e-50], N[Not[LessEqual[z, 3.7e-56]], $MachinePrecision]], N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{-50} \lor \neg \left(z \leq 3.7 \cdot 10^{-56}\right):\\
\;\;\;\;\frac{a - t}{y - b}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -6.80000000000000029e-50 or 3.7000000000000002e-56 < z Initial program 54.9%
Taylor expanded in z around inf 71.6%
if -6.80000000000000029e-50 < z < 3.7000000000000002e-56Initial program 83.8%
Taylor expanded in x around inf 54.1%
associate-/l*70.1%
+-commutative70.1%
fma-undefine70.2%
Simplified70.2%
fma-undefine70.1%
Applied egg-rr70.1%
Final simplification71.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -0.00055)
t_1
(if (<= y 2.2e-228) (/ t (- b y)) (if (<= y 8.5e+60) (/ 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 <= -0.00055) {
tmp = t_1;
} else if (y <= 2.2e-228) {
tmp = t / (b - y);
} else if (y <= 8.5e+60) {
tmp = 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 <= (-0.00055d0)) then
tmp = t_1
else if (y <= 2.2d-228) then
tmp = t / (b - y)
else if (y <= 8.5d+60) then
tmp = 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 <= -0.00055) {
tmp = t_1;
} else if (y <= 2.2e-228) {
tmp = t / (b - y);
} else if (y <= 8.5e+60) {
tmp = 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 <= -0.00055: tmp = t_1 elif y <= 2.2e-228: tmp = t / (b - y) elif y <= 8.5e+60: tmp = 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 <= -0.00055) tmp = t_1; elseif (y <= 2.2e-228) tmp = Float64(t / Float64(b - y)); elseif (y <= 8.5e+60) tmp = Float64(a / Float64(-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 <= -0.00055) tmp = t_1; elseif (y <= 2.2e-228) tmp = t / (b - y); elseif (y <= 8.5e+60) tmp = 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, -0.00055], t$95$1, If[LessEqual[y, 2.2e-228], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e+60], N[(a / (-b)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -0.00055:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-228}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+60}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.50000000000000033e-4 or 8.50000000000000064e60 < y Initial program 50.1%
Taylor expanded in y around inf 57.2%
mul-1-neg57.2%
unsub-neg57.2%
Simplified57.2%
if -5.50000000000000033e-4 < y < 2.2e-228Initial program 85.8%
Taylor expanded in t around inf 52.9%
*-commutative52.9%
Simplified52.9%
Taylor expanded in z around inf 59.8%
if 2.2e-228 < y < 8.50000000000000064e60Initial program 71.1%
Taylor expanded in x around inf 59.4%
associate-/l*55.0%
Simplified55.0%
Taylor expanded in z around inf 55.8%
Taylor expanded in t around 0 40.3%
mul-1-neg40.3%
Simplified40.3%
Taylor expanded in b around inf 38.4%
associate-*r/38.4%
mul-1-neg38.4%
Simplified38.4%
Final simplification53.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6.1e-26) x (if (<= y 2e-229) (/ t b) (if (<= y 1.2e+63) (/ a (- b)) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.1e-26) {
tmp = x;
} else if (y <= 2e-229) {
tmp = t / b;
} else if (y <= 1.2e+63) {
tmp = a / -b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-6.1d-26)) then
tmp = x
else if (y <= 2d-229) then
tmp = t / b
else if (y <= 1.2d+63) then
tmp = a / -b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.1e-26) {
tmp = x;
} else if (y <= 2e-229) {
tmp = t / b;
} else if (y <= 1.2e+63) {
tmp = a / -b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.1e-26: tmp = x elif y <= 2e-229: tmp = t / b elif y <= 1.2e+63: tmp = a / -b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.1e-26) tmp = x; elseif (y <= 2e-229) tmp = Float64(t / b); elseif (y <= 1.2e+63) tmp = Float64(a / Float64(-b)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6.1e-26) tmp = x; elseif (y <= 2e-229) tmp = t / b; elseif (y <= 1.2e+63) tmp = a / -b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.1e-26], x, If[LessEqual[y, 2e-229], N[(t / b), $MachinePrecision], If[LessEqual[y, 1.2e+63], N[(a / (-b)), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.1 \cdot 10^{-26}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-229}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+63}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.09999999999999995e-26 or 1.2e63 < y Initial program 50.5%
Taylor expanded in z around 0 37.5%
if -6.09999999999999995e-26 < y < 2.00000000000000014e-229Initial program 87.6%
Taylor expanded in t around inf 55.2%
*-commutative55.2%
Simplified55.2%
Taylor expanded in y around 0 56.2%
if 2.00000000000000014e-229 < y < 1.2e63Initial program 71.1%
Taylor expanded in x around inf 59.4%
associate-/l*55.0%
Simplified55.0%
Taylor expanded in z around inf 55.8%
Taylor expanded in t around 0 40.3%
mul-1-neg40.3%
Simplified40.3%
Taylor expanded in b around inf 38.4%
associate-*r/38.4%
mul-1-neg38.4%
Simplified38.4%
Final simplification42.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -7.8e-50) (not (<= z 1.56e-55))) (/ (- a t) (- y b)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7.8e-50) || !(z <= 1.56e-55)) {
tmp = (a - t) / (y - b);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-7.8d-50)) .or. (.not. (z <= 1.56d-55))) then
tmp = (a - t) / (y - b)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7.8e-50) || !(z <= 1.56e-55)) {
tmp = (a - t) / (y - b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -7.8e-50) or not (z <= 1.56e-55): tmp = (a - t) / (y - b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -7.8e-50) || !(z <= 1.56e-55)) tmp = Float64(Float64(a - t) / Float64(y - b)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -7.8e-50) || ~((z <= 1.56e-55))) tmp = (a - t) / (y - b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -7.8e-50], N[Not[LessEqual[z, 1.56e-55]], $MachinePrecision]], N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{-50} \lor \neg \left(z \leq 1.56 \cdot 10^{-55}\right):\\
\;\;\;\;\frac{a - t}{y - b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -7.80000000000000042e-50 or 1.56e-55 < z Initial program 54.9%
Taylor expanded in z around inf 71.6%
if -7.80000000000000042e-50 < z < 1.56e-55Initial program 83.8%
Taylor expanded in z around 0 55.2%
Final simplification65.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.9e-25) (not (<= y 8.5e+60))) (/ x (- 1.0 z)) (/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.9e-25) || !(y <= 8.5e+60)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.9d-25)) .or. (.not. (y <= 8.5d+60))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.9e-25) || !(y <= 8.5e+60)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.9e-25) or not (y <= 8.5e+60): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.9e-25) || !(y <= 8.5e+60)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.9e-25) || ~((y <= 8.5e+60))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.9e-25], N[Not[LessEqual[y, 8.5e+60]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{-25} \lor \neg \left(y \leq 8.5 \cdot 10^{+60}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -2.9000000000000001e-25 or 8.50000000000000064e60 < y Initial program 50.5%
Taylor expanded in y around inf 55.8%
mul-1-neg55.8%
unsub-neg55.8%
Simplified55.8%
if -2.9000000000000001e-25 < y < 8.50000000000000064e60Initial program 79.3%
Taylor expanded in y around 0 65.5%
Final simplification60.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.6e-37) (not (<= z 1.1e+21))) (/ a y) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.6e-37) || !(z <= 1.1e+21)) {
tmp = a / 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 <= (-4.6d-37)) .or. (.not. (z <= 1.1d+21))) then
tmp = a / 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 <= -4.6e-37) || !(z <= 1.1e+21)) {
tmp = a / y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.6e-37) or not (z <= 1.1e+21): tmp = a / y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.6e-37) || !(z <= 1.1e+21)) tmp = Float64(a / y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.6e-37) || ~((z <= 1.1e+21))) tmp = a / y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.6e-37], N[Not[LessEqual[z, 1.1e+21]], $MachinePrecision]], N[(a / y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{-37} \lor \neg \left(z \leq 1.1 \cdot 10^{+21}\right):\\
\;\;\;\;\frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.5999999999999999e-37 or 1.1e21 < z Initial program 48.6%
Taylor expanded in x around inf 36.3%
associate-/l*36.1%
Simplified36.1%
Taylor expanded in z around inf 61.0%
Taylor expanded in t around 0 34.4%
mul-1-neg34.4%
Simplified34.4%
Taylor expanded in b around 0 16.3%
if -4.5999999999999999e-37 < z < 1.1e21Initial program 84.3%
Taylor expanded in z around 0 45.5%
Final simplification30.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -3.3e-36) x (if (<= y 2.4e-61) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.3e-36) {
tmp = x;
} else if (y <= 2.4e-61) {
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 <= (-3.3d-36)) then
tmp = x
else if (y <= 2.4d-61) 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 <= -3.3e-36) {
tmp = x;
} else if (y <= 2.4e-61) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.3e-36: tmp = x elif y <= 2.4e-61: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.3e-36) tmp = x; elseif (y <= 2.4e-61) 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 <= -3.3e-36) tmp = x; elseif (y <= 2.4e-61) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.3e-36], x, If[LessEqual[y, 2.4e-61], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{-36}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-61}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.29999999999999991e-36 or 2.4000000000000001e-61 < y Initial program 52.7%
Taylor expanded in z around 0 34.0%
if -3.29999999999999991e-36 < y < 2.4000000000000001e-61Initial program 83.9%
Taylor expanded in t around inf 43.7%
*-commutative43.7%
Simplified43.7%
Taylor expanded in y around 0 48.1%
Final simplification39.8%
(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.5%
Taylor expanded in z around 0 23.1%
Final simplification23.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 2024059
(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)))))