
(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 18 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) (* z (- t a))) t_1))
(t_3 (* x (+ (/ y t_1) (/ (/ (- t a) x) (- b y))))))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 -2e-301)
t_2
(if (<= t_2 0.0)
(/ (+ (* z (- (/ t (- b y)) (/ a (- b y)))) (/ (* x y) (- b y))) z)
(if (<= t_2 2e+306)
t_2
(if (<= t_2 INFINITY)
t_3
(+
(+ (/ (* x (/ y z)) (- b y)) (/ (- t a) (- b y)))
(* y (/ (- a t) (* z (pow (- b y) 2.0))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((x * y) + (z * (t - a))) / t_1;
double t_3 = x * ((y / t_1) + (((t - a) / x) / (b - y)));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= -2e-301) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = ((z * ((t / (b - y)) - (a / (b - y)))) + ((x * y) / (b - y))) / z;
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = (((x * (y / z)) / (b - y)) + ((t - a) / (b - y))) + (y * ((a - t) / (z * pow((b - y), 2.0))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((x * y) + (z * (t - a))) / t_1;
double t_3 = x * ((y / t_1) + (((t - a) / x) / (b - y)));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_2 <= -2e-301) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = ((z * ((t / (b - y)) - (a / (b - y)))) + ((x * y) / (b - y))) / z;
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = (((x * (y / z)) / (b - y)) + ((t - a) / (b - y))) + (y * ((a - t) / (z * Math.pow((b - y), 2.0))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = ((x * y) + (z * (t - a))) / t_1 t_3 = x * ((y / t_1) + (((t - a) / x) / (b - y))) tmp = 0 if t_2 <= -math.inf: tmp = t_3 elif t_2 <= -2e-301: tmp = t_2 elif t_2 <= 0.0: tmp = ((z * ((t / (b - y)) - (a / (b - y)))) + ((x * y) / (b - y))) / z elif t_2 <= 2e+306: tmp = t_2 elif t_2 <= math.inf: tmp = t_3 else: tmp = (((x * (y / z)) / (b - y)) + ((t - a) / (b - y))) + (y * ((a - t) / (z * math.pow((b - y), 2.0)))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_1) t_3 = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(Float64(t - a) / x) / Float64(b - y)))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= -2e-301) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(Float64(z * Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y)))) + Float64(Float64(x * y) / Float64(b - y))) / z); elseif (t_2 <= 2e+306) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3; else tmp = Float64(Float64(Float64(Float64(x * Float64(y / z)) / Float64(b - y)) + Float64(Float64(t - a) / Float64(b - y))) + Float64(y * Float64(Float64(a - t) / Float64(z * (Float64(b - y) ^ 2.0))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = ((x * y) + (z * (t - a))) / t_1; t_3 = x * ((y / t_1) + (((t - a) / x) / (b - y))); tmp = 0.0; if (t_2 <= -Inf) tmp = t_3; elseif (t_2 <= -2e-301) tmp = t_2; elseif (t_2 <= 0.0) tmp = ((z * ((t / (b - y)) - (a / (b - y)))) + ((x * y) / (b - y))) / z; elseif (t_2 <= 2e+306) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3; else tmp = (((x * (y / z)) / (b - y)) + ((t - a) / (b - y))) + (y * ((a - t) / (z * ((b - y) ^ 2.0)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(N[(t - a), $MachinePrecision] / x), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -2e-301], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(N[(z * N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 2e+306], t$95$2, If[LessEqual[t$95$2, Infinity], t$95$3, N[(N[(N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a - t), $MachinePrecision] / N[(z * N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t\_1}\\
t_3 := x \cdot \left(\frac{y}{t\_1} + \frac{\frac{t - a}{x}}{b - y}\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-301}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{z \cdot \left(\frac{t}{b - y} - \frac{a}{b - y}\right) + \frac{x \cdot y}{b - y}}{z}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{x \cdot \frac{y}{z}}{b - y} + \frac{t - a}{b - y}\right) + y \cdot \frac{a - t}{z \cdot {\left(b - y\right)}^{2}}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 26.1%
Taylor expanded in x around inf 66.4%
Taylor expanded in z around inf 86.6%
associate-/r*86.6%
Simplified86.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000013e-301 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000003e306Initial program 99.5%
if -2.00000000000000013e-301 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 26.5%
Taylor expanded in x around inf 26.5%
Taylor expanded in z around inf 73.6%
associate-/r*68.3%
Simplified68.3%
Taylor expanded in z around inf 73.6%
fma-define73.6%
div-sub73.6%
times-frac94.4%
Simplified94.4%
Taylor expanded in z around 0 100.0%
if +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 0.0%
Taylor expanded in z around inf 32.4%
associate--r+32.4%
+-commutative32.4%
associate--l+32.4%
associate-/r*32.8%
associate-/l*41.3%
div-sub41.3%
associate-/l*88.6%
Simplified88.6%
Final simplification95.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (+ (* x y) (* z (- t a))) t_1))
(t_3 (* x (+ (/ y t_1) (/ (/ (- t a) x) (- b y))))))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 -2e-301)
t_2
(if (<= t_2 0.0)
(/ (+ (* z (- (/ t (- b y)) (/ a (- b y)))) (/ (* x y) (- b y))) z)
(if (<= t_2 2e+306)
t_2
(if (<= t_2 INFINITY) t_3 (/ (- t a) (- b y)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((x * y) + (z * (t - a))) / t_1;
double t_3 = x * ((y / t_1) + (((t - a) / x) / (b - y)));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= -2e-301) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = ((z * ((t / (b - y)) - (a / (b - y)))) + ((x * y) / (b - y))) / z;
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((x * y) + (z * (t - a))) / t_1;
double t_3 = x * ((y / t_1) + (((t - a) / x) / (b - y)));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_2 <= -2e-301) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = ((z * ((t / (b - y)) - (a / (b - y)))) + ((x * y) / (b - y))) / z;
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = ((x * y) + (z * (t - a))) / t_1 t_3 = x * ((y / t_1) + (((t - a) / x) / (b - y))) tmp = 0 if t_2 <= -math.inf: tmp = t_3 elif t_2 <= -2e-301: tmp = t_2 elif t_2 <= 0.0: tmp = ((z * ((t / (b - y)) - (a / (b - y)))) + ((x * y) / (b - y))) / z elif t_2 <= 2e+306: tmp = t_2 elif t_2 <= math.inf: tmp = t_3 else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_1) t_3 = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(Float64(t - a) / x) / Float64(b - y)))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= -2e-301) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(Float64(z * Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y)))) + Float64(Float64(x * y) / Float64(b - y))) / z); elseif (t_2 <= 2e+306) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3; else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = ((x * y) + (z * (t - a))) / t_1; t_3 = x * ((y / t_1) + (((t - a) / x) / (b - y))); tmp = 0.0; if (t_2 <= -Inf) tmp = t_3; elseif (t_2 <= -2e-301) tmp = t_2; elseif (t_2 <= 0.0) tmp = ((z * ((t / (b - y)) - (a / (b - y)))) + ((x * y) / (b - y))) / z; elseif (t_2 <= 2e+306) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3; else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(N[(t - a), $MachinePrecision] / x), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -2e-301], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(N[(z * N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 2e+306], t$95$2, If[LessEqual[t$95$2, Infinity], t$95$3, N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t\_1}\\
t_3 := x \cdot \left(\frac{y}{t\_1} + \frac{\frac{t - a}{x}}{b - y}\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-301}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{z \cdot \left(\frac{t}{b - y} - \frac{a}{b - y}\right) + \frac{x \cdot y}{b - y}}{z}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\
\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.0 or 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 26.1%
Taylor expanded in x around inf 66.4%
Taylor expanded in z around inf 86.6%
associate-/r*86.6%
Simplified86.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000013e-301 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000003e306Initial program 99.5%
if -2.00000000000000013e-301 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 26.5%
Taylor expanded in x around inf 26.5%
Taylor expanded in z around inf 73.6%
associate-/r*68.3%
Simplified68.3%
Taylor expanded in z around inf 73.6%
fma-define73.6%
div-sub73.6%
times-frac94.4%
Simplified94.4%
Taylor expanded in z around 0 100.0%
if +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 0.0%
Taylor expanded in z around inf 77.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (- t a) (- b y)))
(t_3 (/ (+ (* x y) (* z (- t a))) t_1))
(t_4 (* x (+ (/ y t_1) (/ (/ (- t a) x) (- b y))))))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -2e-238)
t_3
(if (<= t_3 0.0)
t_2
(if (<= t_3 2e+306) t_3 (if (<= t_3 INFINITY) t_4 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double t_3 = ((x * y) + (z * (t - a))) / t_1;
double t_4 = x * ((y / t_1) + (((t - a) / x) / (b - y)));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -2e-238) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_2;
} else if (t_3 <= 2e+306) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_4;
} 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 = (t - a) / (b - y);
double t_3 = ((x * y) + (z * (t - a))) / t_1;
double t_4 = x * ((y / t_1) + (((t - a) / x) / (b - y)));
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_4;
} else if (t_3 <= -2e-238) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_2;
} else if (t_3 <= 2e+306) {
tmp = t_3;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_4;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (t - a) / (b - y) t_3 = ((x * y) + (z * (t - a))) / t_1 t_4 = x * ((y / t_1) + (((t - a) / x) / (b - y))) tmp = 0 if t_3 <= -math.inf: tmp = t_4 elif t_3 <= -2e-238: tmp = t_3 elif t_3 <= 0.0: tmp = t_2 elif t_3 <= 2e+306: tmp = t_3 elif t_3 <= math.inf: tmp = t_4 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_1) t_4 = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(Float64(t - a) / x) / Float64(b - y)))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -2e-238) tmp = t_3; elseif (t_3 <= 0.0) tmp = t_2; elseif (t_3 <= 2e+306) tmp = t_3; elseif (t_3 <= Inf) tmp = t_4; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (t - a) / (b - y); t_3 = ((x * y) + (z * (t - a))) / t_1; t_4 = x * ((y / t_1) + (((t - a) / x) / (b - y))); tmp = 0.0; if (t_3 <= -Inf) tmp = t_4; elseif (t_3 <= -2e-238) tmp = t_3; elseif (t_3 <= 0.0) tmp = t_2; elseif (t_3 <= 2e+306) tmp = t_3; elseif (t_3 <= Inf) tmp = t_4; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, 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[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(N[(t - a), $MachinePrecision] / x), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -2e-238], t$95$3, If[LessEqual[t$95$3, 0.0], t$95$2, If[LessEqual[t$95$3, 2e+306], t$95$3, If[LessEqual[t$95$3, Infinity], t$95$4, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y}\\
t_3 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t\_1}\\
t_4 := x \cdot \left(\frac{y}{t\_1} + \frac{\frac{t - a}{x}}{b - y}\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-238}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_4\\
\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.0 or 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 26.1%
Taylor expanded in x around inf 66.4%
Taylor expanded in z around inf 86.6%
associate-/r*86.6%
Simplified86.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-238 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000003e306Initial program 99.5%
if -2e-238 < (/.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 10.9%
Taylor expanded in z around inf 78.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a))) (t_2 (/ (- t a) (- b y))))
(if (<= z -6e-64)
t_2
(if (<= z -1.6e-215)
(/ (+ (* x y) (* z t)) (+ y (* z (- b y))))
(if (<= z 3.4e-168)
(/ (+ (* x y) t_1) (- y (* y z)))
(if (<= z 1.0) (/ t_1 (+ y (* z b))) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -6e-64) {
tmp = t_2;
} else if (z <= -1.6e-215) {
tmp = ((x * y) + (z * t)) / (y + (z * (b - y)));
} else if (z <= 3.4e-168) {
tmp = ((x * y) + t_1) / (y - (y * z));
} else if (z <= 1.0) {
tmp = t_1 / (y + (z * b));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * (t - a)
t_2 = (t - a) / (b - y)
if (z <= (-6d-64)) then
tmp = t_2
else if (z <= (-1.6d-215)) then
tmp = ((x * y) + (z * t)) / (y + (z * (b - y)))
else if (z <= 3.4d-168) then
tmp = ((x * y) + t_1) / (y - (y * z))
else if (z <= 1.0d0) then
tmp = t_1 / (y + (z * b))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -6e-64) {
tmp = t_2;
} else if (z <= -1.6e-215) {
tmp = ((x * y) + (z * t)) / (y + (z * (b - y)));
} else if (z <= 3.4e-168) {
tmp = ((x * y) + t_1) / (y - (y * z));
} else if (z <= 1.0) {
tmp = t_1 / (y + (z * b));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = (t - a) / (b - y) tmp = 0 if z <= -6e-64: tmp = t_2 elif z <= -1.6e-215: tmp = ((x * y) + (z * t)) / (y + (z * (b - y))) elif z <= 3.4e-168: tmp = ((x * y) + t_1) / (y - (y * z)) elif z <= 1.0: tmp = t_1 / (y + (z * b)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -6e-64) tmp = t_2; elseif (z <= -1.6e-215) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 3.4e-168) tmp = Float64(Float64(Float64(x * y) + t_1) / Float64(y - Float64(y * z))); elseif (z <= 1.0) tmp = Float64(t_1 / Float64(y + Float64(z * b))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -6e-64) tmp = t_2; elseif (z <= -1.6e-215) tmp = ((x * y) + (z * t)) / (y + (z * (b - y))); elseif (z <= 3.4e-168) tmp = ((x * y) + t_1) / (y - (y * z)); elseif (z <= 1.0) tmp = t_1 / (y + (z * b)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e-64], t$95$2, If[LessEqual[z, -1.6e-215], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e-168], N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / N[(y - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], N[(t$95$1 / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -6 \cdot 10^{-64}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-215}:\\
\;\;\;\;\frac{x \cdot y + z \cdot t}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-168}:\\
\;\;\;\;\frac{x \cdot y + t\_1}{y - y \cdot z}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\frac{t\_1}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.0000000000000001e-64 or 1 < z Initial program 45.1%
Taylor expanded in z around inf 77.5%
if -6.0000000000000001e-64 < z < -1.6000000000000001e-215Initial program 87.1%
Taylor expanded in t around inf 70.9%
*-commutative70.9%
Simplified70.9%
if -1.6000000000000001e-215 < z < 3.40000000000000022e-168Initial program 83.6%
Taylor expanded in b around 0 74.3%
mul-1-neg74.3%
*-commutative74.3%
Simplified74.3%
if 3.40000000000000022e-168 < z < 1Initial program 90.4%
Taylor expanded in x around 0 66.7%
Taylor expanded in b around inf 66.7%
Final simplification74.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a))) (t_2 (/ (- t a) (- b y))))
(if (<= z -1.7e+27)
t_2
(if (<= z -8e-199)
(/ t_1 (+ y (* z (- b y))))
(if (<= z 4.2e-169)
(/ (- (* z a) (* x y)) (* y (+ z -1.0)))
(if (<= z 1.0) (/ t_1 (+ y (* z b))) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.7e+27) {
tmp = t_2;
} else if (z <= -8e-199) {
tmp = t_1 / (y + (z * (b - y)));
} else if (z <= 4.2e-169) {
tmp = ((z * a) - (x * y)) / (y * (z + -1.0));
} else if (z <= 1.0) {
tmp = t_1 / (y + (z * b));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * (t - a)
t_2 = (t - a) / (b - y)
if (z <= (-1.7d+27)) then
tmp = t_2
else if (z <= (-8d-199)) then
tmp = t_1 / (y + (z * (b - y)))
else if (z <= 4.2d-169) then
tmp = ((z * a) - (x * y)) / (y * (z + (-1.0d0)))
else if (z <= 1.0d0) then
tmp = t_1 / (y + (z * b))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.7e+27) {
tmp = t_2;
} else if (z <= -8e-199) {
tmp = t_1 / (y + (z * (b - y)));
} else if (z <= 4.2e-169) {
tmp = ((z * a) - (x * y)) / (y * (z + -1.0));
} else if (z <= 1.0) {
tmp = t_1 / (y + (z * b));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = (t - a) / (b - y) tmp = 0 if z <= -1.7e+27: tmp = t_2 elif z <= -8e-199: tmp = t_1 / (y + (z * (b - y))) elif z <= 4.2e-169: tmp = ((z * a) - (x * y)) / (y * (z + -1.0)) elif z <= 1.0: tmp = t_1 / (y + (z * b)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.7e+27) tmp = t_2; elseif (z <= -8e-199) tmp = Float64(t_1 / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 4.2e-169) tmp = Float64(Float64(Float64(z * a) - Float64(x * y)) / Float64(y * Float64(z + -1.0))); elseif (z <= 1.0) tmp = Float64(t_1 / Float64(y + Float64(z * b))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.7e+27) tmp = t_2; elseif (z <= -8e-199) tmp = t_1 / (y + (z * (b - y))); elseif (z <= 4.2e-169) tmp = ((z * a) - (x * y)) / (y * (z + -1.0)); elseif (z <= 1.0) tmp = t_1 / (y + (z * b)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.7e+27], t$95$2, If[LessEqual[z, -8e-199], N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-169], N[(N[(N[(z * a), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], N[(t$95$1 / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.7 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-199}:\\
\;\;\;\;\frac{t\_1}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-169}:\\
\;\;\;\;\frac{z \cdot a - x \cdot y}{y \cdot \left(z + -1\right)}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\frac{t\_1}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.7e27 or 1 < z Initial program 40.0%
Taylor expanded in z around inf 79.8%
if -1.7e27 < z < -7.99999999999999986e-199Initial program 85.4%
Taylor expanded in x around 0 54.9%
if -7.99999999999999986e-199 < z < 4.2000000000000001e-169Initial program 85.0%
Taylor expanded in b around 0 73.1%
mul-1-neg73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in t around 0 65.8%
+-commutative65.8%
mul-1-neg65.8%
unsub-neg65.8%
*-commutative65.8%
cancel-sign-sub-inv65.8%
*-lft-identity65.8%
distribute-rgt-in65.8%
sub-neg65.8%
Simplified65.8%
if 4.2000000000000001e-169 < z < 1Initial program 90.4%
Taylor expanded in x around 0 66.7%
Taylor expanded in b around inf 66.7%
Final simplification70.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a))) (t_2 (/ (- t a) (- b y))))
(if (<= z -52000000.0)
t_2
(if (<= z -2.2e-174)
(/ t_1 (+ y (* z (- b y))))
(if (<= z 5.5e-142)
(/ x (- 1.0 z))
(if (<= z 1.0) (/ t_1 (+ y (* z b))) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -52000000.0) {
tmp = t_2;
} else if (z <= -2.2e-174) {
tmp = t_1 / (y + (z * (b - y)));
} else if (z <= 5.5e-142) {
tmp = x / (1.0 - z);
} else if (z <= 1.0) {
tmp = t_1 / (y + (z * b));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * (t - a)
t_2 = (t - a) / (b - y)
if (z <= (-52000000.0d0)) then
tmp = t_2
else if (z <= (-2.2d-174)) then
tmp = t_1 / (y + (z * (b - y)))
else if (z <= 5.5d-142) then
tmp = x / (1.0d0 - z)
else if (z <= 1.0d0) then
tmp = t_1 / (y + (z * b))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -52000000.0) {
tmp = t_2;
} else if (z <= -2.2e-174) {
tmp = t_1 / (y + (z * (b - y)));
} else if (z <= 5.5e-142) {
tmp = x / (1.0 - z);
} else if (z <= 1.0) {
tmp = t_1 / (y + (z * b));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = (t - a) / (b - y) tmp = 0 if z <= -52000000.0: tmp = t_2 elif z <= -2.2e-174: tmp = t_1 / (y + (z * (b - y))) elif z <= 5.5e-142: tmp = x / (1.0 - z) elif z <= 1.0: tmp = t_1 / (y + (z * b)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -52000000.0) tmp = t_2; elseif (z <= -2.2e-174) tmp = Float64(t_1 / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 5.5e-142) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= 1.0) tmp = Float64(t_1 / Float64(y + Float64(z * b))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -52000000.0) tmp = t_2; elseif (z <= -2.2e-174) tmp = t_1 / (y + (z * (b - y))); elseif (z <= 5.5e-142) tmp = x / (1.0 - z); elseif (z <= 1.0) tmp = t_1 / (y + (z * b)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -52000000.0], t$95$2, If[LessEqual[z, -2.2e-174], N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e-142], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], N[(t$95$1 / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -52000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-174}:\\
\;\;\;\;\frac{t\_1}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-142}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\frac{t\_1}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -5.2e7 or 1 < z Initial program 40.8%
Taylor expanded in z around inf 78.6%
if -5.2e7 < z < -2.20000000000000022e-174Initial program 89.8%
Taylor expanded in x around 0 60.8%
if -2.20000000000000022e-174 < z < 5.50000000000000023e-142Initial program 82.8%
Taylor expanded in y around inf 59.3%
mul-1-neg59.3%
unsub-neg59.3%
Simplified59.3%
if 5.50000000000000023e-142 < z < 1Initial program 91.9%
Taylor expanded in x around 0 68.8%
Taylor expanded in b around inf 68.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* z (- t a)) (+ y (* z b)))) (t_2 (/ (- t a) (- b y))))
(if (<= z -1.7e+27)
t_2
(if (<= z -4e-166)
t_1
(if (<= z 1.2e-139) (/ x (- 1.0 z)) (if (<= z 1.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (t - a)) / (y + (z * b));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.7e+27) {
tmp = t_2;
} else if (z <= -4e-166) {
tmp = t_1;
} else if (z <= 1.2e-139) {
tmp = x / (1.0 - z);
} else if (z <= 1.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z * (t - a)) / (y + (z * b))
t_2 = (t - a) / (b - y)
if (z <= (-1.7d+27)) then
tmp = t_2
else if (z <= (-4d-166)) then
tmp = t_1
else if (z <= 1.2d-139) then
tmp = x / (1.0d0 - z)
else if (z <= 1.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (t - a)) / (y + (z * b));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.7e+27) {
tmp = t_2;
} else if (z <= -4e-166) {
tmp = t_1;
} else if (z <= 1.2e-139) {
tmp = x / (1.0 - z);
} else if (z <= 1.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * (t - a)) / (y + (z * b)) t_2 = (t - a) / (b - y) tmp = 0 if z <= -1.7e+27: tmp = t_2 elif z <= -4e-166: tmp = t_1 elif z <= 1.2e-139: tmp = x / (1.0 - z) elif z <= 1.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * b))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.7e+27) tmp = t_2; elseif (z <= -4e-166) tmp = t_1; elseif (z <= 1.2e-139) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= 1.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * (t - a)) / (y + (z * b)); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.7e+27) tmp = t_2; elseif (z <= -4e-166) tmp = t_1; elseif (z <= 1.2e-139) tmp = x / (1.0 - z); elseif (z <= 1.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.7e+27], t$95$2, If[LessEqual[z, -4e-166], t$95$1, If[LessEqual[z, 1.2e-139], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(t - a\right)}{y + z \cdot b}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.7 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-166}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-139}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.7e27 or 1 < z Initial program 40.0%
Taylor expanded in z around inf 79.8%
if -1.7e27 < z < -4.00000000000000016e-166 or 1.20000000000000007e-139 < z < 1Initial program 90.0%
Taylor expanded in x around 0 63.6%
Taylor expanded in b around inf 62.8%
if -4.00000000000000016e-166 < z < 1.20000000000000007e-139Initial program 82.8%
Taylor expanded in y around inf 59.3%
mul-1-neg59.3%
unsub-neg59.3%
Simplified59.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.8e+42) (not (<= z 6e+63))) (/ (- t a) (- b y)) (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.8e+42) || !(z <= 6e+63)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3.8d+42)) .or. (.not. (z <= 6d+63))) then
tmp = (t - a) / (b - y)
else
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.8e+42) || !(z <= 6e+63)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.8e+42) or not (z <= 6e+63): tmp = (t - a) / (b - y) else: tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.8e+42) || !(z <= 6e+63)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.8e+42) || ~((z <= 6e+63))) tmp = (t - a) / (b - y); else tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.8e+42], N[Not[LessEqual[z, 6e+63]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+42} \lor \neg \left(z \leq 6 \cdot 10^{+63}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -3.7999999999999998e42 or 5.99999999999999998e63 < z Initial program 32.1%
Taylor expanded in z around inf 80.8%
if -3.7999999999999998e42 < z < 5.99999999999999998e63Initial program 86.8%
Final simplification84.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6e-64) (not (<= z 1.6e-6))) (/ (- t a) (- b y)) (/ (+ (* 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 <= -6e-64) || !(z <= 1.6e-6)) {
tmp = (t - a) / (b - y);
} 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 <= (-6d-64)) .or. (.not. (z <= 1.6d-6))) then
tmp = (t - a) / (b - y)
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 <= -6e-64) || !(z <= 1.6e-6)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * t)) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6e-64) or not (z <= 1.6e-6): tmp = (t - a) / (b - y) 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 <= -6e-64) || !(z <= 1.6e-6)) tmp = Float64(Float64(t - a) / Float64(b - y)); 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 <= -6e-64) || ~((z <= 1.6e-6))) tmp = (t - a) / (b - y); 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, -6e-64], N[Not[LessEqual[z, 1.6e-6]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $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 -6 \cdot 10^{-64} \lor \neg \left(z \leq 1.6 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot t}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -6.0000000000000001e-64 or 1.5999999999999999e-6 < z Initial program 46.0%
Taylor expanded in z around inf 77.1%
if -6.0000000000000001e-64 < z < 1.5999999999999999e-6Initial program 86.5%
Taylor expanded in t around inf 64.7%
*-commutative64.7%
Simplified64.7%
Final simplification70.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -3.8e+35)
t_1
(if (<= y -2.15e-32)
(/ (- a t) y)
(if (<= y 0.00035) (/ (- t a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.8e+35) {
tmp = t_1;
} else if (y <= -2.15e-32) {
tmp = (a - t) / y;
} else if (y <= 0.00035) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-3.8d+35)) then
tmp = t_1
else if (y <= (-2.15d-32)) then
tmp = (a - t) / y
else if (y <= 0.00035d0) then
tmp = (t - a) / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.8e+35) {
tmp = t_1;
} else if (y <= -2.15e-32) {
tmp = (a - t) / y;
} else if (y <= 0.00035) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -3.8e+35: tmp = t_1 elif y <= -2.15e-32: tmp = (a - t) / y elif y <= 0.00035: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -3.8e+35) tmp = t_1; elseif (y <= -2.15e-32) tmp = Float64(Float64(a - t) / y); elseif (y <= 0.00035) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -3.8e+35) tmp = t_1; elseif (y <= -2.15e-32) tmp = (a - t) / y; elseif (y <= 0.00035) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e+35], t$95$1, If[LessEqual[y, -2.15e-32], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 0.00035], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.15 \cdot 10^{-32}:\\
\;\;\;\;\frac{a - t}{y}\\
\mathbf{elif}\;y \leq 0.00035:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.8e35 or 3.49999999999999996e-4 < y Initial program 52.7%
Taylor expanded in y around inf 53.8%
mul-1-neg53.8%
unsub-neg53.8%
Simplified53.8%
if -3.8e35 < y < -2.14999999999999995e-32Initial program 58.8%
Taylor expanded in z around inf 69.4%
Taylor expanded in b around 0 59.0%
mul-1-neg59.0%
distribute-neg-frac259.0%
Simplified59.0%
if -2.14999999999999995e-32 < y < 3.49999999999999996e-4Initial program 80.6%
Taylor expanded in y around 0 59.1%
Final simplification56.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.2e-64) (not (<= z 1.32e-135))) (/ (- t a) (- b y)) (+ x (* x z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.2e-64) || !(z <= 1.32e-135)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (x * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3.2d-64)) .or. (.not. (z <= 1.32d-135))) then
tmp = (t - a) / (b - y)
else
tmp = x + (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.2e-64) || !(z <= 1.32e-135)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (x * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.2e-64) or not (z <= 1.32e-135): tmp = (t - a) / (b - y) else: tmp = x + (x * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.2e-64) || !(z <= 1.32e-135)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.2e-64) || ~((z <= 1.32e-135))) tmp = (t - a) / (b - y); else tmp = x + (x * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.2e-64], N[Not[LessEqual[z, 1.32e-135]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{-64} \lor \neg \left(z \leq 1.32 \cdot 10^{-135}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot z\\
\end{array}
\end{array}
if z < -3.19999999999999975e-64 or 1.32000000000000007e-135 < z Initial program 55.8%
Taylor expanded in z around inf 69.0%
if -3.19999999999999975e-64 < z < 1.32000000000000007e-135Initial program 84.7%
Taylor expanded in y around inf 51.7%
mul-1-neg51.7%
unsub-neg51.7%
Simplified51.7%
Taylor expanded in z around 0 51.7%
Final simplification62.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2e-32) (not (<= y 6.5e-6))) (/ 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 <= -2e-32) || !(y <= 6.5e-6)) {
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 <= (-2d-32)) .or. (.not. (y <= 6.5d-6))) 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 <= -2e-32) || !(y <= 6.5e-6)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2e-32) or not (y <= 6.5e-6): 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 <= -2e-32) || !(y <= 6.5e-6)) 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 <= -2e-32) || ~((y <= 6.5e-6))) 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, -2e-32], N[Not[LessEqual[y, 6.5e-6]], $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 \cdot 10^{-32} \lor \neg \left(y \leq 6.5 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -2.00000000000000011e-32 or 6.4999999999999996e-6 < y Initial program 53.4%
Taylor expanded in y around inf 49.9%
mul-1-neg49.9%
unsub-neg49.9%
Simplified49.9%
if -2.00000000000000011e-32 < y < 6.4999999999999996e-6Initial program 80.6%
Taylor expanded in y around 0 59.1%
Final simplification54.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.8e+46) (not (<= y 17000.0))) (/ x (- 1.0 z)) (/ t (- b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.8e+46) || !(y <= 17000.0)) {
tmp = x / (1.0 - z);
} else {
tmp = t / (b - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.8d+46)) .or. (.not. (y <= 17000.0d0))) then
tmp = x / (1.0d0 - z)
else
tmp = t / (b - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.8e+46) || !(y <= 17000.0)) {
tmp = x / (1.0 - z);
} else {
tmp = t / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.8e+46) or not (y <= 17000.0): tmp = x / (1.0 - z) else: tmp = t / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.8e+46) || !(y <= 17000.0)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(t / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.8e+46) || ~((y <= 17000.0))) tmp = x / (1.0 - z); else tmp = t / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.8e+46], N[Not[LessEqual[y, 17000.0]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+46} \lor \neg \left(y \leq 17000\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y}\\
\end{array}
\end{array}
if y < -1.7999999999999999e46 or 17000 < y Initial program 52.7%
Taylor expanded in y around inf 54.7%
mul-1-neg54.7%
unsub-neg54.7%
Simplified54.7%
if -1.7999999999999999e46 < y < 17000Initial program 77.7%
Taylor expanded in z around inf 67.4%
Taylor expanded in t around inf 39.5%
Final simplification46.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.8e-64) (not (<= z 8.6e-48))) (/ t (- b y)) (+ x (* x z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.8e-64) || !(z <= 8.6e-48)) {
tmp = t / (b - y);
} else {
tmp = x + (x * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-4.8d-64)) .or. (.not. (z <= 8.6d-48))) then
tmp = t / (b - y)
else
tmp = x + (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.8e-64) || !(z <= 8.6e-48)) {
tmp = t / (b - y);
} else {
tmp = x + (x * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.8e-64) or not (z <= 8.6e-48): tmp = t / (b - y) else: tmp = x + (x * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.8e-64) || !(z <= 8.6e-48)) tmp = Float64(t / Float64(b - y)); else tmp = Float64(x + Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.8e-64) || ~((z <= 8.6e-48))) tmp = t / (b - y); else tmp = x + (x * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.8e-64], N[Not[LessEqual[z, 8.6e-48]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-64} \lor \neg \left(z \leq 8.6 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot z\\
\end{array}
\end{array}
if z < -4.79999999999999997e-64 or 8.6e-48 < z Initial program 48.8%
Taylor expanded in z around inf 75.5%
Taylor expanded in t around inf 42.8%
if -4.79999999999999997e-64 < z < 8.6e-48Initial program 85.8%
Taylor expanded in y around inf 46.2%
mul-1-neg46.2%
unsub-neg46.2%
Simplified46.2%
Taylor expanded in z around 0 46.2%
Final simplification44.4%
(FPCore (x y z t a b) :precision binary64 (if (<= z -16000000000.0) (/ x (- z)) (if (<= z 1.45e-43) (+ x (* x z)) (/ a y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -16000000000.0) {
tmp = x / -z;
} else if (z <= 1.45e-43) {
tmp = x + (x * z);
} 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 <= (-16000000000.0d0)) then
tmp = x / -z
else if (z <= 1.45d-43) then
tmp = x + (x * z)
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 <= -16000000000.0) {
tmp = x / -z;
} else if (z <= 1.45e-43) {
tmp = x + (x * z);
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -16000000000.0: tmp = x / -z elif z <= 1.45e-43: tmp = x + (x * z) else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -16000000000.0) tmp = Float64(x / Float64(-z)); elseif (z <= 1.45e-43) tmp = Float64(x + Float64(x * z)); else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -16000000000.0) tmp = x / -z; elseif (z <= 1.45e-43) tmp = x + (x * z); else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -16000000000.0], N[(x / (-z)), $MachinePrecision], If[LessEqual[z, 1.45e-43], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], N[(a / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -16000000000:\\
\;\;\;\;\frac{x}{-z}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-43}:\\
\;\;\;\;x + x \cdot z\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -1.6e10Initial program 36.8%
Taylor expanded in y around inf 21.9%
mul-1-neg21.9%
unsub-neg21.9%
Simplified21.9%
Taylor expanded in z around inf 21.9%
associate-*r/21.9%
mul-1-neg21.9%
Simplified21.9%
if -1.6e10 < z < 1.4500000000000001e-43Initial program 86.4%
Taylor expanded in y around inf 42.7%
mul-1-neg42.7%
unsub-neg42.7%
Simplified42.7%
Taylor expanded in z around 0 42.8%
if 1.4500000000000001e-43 < z Initial program 48.6%
Taylor expanded in b around 0 26.7%
mul-1-neg26.7%
*-commutative26.7%
Simplified26.7%
Taylor expanded in t around 0 16.4%
+-commutative16.4%
mul-1-neg16.4%
unsub-neg16.4%
*-commutative16.4%
cancel-sign-sub-inv16.4%
*-lft-identity16.4%
distribute-rgt-in16.4%
sub-neg16.4%
Simplified16.4%
Taylor expanded in z around inf 23.1%
Final simplification33.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -0.0001) (not (<= z 1.45e-43))) (/ a y) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.0001) || !(z <= 1.45e-43)) {
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 <= (-0.0001d0)) .or. (.not. (z <= 1.45d-43))) 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 <= -0.0001) || !(z <= 1.45e-43)) {
tmp = a / y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -0.0001) or not (z <= 1.45e-43): tmp = a / y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -0.0001) || !(z <= 1.45e-43)) 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 <= -0.0001) || ~((z <= 1.45e-43))) tmp = a / y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -0.0001], N[Not[LessEqual[z, 1.45e-43]], $MachinePrecision]], N[(a / y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0001 \lor \neg \left(z \leq 1.45 \cdot 10^{-43}\right):\\
\;\;\;\;\frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.00000000000000005e-4 or 1.4500000000000001e-43 < z Initial program 45.5%
Taylor expanded in b around 0 25.2%
mul-1-neg25.2%
*-commutative25.2%
Simplified25.2%
Taylor expanded in t around 0 15.0%
+-commutative15.0%
mul-1-neg15.0%
unsub-neg15.0%
*-commutative15.0%
cancel-sign-sub-inv15.0%
*-lft-identity15.0%
distribute-rgt-in15.0%
sub-neg15.0%
Simplified15.0%
Taylor expanded in z around inf 20.3%
if -1.00000000000000005e-4 < z < 1.4500000000000001e-43Initial program 86.1%
Taylor expanded in z around 0 43.6%
Final simplification32.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -0.0001) (/ x (- z)) (if (<= z 1.45e-43) x (/ a y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.0001) {
tmp = x / -z;
} else if (z <= 1.45e-43) {
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 <= (-0.0001d0)) then
tmp = x / -z
else if (z <= 1.45d-43) 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 <= -0.0001) {
tmp = x / -z;
} else if (z <= 1.45e-43) {
tmp = x;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.0001: tmp = x / -z elif z <= 1.45e-43: tmp = x else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.0001) tmp = Float64(x / Float64(-z)); elseif (z <= 1.45e-43) 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 <= -0.0001) tmp = x / -z; elseif (z <= 1.45e-43) tmp = x; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.0001], N[(x / (-z)), $MachinePrecision], If[LessEqual[z, 1.45e-43], x, N[(a / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0001:\\
\;\;\;\;\frac{x}{-z}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-43}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -1.00000000000000005e-4Initial program 40.6%
Taylor expanded in y around inf 20.7%
mul-1-neg20.7%
unsub-neg20.7%
Simplified20.7%
Taylor expanded in z around inf 20.7%
associate-*r/20.7%
mul-1-neg20.7%
Simplified20.7%
if -1.00000000000000005e-4 < z < 1.4500000000000001e-43Initial program 86.1%
Taylor expanded in z around 0 43.6%
if 1.4500000000000001e-43 < z Initial program 48.6%
Taylor expanded in b around 0 26.7%
mul-1-neg26.7%
*-commutative26.7%
Simplified26.7%
Taylor expanded in t around 0 16.4%
+-commutative16.4%
mul-1-neg16.4%
unsub-neg16.4%
*-commutative16.4%
cancel-sign-sub-inv16.4%
*-lft-identity16.4%
distribute-rgt-in16.4%
sub-neg16.4%
Simplified16.4%
Taylor expanded in z around inf 23.1%
Final simplification33.1%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 66.3%
Taylor expanded in z around 0 23.9%
(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 2024137
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(! :herbie-platform default (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))