
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (pow (- b y) 2.0))
(t_3 (/ (- t a) (- b y)))
(t_4 (* z (- t a)))
(t_5 (/ (+ (* x y) t_4) t_1))
(t_6 (+ (/ x (- 1.0 z)) t_3)))
(if (<= t_5 (- INFINITY))
t_6
(if (<= t_5 -5e-287)
t_5
(if (<= t_5 0.0)
(+ t_3 (/ (- (/ (* x y) (- b y)) (/ y (/ t_2 (- t a)))) z))
(if (<= t_5 2e+290)
(+ (/ (* x y) t_1) (/ t_4 t_1))
(if (<= t_5 INFINITY)
t_6
(+
(+ t_3 (* (/ y z) (/ x (- b y))))
(* (/ y z) (/ (- a t) 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 = pow((b - y), 2.0);
double t_3 = (t - a) / (b - y);
double t_4 = z * (t - a);
double t_5 = ((x * y) + t_4) / t_1;
double t_6 = (x / (1.0 - z)) + t_3;
double tmp;
if (t_5 <= -((double) INFINITY)) {
tmp = t_6;
} else if (t_5 <= -5e-287) {
tmp = t_5;
} else if (t_5 <= 0.0) {
tmp = t_3 + ((((x * y) / (b - y)) - (y / (t_2 / (t - a)))) / z);
} else if (t_5 <= 2e+290) {
tmp = ((x * y) / t_1) + (t_4 / t_1);
} else if (t_5 <= ((double) INFINITY)) {
tmp = t_6;
} else {
tmp = (t_3 + ((y / z) * (x / (b - y)))) + ((y / z) * ((a - t) / 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 = Math.pow((b - y), 2.0);
double t_3 = (t - a) / (b - y);
double t_4 = z * (t - a);
double t_5 = ((x * y) + t_4) / t_1;
double t_6 = (x / (1.0 - z)) + t_3;
double tmp;
if (t_5 <= -Double.POSITIVE_INFINITY) {
tmp = t_6;
} else if (t_5 <= -5e-287) {
tmp = t_5;
} else if (t_5 <= 0.0) {
tmp = t_3 + ((((x * y) / (b - y)) - (y / (t_2 / (t - a)))) / z);
} else if (t_5 <= 2e+290) {
tmp = ((x * y) / t_1) + (t_4 / t_1);
} else if (t_5 <= Double.POSITIVE_INFINITY) {
tmp = t_6;
} else {
tmp = (t_3 + ((y / z) * (x / (b - y)))) + ((y / z) * ((a - t) / t_2));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = math.pow((b - y), 2.0) t_3 = (t - a) / (b - y) t_4 = z * (t - a) t_5 = ((x * y) + t_4) / t_1 t_6 = (x / (1.0 - z)) + t_3 tmp = 0 if t_5 <= -math.inf: tmp = t_6 elif t_5 <= -5e-287: tmp = t_5 elif t_5 <= 0.0: tmp = t_3 + ((((x * y) / (b - y)) - (y / (t_2 / (t - a)))) / z) elif t_5 <= 2e+290: tmp = ((x * y) / t_1) + (t_4 / t_1) elif t_5 <= math.inf: tmp = t_6 else: tmp = (t_3 + ((y / z) * (x / (b - y)))) + ((y / z) * ((a - t) / t_2)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(b - y) ^ 2.0 t_3 = Float64(Float64(t - a) / Float64(b - y)) t_4 = Float64(z * Float64(t - a)) t_5 = Float64(Float64(Float64(x * y) + t_4) / t_1) t_6 = Float64(Float64(x / Float64(1.0 - z)) + t_3) tmp = 0.0 if (t_5 <= Float64(-Inf)) tmp = t_6; elseif (t_5 <= -5e-287) tmp = t_5; elseif (t_5 <= 0.0) tmp = Float64(t_3 + Float64(Float64(Float64(Float64(x * y) / Float64(b - y)) - Float64(y / Float64(t_2 / Float64(t - a)))) / z)); elseif (t_5 <= 2e+290) tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_4 / t_1)); elseif (t_5 <= Inf) tmp = t_6; else tmp = Float64(Float64(t_3 + Float64(Float64(y / z) * Float64(x / Float64(b - y)))) + Float64(Float64(y / z) * Float64(Float64(a - t) / t_2))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (b - y) ^ 2.0; t_3 = (t - a) / (b - y); t_4 = z * (t - a); t_5 = ((x * y) + t_4) / t_1; t_6 = (x / (1.0 - z)) + t_3; tmp = 0.0; if (t_5 <= -Inf) tmp = t_6; elseif (t_5 <= -5e-287) tmp = t_5; elseif (t_5 <= 0.0) tmp = t_3 + ((((x * y) / (b - y)) - (y / (t_2 / (t - a)))) / z); elseif (t_5 <= 2e+290) tmp = ((x * y) / t_1) + (t_4 / t_1); elseif (t_5 <= Inf) tmp = t_6; else tmp = (t_3 + ((y / z) * (x / (b - y)))) + ((y / z) * ((a - t) / 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[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(x * y), $MachinePrecision] + t$95$4), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], t$95$6, If[LessEqual[t$95$5, -5e-287], t$95$5, If[LessEqual[t$95$5, 0.0], N[(t$95$3 + N[(N[(N[(N[(x * y), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(y / N[(t$95$2 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 2e+290], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$4 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], t$95$6, N[(N[(t$95$3 + N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := {\left(b - y\right)}^{2}\\
t_3 := \frac{t - a}{b - y}\\
t_4 := z \cdot \left(t - a\right)\\
t_5 := \frac{x \cdot y + t\_4}{t\_1}\\
t_6 := \frac{x}{1 - z} + t\_3\\
\mathbf{if}\;t\_5 \leq -\infty:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_5 \leq 0:\\
\;\;\;\;t\_3 + \frac{\frac{x \cdot y}{b - y} - \frac{y}{\frac{t\_2}{t - a}}}{z}\\
\mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_4}{t\_1}\\
\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(t\_3 + \frac{y}{z} \cdot \frac{x}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{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.00000000000000012e290 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 27.7%
Taylor expanded in x around 0 27.7%
Taylor expanded in y around inf 61.7%
neg-mul-161.7%
sub-neg61.7%
Simplified61.7%
Taylor expanded in z around inf 96.7%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000025e-287Initial program 99.0%
if -5.00000000000000025e-287 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 37.3%
Taylor expanded in z around -inf 100.0%
associate--l+100.0%
mul-1-neg100.0%
distribute-lft-out--100.0%
*-commutative100.0%
associate-/l*100.0%
div-sub100.0%
Simplified100.0%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000012e290Initial program 99.6%
Taylor expanded in x around 0 99.7%
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 31.4%
associate--r+31.4%
+-commutative31.4%
associate--l+31.4%
*-commutative31.4%
times-frac45.6%
div-sub45.6%
times-frac99.7%
Simplified99.7%
Final simplification99.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (- t a) (- b y)))
(t_3
(+
(+ t_2 (* (/ y z) (/ x (- b y))))
(* (/ y z) (/ (- a t) (pow (- b y) 2.0)))))
(t_4 (* z (- t a)))
(t_5 (/ (+ (* x y) t_4) t_1))
(t_6 (+ (/ x (- 1.0 z)) t_2)))
(if (<= t_5 (- INFINITY))
t_6
(if (<= t_5 -5e-287)
t_5
(if (<= t_5 0.0)
t_3
(if (<= t_5 2e+290)
(+ (/ (* x y) t_1) (/ t_4 t_1))
(if (<= t_5 INFINITY) t_6 t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double t_3 = (t_2 + ((y / z) * (x / (b - y)))) + ((y / z) * ((a - t) / pow((b - y), 2.0)));
double t_4 = z * (t - a);
double t_5 = ((x * y) + t_4) / t_1;
double t_6 = (x / (1.0 - z)) + t_2;
double tmp;
if (t_5 <= -((double) INFINITY)) {
tmp = t_6;
} else if (t_5 <= -5e-287) {
tmp = t_5;
} else if (t_5 <= 0.0) {
tmp = t_3;
} else if (t_5 <= 2e+290) {
tmp = ((x * y) / t_1) + (t_4 / t_1);
} else if (t_5 <= ((double) INFINITY)) {
tmp = t_6;
} else {
tmp = t_3;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double t_3 = (t_2 + ((y / z) * (x / (b - y)))) + ((y / z) * ((a - t) / Math.pow((b - y), 2.0)));
double t_4 = z * (t - a);
double t_5 = ((x * y) + t_4) / t_1;
double t_6 = (x / (1.0 - z)) + t_2;
double tmp;
if (t_5 <= -Double.POSITIVE_INFINITY) {
tmp = t_6;
} else if (t_5 <= -5e-287) {
tmp = t_5;
} else if (t_5 <= 0.0) {
tmp = t_3;
} else if (t_5 <= 2e+290) {
tmp = ((x * y) / t_1) + (t_4 / t_1);
} else if (t_5 <= Double.POSITIVE_INFINITY) {
tmp = t_6;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (t - a) / (b - y) t_3 = (t_2 + ((y / z) * (x / (b - y)))) + ((y / z) * ((a - t) / math.pow((b - y), 2.0))) t_4 = z * (t - a) t_5 = ((x * y) + t_4) / t_1 t_6 = (x / (1.0 - z)) + t_2 tmp = 0 if t_5 <= -math.inf: tmp = t_6 elif t_5 <= -5e-287: tmp = t_5 elif t_5 <= 0.0: tmp = t_3 elif t_5 <= 2e+290: tmp = ((x * y) / t_1) + (t_4 / t_1) elif t_5 <= math.inf: tmp = t_6 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = Float64(Float64(t_2 + Float64(Float64(y / z) * Float64(x / Float64(b - y)))) + Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))) t_4 = Float64(z * Float64(t - a)) t_5 = Float64(Float64(Float64(x * y) + t_4) / t_1) t_6 = Float64(Float64(x / Float64(1.0 - z)) + t_2) tmp = 0.0 if (t_5 <= Float64(-Inf)) tmp = t_6; elseif (t_5 <= -5e-287) tmp = t_5; elseif (t_5 <= 0.0) tmp = t_3; elseif (t_5 <= 2e+290) tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_4 / t_1)); elseif (t_5 <= Inf) tmp = t_6; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (t - a) / (b - y); t_3 = (t_2 + ((y / z) * (x / (b - y)))) + ((y / z) * ((a - t) / ((b - y) ^ 2.0))); t_4 = z * (t - a); t_5 = ((x * y) + t_4) / t_1; t_6 = (x / (1.0 - z)) + t_2; tmp = 0.0; if (t_5 <= -Inf) tmp = t_6; elseif (t_5 <= -5e-287) tmp = t_5; elseif (t_5 <= 0.0) tmp = t_3; elseif (t_5 <= 2e+290) tmp = ((x * y) / t_1) + (t_4 / t_1); elseif (t_5 <= Inf) tmp = t_6; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(x * y), $MachinePrecision] + t$95$4), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], t$95$6, If[LessEqual[t$95$5, -5e-287], t$95$5, If[LessEqual[t$95$5, 0.0], t$95$3, If[LessEqual[t$95$5, 2e+290], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$4 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], t$95$6, t$95$3]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y}\\
t_3 := \left(t\_2 + \frac{y}{z} \cdot \frac{x}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\
t_4 := z \cdot \left(t - a\right)\\
t_5 := \frac{x \cdot y + t\_4}{t\_1}\\
t_6 := \frac{x}{1 - z} + t\_2\\
\mathbf{if}\;t\_5 \leq -\infty:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_5 \leq 0:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_4}{t\_1}\\
\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 2.00000000000000012e290 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 27.7%
Taylor expanded in x around 0 27.7%
Taylor expanded in y around inf 61.7%
neg-mul-161.7%
sub-neg61.7%
Simplified61.7%
Taylor expanded in z around inf 96.7%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000025e-287Initial program 99.0%
if -5.00000000000000025e-287 < (/.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.1%
Taylor expanded in z around inf 41.0%
associate--r+41.0%
+-commutative41.0%
associate--l+41.0%
*-commutative41.0%
times-frac60.3%
div-sub60.3%
times-frac99.7%
Simplified99.7%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000012e290Initial program 99.6%
Taylor expanded in x around 0 99.7%
Final simplification98.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (* z (- t a)))
(t_3 (/ (+ (* x y) t_2) t_1))
(t_4 (+ (/ x (- 1.0 z)) (/ (- t a) (- b y)))))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -5e-287)
t_3
(if (<= t_3 0.0)
(-
(/ (+ (/ x (/ (- b y) y)) (/ (* y a) (pow (- b y) 2.0))) z)
(/ a (- b y)))
(if (<= t_3 2e+290) (+ (/ (* x y) t_1) (/ t_2 t_1)) t_4))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = z * (t - a);
double t_3 = ((x * y) + t_2) / t_1;
double t_4 = (x / (1.0 - z)) + ((t - a) / (b - y));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -5e-287) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = (((x / ((b - y) / y)) + ((y * a) / pow((b - y), 2.0))) / z) - (a / (b - y));
} else if (t_3 <= 2e+290) {
tmp = ((x * y) / t_1) + (t_2 / t_1);
} else {
tmp = t_4;
}
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 = z * (t - a);
double t_3 = ((x * y) + t_2) / t_1;
double t_4 = (x / (1.0 - z)) + ((t - a) / (b - y));
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_4;
} else if (t_3 <= -5e-287) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = (((x / ((b - y) / y)) + ((y * a) / Math.pow((b - y), 2.0))) / z) - (a / (b - y));
} else if (t_3 <= 2e+290) {
tmp = ((x * y) / t_1) + (t_2 / t_1);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = z * (t - a) t_3 = ((x * y) + t_2) / t_1 t_4 = (x / (1.0 - z)) + ((t - a) / (b - y)) tmp = 0 if t_3 <= -math.inf: tmp = t_4 elif t_3 <= -5e-287: tmp = t_3 elif t_3 <= 0.0: tmp = (((x / ((b - y) / y)) + ((y * a) / math.pow((b - y), 2.0))) / z) - (a / (b - y)) elif t_3 <= 2e+290: tmp = ((x * y) / t_1) + (t_2 / t_1) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(Float64(Float64(x * y) + t_2) / t_1) t_4 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -5e-287) tmp = t_3; elseif (t_3 <= 0.0) tmp = Float64(Float64(Float64(Float64(x / Float64(Float64(b - y) / y)) + Float64(Float64(y * a) / (Float64(b - y) ^ 2.0))) / z) - Float64(a / Float64(b - y))); elseif (t_3 <= 2e+290) tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_2 / t_1)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = z * (t - a); t_3 = ((x * y) + t_2) / t_1; t_4 = (x / (1.0 - z)) + ((t - a) / (b - y)); tmp = 0.0; if (t_3 <= -Inf) tmp = t_4; elseif (t_3 <= -5e-287) tmp = t_3; elseif (t_3 <= 0.0) tmp = (((x / ((b - y) / y)) + ((y * a) / ((b - y) ^ 2.0))) / z) - (a / (b - y)); elseif (t_3 <= 2e+290) tmp = ((x * y) / t_1) + (t_2 / t_1); else tmp = t_4; 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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -5e-287], t$95$3, If[LessEqual[t$95$3, 0.0], N[(N[(N[(N[(x / N[(N[(b - y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(N[(y * a), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+290], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := \frac{x \cdot y + t\_2}{t\_1}\\
t_4 := \frac{x}{1 - z} + \frac{t - a}{b - y}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{\frac{x}{\frac{b - y}{y}} + \frac{y \cdot a}{{\left(b - y\right)}^{2}}}{z} - \frac{a}{b - y}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_2}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\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.00000000000000012e290 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 15.9%
Taylor expanded in x around 0 15.9%
Taylor expanded in y around inf 42.3%
neg-mul-142.3%
sub-neg42.3%
Simplified42.3%
Taylor expanded in z around inf 93.0%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000025e-287Initial program 99.0%
if -5.00000000000000025e-287 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 37.3%
Taylor expanded in t around 0 37.3%
+-commutative37.3%
mul-1-neg37.3%
unsub-neg37.3%
*-commutative37.3%
*-commutative37.3%
Simplified37.3%
Taylor expanded in z around -inf 85.1%
distribute-lft-out85.1%
mul-1-neg85.1%
associate-/l*85.1%
Simplified85.1%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000012e290Initial program 99.6%
Taylor expanded in x around 0 99.7%
Final simplification96.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (* z (- t a)))
(t_3 (/ (+ (* x y) t_2) t_1))
(t_4 (+ (/ x (- 1.0 z)) (/ (- t a) (- b y)))))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -5e-287)
t_3
(if (<= t_3 0.0)
(/ (- (+ t (/ (* x y) z)) a) b)
(if (<= t_3 2e+290) (+ (/ (* x y) t_1) (/ t_2 t_1)) t_4))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = z * (t - a);
double t_3 = ((x * y) + t_2) / t_1;
double t_4 = (x / (1.0 - z)) + ((t - a) / (b - y));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -5e-287) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = ((t + ((x * y) / z)) - a) / b;
} else if (t_3 <= 2e+290) {
tmp = ((x * y) / t_1) + (t_2 / t_1);
} else {
tmp = t_4;
}
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 = z * (t - a);
double t_3 = ((x * y) + t_2) / t_1;
double t_4 = (x / (1.0 - z)) + ((t - a) / (b - y));
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_4;
} else if (t_3 <= -5e-287) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = ((t + ((x * y) / z)) - a) / b;
} else if (t_3 <= 2e+290) {
tmp = ((x * y) / t_1) + (t_2 / t_1);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = z * (t - a) t_3 = ((x * y) + t_2) / t_1 t_4 = (x / (1.0 - z)) + ((t - a) / (b - y)) tmp = 0 if t_3 <= -math.inf: tmp = t_4 elif t_3 <= -5e-287: tmp = t_3 elif t_3 <= 0.0: tmp = ((t + ((x * y) / z)) - a) / b elif t_3 <= 2e+290: tmp = ((x * y) / t_1) + (t_2 / t_1) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(Float64(Float64(x * y) + t_2) / t_1) t_4 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -5e-287) tmp = t_3; elseif (t_3 <= 0.0) tmp = Float64(Float64(Float64(t + Float64(Float64(x * y) / z)) - a) / b); elseif (t_3 <= 2e+290) tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_2 / t_1)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = z * (t - a); t_3 = ((x * y) + t_2) / t_1; t_4 = (x / (1.0 - z)) + ((t - a) / (b - y)); tmp = 0.0; if (t_3 <= -Inf) tmp = t_4; elseif (t_3 <= -5e-287) tmp = t_3; elseif (t_3 <= 0.0) tmp = ((t + ((x * y) / z)) - a) / b; elseif (t_3 <= 2e+290) tmp = ((x * y) / t_1) + (t_2 / t_1); else tmp = t_4; 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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -5e-287], t$95$3, If[LessEqual[t$95$3, 0.0], N[(N[(N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$3, 2e+290], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := \frac{x \cdot y + t\_2}{t\_1}\\
t_4 := \frac{x}{1 - z} + \frac{t - a}{b - y}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{\left(t + \frac{x \cdot y}{z}\right) - a}{b}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_2}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\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.00000000000000012e290 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 15.9%
Taylor expanded in x around 0 15.9%
Taylor expanded in y around inf 42.3%
neg-mul-142.3%
sub-neg42.3%
Simplified42.3%
Taylor expanded in z around inf 93.0%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000025e-287Initial program 99.0%
if -5.00000000000000025e-287 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 37.3%
Taylor expanded in x around 0 37.3%
Taylor expanded in b around inf 77.8%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000012e290Initial program 99.6%
Taylor expanded in x around 0 99.7%
Final simplification96.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(t_2 (+ (/ x (- 1.0 z)) (/ (- t a) (- b y)))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 -5e-287)
t_1
(if (<= t_1 0.0)
(/ (- (+ t (/ (* x y) z)) a) b)
(if (<= t_1 2e+290) t_1 t_2))))))
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 t_2 = (x / (1.0 - z)) + ((t - a) / (b - y));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= -5e-287) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((t + ((x * y) / z)) - a) / b;
} else if (t_1 <= 2e+290) {
tmp = 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 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_2 = (x / (1.0 - z)) + ((t - a) / (b - y));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = t_2;
} else if (t_1 <= -5e-287) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((t + ((x * y) / z)) - a) / b;
} else if (t_1 <= 2e+290) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) t_2 = (x / (1.0 - z)) + ((t - a) / (b - y)) tmp = 0 if t_1 <= -math.inf: tmp = t_2 elif t_1 <= -5e-287: tmp = t_1 elif t_1 <= 0.0: tmp = ((t + ((x * y) / z)) - a) / b elif t_1 <= 2e+290: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= -5e-287) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(t + Float64(Float64(x * y) / z)) - a) / b); elseif (t_1 <= 2e+290) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); t_2 = (x / (1.0 - z)) + ((t - a) / (b - y)); tmp = 0.0; if (t_1 <= -Inf) tmp = t_2; elseif (t_1 <= -5e-287) tmp = t_1; elseif (t_1 <= 0.0) tmp = ((t + ((x * y) / z)) - a) / b; elseif (t_1 <= 2e+290) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -5e-287], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$1, 2e+290], t$95$1, t$95$2]]]]]]
\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)}\\
t_2 := \frac{x}{1 - z} + \frac{t - a}{b - y}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\left(t + \frac{x \cdot y}{z}\right) - a}{b}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;t\_1\\
\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.00000000000000012e290 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 15.9%
Taylor expanded in x around 0 15.9%
Taylor expanded in y around inf 42.3%
neg-mul-142.3%
sub-neg42.3%
Simplified42.3%
Taylor expanded in z around inf 93.0%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000025e-287 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000012e290Initial program 99.4%
if -5.00000000000000025e-287 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 37.3%
Taylor expanded in x around 0 37.3%
Taylor expanded in b around inf 77.8%
Final simplification96.2%
(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 (- 1.0 z)))
(t_4 (* z (- t a))))
(if (<= z -0.05)
(+ t_3 t_2)
(if (<= z 1.1e-73)
(+ t_3 (/ t_4 y))
(if (<= z 0.082) (/ t_4 t_1) (if (<= z 750.0) (/ (* x 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 = (t - a) / (b - y);
double t_3 = x / (1.0 - z);
double t_4 = z * (t - a);
double tmp;
if (z <= -0.05) {
tmp = t_3 + t_2;
} else if (z <= 1.1e-73) {
tmp = t_3 + (t_4 / y);
} else if (z <= 0.082) {
tmp = t_4 / t_1;
} else if (z <= 750.0) {
tmp = (x * y) / 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) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = (t - a) / (b - y)
t_3 = x / (1.0d0 - z)
t_4 = z * (t - a)
if (z <= (-0.05d0)) then
tmp = t_3 + t_2
else if (z <= 1.1d-73) then
tmp = t_3 + (t_4 / y)
else if (z <= 0.082d0) then
tmp = t_4 / t_1
else if (z <= 750.0d0) then
tmp = (x * y) / 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 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double t_3 = x / (1.0 - z);
double t_4 = z * (t - a);
double tmp;
if (z <= -0.05) {
tmp = t_3 + t_2;
} else if (z <= 1.1e-73) {
tmp = t_3 + (t_4 / y);
} else if (z <= 0.082) {
tmp = t_4 / t_1;
} else if (z <= 750.0) {
tmp = (x * 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 = (t - a) / (b - y) t_3 = x / (1.0 - z) t_4 = z * (t - a) tmp = 0 if z <= -0.05: tmp = t_3 + t_2 elif z <= 1.1e-73: tmp = t_3 + (t_4 / y) elif z <= 0.082: tmp = t_4 / t_1 elif z <= 750.0: tmp = (x * 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(t - a) / Float64(b - y)) t_3 = Float64(x / Float64(1.0 - z)) t_4 = Float64(z * Float64(t - a)) tmp = 0.0 if (z <= -0.05) tmp = Float64(t_3 + t_2); elseif (z <= 1.1e-73) tmp = Float64(t_3 + Float64(t_4 / y)); elseif (z <= 0.082) tmp = Float64(t_4 / t_1); elseif (z <= 750.0) tmp = Float64(Float64(x * 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 = (t - a) / (b - y); t_3 = x / (1.0 - z); t_4 = z * (t - a); tmp = 0.0; if (z <= -0.05) tmp = t_3 + t_2; elseif (z <= 1.1e-73) tmp = t_3 + (t_4 / y); elseif (z <= 0.082) tmp = t_4 / t_1; elseif (z <= 750.0) tmp = (x * 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[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.05], N[(t$95$3 + t$95$2), $MachinePrecision], If[LessEqual[z, 1.1e-73], N[(t$95$3 + N[(t$95$4 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.082], N[(t$95$4 / t$95$1), $MachinePrecision], If[LessEqual[z, 750.0], N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision], 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}{1 - z}\\
t_4 := z \cdot \left(t - a\right)\\
\mathbf{if}\;z \leq -0.05:\\
\;\;\;\;t\_3 + t\_2\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-73}:\\
\;\;\;\;t\_3 + \frac{t\_4}{y}\\
\mathbf{elif}\;z \leq 0.082:\\
\;\;\;\;\frac{t\_4}{t\_1}\\
\mathbf{elif}\;z \leq 750:\\
\;\;\;\;\frac{x \cdot y}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -0.050000000000000003Initial program 52.7%
Taylor expanded in x around 0 52.7%
Taylor expanded in y around inf 52.9%
neg-mul-152.9%
sub-neg52.9%
Simplified52.9%
Taylor expanded in z around inf 85.9%
if -0.050000000000000003 < z < 1.1e-73Initial program 86.4%
Taylor expanded in x around 0 86.4%
Taylor expanded in y around inf 85.3%
neg-mul-185.3%
sub-neg85.3%
Simplified85.3%
Taylor expanded in z around 0 77.3%
if 1.1e-73 < z < 0.0820000000000000034Initial program 99.8%
Taylor expanded in x around 0 63.7%
if 0.0820000000000000034 < z < 750Initial program 99.0%
Taylor expanded in x around inf 98.7%
*-commutative98.7%
Simplified98.7%
if 750 < z Initial program 44.9%
Taylor expanded in z around inf 82.7%
Final simplification79.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ x (- 1.0 z)))
(t_3 (* z (- t a)))
(t_4 (/ (- t a) (- b y))))
(if (<= z -0.05)
(+ t_2 t_4)
(if (<= z 1.55e-73)
(+ t_2 (/ 1.0 (/ y t_3)))
(if (<= z 0.045)
(/ t_3 t_1)
(if (<= z 42000.0) (/ (* x y) t_1) t_4))))))
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 / (1.0 - z);
double t_3 = z * (t - a);
double t_4 = (t - a) / (b - y);
double tmp;
if (z <= -0.05) {
tmp = t_2 + t_4;
} else if (z <= 1.55e-73) {
tmp = t_2 + (1.0 / (y / t_3));
} else if (z <= 0.045) {
tmp = t_3 / t_1;
} else if (z <= 42000.0) {
tmp = (x * y) / t_1;
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = x / (1.0d0 - z)
t_3 = z * (t - a)
t_4 = (t - a) / (b - y)
if (z <= (-0.05d0)) then
tmp = t_2 + t_4
else if (z <= 1.55d-73) then
tmp = t_2 + (1.0d0 / (y / t_3))
else if (z <= 0.045d0) then
tmp = t_3 / t_1
else if (z <= 42000.0d0) then
tmp = (x * y) / t_1
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = x / (1.0 - z);
double t_3 = z * (t - a);
double t_4 = (t - a) / (b - y);
double tmp;
if (z <= -0.05) {
tmp = t_2 + t_4;
} else if (z <= 1.55e-73) {
tmp = t_2 + (1.0 / (y / t_3));
} else if (z <= 0.045) {
tmp = t_3 / t_1;
} else if (z <= 42000.0) {
tmp = (x * y) / t_1;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = x / (1.0 - z) t_3 = z * (t - a) t_4 = (t - a) / (b - y) tmp = 0 if z <= -0.05: tmp = t_2 + t_4 elif z <= 1.55e-73: tmp = t_2 + (1.0 / (y / t_3)) elif z <= 0.045: tmp = t_3 / t_1 elif z <= 42000.0: tmp = (x * y) / t_1 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(x / Float64(1.0 - z)) t_3 = Float64(z * Float64(t - a)) t_4 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -0.05) tmp = Float64(t_2 + t_4); elseif (z <= 1.55e-73) tmp = Float64(t_2 + Float64(1.0 / Float64(y / t_3))); elseif (z <= 0.045) tmp = Float64(t_3 / t_1); elseif (z <= 42000.0) tmp = Float64(Float64(x * y) / t_1); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = x / (1.0 - z); t_3 = z * (t - a); t_4 = (t - a) / (b - y); tmp = 0.0; if (z <= -0.05) tmp = t_2 + t_4; elseif (z <= 1.55e-73) tmp = t_2 + (1.0 / (y / t_3)); elseif (z <= 0.045) tmp = t_3 / t_1; elseif (z <= 42000.0) tmp = (x * y) / t_1; else tmp = t_4; 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[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.05], N[(t$95$2 + t$95$4), $MachinePrecision], If[LessEqual[z, 1.55e-73], N[(t$95$2 + N[(1.0 / N[(y / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.045], N[(t$95$3 / t$95$1), $MachinePrecision], If[LessEqual[z, 42000.0], N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{x}{1 - z}\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -0.05:\\
\;\;\;\;t\_2 + t\_4\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-73}:\\
\;\;\;\;t\_2 + \frac{1}{\frac{y}{t\_3}}\\
\mathbf{elif}\;z \leq 0.045:\\
\;\;\;\;\frac{t\_3}{t\_1}\\
\mathbf{elif}\;z \leq 42000:\\
\;\;\;\;\frac{x \cdot y}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if z < -0.050000000000000003Initial program 52.7%
Taylor expanded in x around 0 52.7%
Taylor expanded in y around inf 52.9%
neg-mul-152.9%
sub-neg52.9%
Simplified52.9%
Taylor expanded in z around inf 85.9%
if -0.050000000000000003 < z < 1.54999999999999985e-73Initial program 86.4%
Taylor expanded in x around 0 86.4%
Taylor expanded in y around inf 85.3%
neg-mul-185.3%
sub-neg85.3%
Simplified85.3%
Taylor expanded in z around 0 77.3%
clear-num77.3%
inv-pow77.3%
*-commutative77.3%
Applied egg-rr77.3%
unpow-177.3%
Simplified77.3%
if 1.54999999999999985e-73 < z < 0.044999999999999998Initial program 99.8%
Taylor expanded in x around 0 63.7%
if 0.044999999999999998 < z < 42000Initial program 99.0%
Taylor expanded in x around inf 98.7%
*-commutative98.7%
Simplified98.7%
if 42000 < z Initial program 44.9%
Taylor expanded in z around inf 82.7%
Final simplification79.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.4e-13) (not (<= z 1.3e+17))) (+ (/ x (- 1.0 z)) (/ (- t a) (- b y))) (/ (+ (* x y) (* z (- t a))) (+ y (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.4e-13) || !(z <= 1.3e+17)) {
tmp = (x / (1.0 - z)) + ((t - a) / (b - y));
} else {
tmp = ((x * y) + (z * (t - a))) / (y + (z * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.4d-13)) .or. (.not. (z <= 1.3d+17))) then
tmp = (x / (1.0d0 - z)) + ((t - a) / (b - y))
else
tmp = ((x * y) + (z * (t - a))) / (y + (z * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.4e-13) || !(z <= 1.3e+17)) {
tmp = (x / (1.0 - z)) + ((t - a) / (b - y));
} else {
tmp = ((x * y) + (z * (t - a))) / (y + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.4e-13) or not (z <= 1.3e+17): tmp = (x / (1.0 - z)) + ((t - a) / (b - y)) else: tmp = ((x * y) + (z * (t - a))) / (y + (z * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.4e-13) || !(z <= 1.3e+17)) tmp = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.4e-13) || ~((z <= 1.3e+17))) tmp = (x / (1.0 - z)) + ((t - a) / (b - y)); else tmp = ((x * y) + (z * (t - a))) / (y + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.4e-13], N[Not[LessEqual[z, 1.3e+17]], $MachinePrecision]], N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{-13} \lor \neg \left(z \leq 1.3 \cdot 10^{+17}\right):\\
\;\;\;\;\frac{x}{1 - z} + \frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\
\end{array}
\end{array}
if z < -2.3999999999999999e-13 or 1.3e17 < z Initial program 46.0%
Taylor expanded in x around 0 46.0%
Taylor expanded in y around inf 46.3%
neg-mul-146.3%
sub-neg46.3%
Simplified46.3%
Taylor expanded in z around inf 83.1%
if -2.3999999999999999e-13 < z < 1.3e17Initial program 89.2%
Taylor expanded in b around inf 87.4%
*-commutative87.4%
Simplified87.4%
Final simplification85.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -8.5e+34)
(/ a y)
(if (<= z 2.5e-14)
x
(if (or (<= z 1.75e+185) (not (<= z 2.6e+272))) (/ t b) (/ a y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8.5e+34) {
tmp = a / y;
} else if (z <= 2.5e-14) {
tmp = x;
} else if ((z <= 1.75e+185) || !(z <= 2.6e+272)) {
tmp = t / b;
} 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 <= (-8.5d+34)) then
tmp = a / y
else if (z <= 2.5d-14) then
tmp = x
else if ((z <= 1.75d+185) .or. (.not. (z <= 2.6d+272))) then
tmp = t / b
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 <= -8.5e+34) {
tmp = a / y;
} else if (z <= 2.5e-14) {
tmp = x;
} else if ((z <= 1.75e+185) || !(z <= 2.6e+272)) {
tmp = t / b;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -8.5e+34: tmp = a / y elif z <= 2.5e-14: tmp = x elif (z <= 1.75e+185) or not (z <= 2.6e+272): tmp = t / b else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -8.5e+34) tmp = Float64(a / y); elseif (z <= 2.5e-14) tmp = x; elseif ((z <= 1.75e+185) || !(z <= 2.6e+272)) tmp = Float64(t / b); else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -8.5e+34) tmp = a / y; elseif (z <= 2.5e-14) tmp = x; elseif ((z <= 1.75e+185) || ~((z <= 2.6e+272))) tmp = t / b; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8.5e+34], N[(a / y), $MachinePrecision], If[LessEqual[z, 2.5e-14], x, If[Or[LessEqual[z, 1.75e+185], N[Not[LessEqual[z, 2.6e+272]], $MachinePrecision]], N[(t / b), $MachinePrecision], N[(a / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+34}:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+185} \lor \neg \left(z \leq 2.6 \cdot 10^{+272}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -8.5000000000000003e34 or 1.75000000000000012e185 < z < 2.59999999999999999e272Initial program 42.0%
Taylor expanded in t around 0 27.3%
+-commutative27.3%
mul-1-neg27.3%
unsub-neg27.3%
*-commutative27.3%
*-commutative27.3%
Simplified27.3%
Taylor expanded in z around inf 51.1%
associate-*r/51.1%
neg-mul-151.1%
Simplified51.1%
Taylor expanded in b around 0 36.2%
if -8.5000000000000003e34 < z < 2.5000000000000001e-14Initial program 86.5%
Taylor expanded in z around 0 47.3%
if 2.5000000000000001e-14 < z < 1.75000000000000012e185 or 2.59999999999999999e272 < z Initial program 57.6%
Taylor expanded in t around inf 25.9%
*-commutative25.9%
Simplified25.9%
Taylor expanded in y around 0 30.8%
Final simplification41.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4e+22) (not (<= z 3.9e-26))) (/ (- t a) (- b y)) (+ (/ x (- 1.0 z)) (/ (* z (- t a)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4e+22) || !(z <= 3.9e-26)) {
tmp = (t - a) / (b - y);
} else {
tmp = (x / (1.0 - z)) + ((z * (t - 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 <= (-4d+22)) .or. (.not. (z <= 3.9d-26))) then
tmp = (t - a) / (b - y)
else
tmp = (x / (1.0d0 - z)) + ((z * (t - 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 <= -4e+22) || !(z <= 3.9e-26)) {
tmp = (t - a) / (b - y);
} else {
tmp = (x / (1.0 - z)) + ((z * (t - a)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4e+22) or not (z <= 3.9e-26): tmp = (t - a) / (b - y) else: tmp = (x / (1.0 - z)) + ((z * (t - a)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4e+22) || !(z <= 3.9e-26)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(z * Float64(t - a)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4e+22) || ~((z <= 3.9e-26))) tmp = (t - a) / (b - y); else tmp = (x / (1.0 - z)) + ((z * (t - a)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4e+22], N[Not[LessEqual[z, 3.9e-26]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+22} \lor \neg \left(z \leq 3.9 \cdot 10^{-26}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z} + \frac{z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -4e22 or 3.89999999999999986e-26 < z Initial program 50.9%
Taylor expanded in z around inf 81.2%
if -4e22 < z < 3.89999999999999986e-26Initial program 86.6%
Taylor expanded in x around 0 86.6%
Taylor expanded in y around inf 82.3%
neg-mul-182.3%
sub-neg82.3%
Simplified82.3%
Taylor expanded in z around 0 73.0%
Final simplification77.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (or (<= z -0.078) (not (<= z 1.9e-26)))
(+ t_1 (/ (- t a) (- b y)))
(+ t_1 (/ (* z (- t a)) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if ((z <= -0.078) || !(z <= 1.9e-26)) {
tmp = t_1 + ((t - a) / (b - y));
} else {
tmp = t_1 + ((z * (t - 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) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if ((z <= (-0.078d0)) .or. (.not. (z <= 1.9d-26))) then
tmp = t_1 + ((t - a) / (b - y))
else
tmp = t_1 + ((z * (t - 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 t_1 = x / (1.0 - z);
double tmp;
if ((z <= -0.078) || !(z <= 1.9e-26)) {
tmp = t_1 + ((t - a) / (b - y));
} else {
tmp = t_1 + ((z * (t - a)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if (z <= -0.078) or not (z <= 1.9e-26): tmp = t_1 + ((t - a) / (b - y)) else: tmp = t_1 + ((z * (t - a)) / y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if ((z <= -0.078) || !(z <= 1.9e-26)) tmp = Float64(t_1 + Float64(Float64(t - a) / Float64(b - y))); else tmp = Float64(t_1 + Float64(Float64(z * Float64(t - a)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if ((z <= -0.078) || ~((z <= 1.9e-26))) tmp = t_1 + ((t - a) / (b - y)); else tmp = t_1 + ((z * (t - a)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -0.078], N[Not[LessEqual[z, 1.9e-26]], $MachinePrecision]], N[(t$95$1 + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;z \leq -0.078 \lor \neg \left(z \leq 1.9 \cdot 10^{-26}\right):\\
\;\;\;\;t\_1 + \frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -0.0779999999999999999 or 1.90000000000000007e-26 < z Initial program 51.4%
Taylor expanded in x around 0 51.4%
Taylor expanded in y around inf 47.9%
neg-mul-147.9%
sub-neg47.9%
Simplified47.9%
Taylor expanded in z around inf 81.5%
if -0.0779999999999999999 < z < 1.90000000000000007e-26Initial program 87.5%
Taylor expanded in x around 0 87.6%
Taylor expanded in y around inf 82.3%
neg-mul-182.3%
sub-neg82.3%
Simplified82.3%
Taylor expanded in z around 0 74.2%
Final simplification77.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.1e+35)
(/ (- a) (- b y))
(if (<= z 6.6e-80)
(/ x (- 1.0 z))
(if (<= z 1.25e+164) (/ (- t a) b) (/ t (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.1e+35) {
tmp = -a / (b - y);
} else if (z <= 6.6e-80) {
tmp = x / (1.0 - z);
} else if (z <= 1.25e+164) {
tmp = (t - a) / b;
} 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 (z <= (-3.1d+35)) then
tmp = -a / (b - y)
else if (z <= 6.6d-80) then
tmp = x / (1.0d0 - z)
else if (z <= 1.25d+164) then
tmp = (t - a) / b
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 (z <= -3.1e+35) {
tmp = -a / (b - y);
} else if (z <= 6.6e-80) {
tmp = x / (1.0 - z);
} else if (z <= 1.25e+164) {
tmp = (t - a) / b;
} else {
tmp = t / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.1e+35: tmp = -a / (b - y) elif z <= 6.6e-80: tmp = x / (1.0 - z) elif z <= 1.25e+164: tmp = (t - a) / b else: tmp = t / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.1e+35) tmp = Float64(Float64(-a) / Float64(b - y)); elseif (z <= 6.6e-80) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= 1.25e+164) tmp = Float64(Float64(t - a) / b); 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 (z <= -3.1e+35) tmp = -a / (b - y); elseif (z <= 6.6e-80) tmp = x / (1.0 - z); elseif (z <= 1.25e+164) tmp = (t - a) / b; else tmp = t / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.1e+35], N[((-a) / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e-80], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+164], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+35}:\\
\;\;\;\;\frac{-a}{b - y}\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-80}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+164}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y}\\
\end{array}
\end{array}
if z < -3.09999999999999987e35Initial program 50.4%
Taylor expanded in t around 0 32.6%
+-commutative32.6%
mul-1-neg32.6%
unsub-neg32.6%
*-commutative32.6%
*-commutative32.6%
Simplified32.6%
Taylor expanded in z around inf 51.9%
associate-*r/51.9%
neg-mul-151.9%
Simplified51.9%
if -3.09999999999999987e35 < z < 6.5999999999999999e-80Initial program 85.0%
Taylor expanded in y around inf 53.5%
mul-1-neg53.5%
unsub-neg53.5%
Simplified53.5%
if 6.5999999999999999e-80 < z < 1.24999999999999987e164Initial program 78.0%
Taylor expanded in y around 0 47.5%
if 1.24999999999999987e164 < z Initial program 25.2%
Taylor expanded in t around inf 17.1%
*-commutative17.1%
Simplified17.1%
Taylor expanded in z around inf 50.1%
Final simplification51.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -0.05) (not (<= z 1.14e-29))) (/ (- t a) (- b y)) (+ x (/ (* z (- t a)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.05) || !(z <= 1.14e-29)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - 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.05d0)) .or. (.not. (z <= 1.14d-29))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((z * (t - 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.05) || !(z <= 1.14e-29)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -0.05) or not (z <= 1.14e-29): tmp = (t - a) / (b - y) else: tmp = x + ((z * (t - a)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -0.05) || !(z <= 1.14e-29)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -0.05) || ~((z <= 1.14e-29))) tmp = (t - a) / (b - y); else tmp = x + ((z * (t - a)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -0.05], N[Not[LessEqual[z, 1.14e-29]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.05 \lor \neg \left(z \leq 1.14 \cdot 10^{-29}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -0.050000000000000003 or 1.13999999999999995e-29 < z Initial program 51.4%
Taylor expanded in z around inf 79.3%
if -0.050000000000000003 < z < 1.13999999999999995e-29Initial program 87.5%
Taylor expanded in x around 0 87.6%
Taylor expanded in y around inf 82.3%
neg-mul-182.3%
sub-neg82.3%
Simplified82.3%
Taylor expanded in z around 0 74.2%
Taylor expanded in z around 0 74.1%
Final simplification76.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -8e+23) (not (<= z 1.6e-73))) (/ (- t a) (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8e+23) || !(z <= 1.6e-73)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-8d+23)) .or. (.not. (z <= 1.6d-73))) then
tmp = (t - a) / (b - y)
else
tmp = x / (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8e+23) || !(z <= 1.6e-73)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -8e+23) or not (z <= 1.6e-73): tmp = (t - a) / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -8e+23) || !(z <= 1.6e-73)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -8e+23) || ~((z <= 1.6e-73))) tmp = (t - a) / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -8e+23], N[Not[LessEqual[z, 1.6e-73]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+23} \lor \neg \left(z \leq 1.6 \cdot 10^{-73}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -7.9999999999999993e23 or 1.59999999999999993e-73 < z Initial program 55.0%
Taylor expanded in z around inf 76.6%
if -7.9999999999999993e23 < z < 1.59999999999999993e-73Initial program 84.9%
Taylor expanded in y around inf 53.9%
mul-1-neg53.9%
unsub-neg53.9%
Simplified53.9%
Final simplification65.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.7e-19) (not (<= z 1.4e-10))) (/ t (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.7e-19) || !(z <= 1.4e-10)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.7d-19)) .or. (.not. (z <= 1.4d-10))) then
tmp = t / (b - y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.7e-19) || !(z <= 1.4e-10)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.7e-19) or not (z <= 1.4e-10): tmp = t / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.7e-19) || !(z <= 1.4e-10)) tmp = Float64(t / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.7e-19) || ~((z <= 1.4e-10))) tmp = t / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.7e-19], N[Not[LessEqual[z, 1.4e-10]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-19} \lor \neg \left(z \leq 1.4 \cdot 10^{-10}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.7000000000000001e-19 or 1.40000000000000008e-10 < z Initial program 51.0%
Taylor expanded in t around inf 23.4%
*-commutative23.4%
Simplified23.4%
Taylor expanded in z around inf 42.0%
if -1.7000000000000001e-19 < z < 1.40000000000000008e-10Initial program 88.2%
Taylor expanded in z around 0 50.8%
Final simplification46.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.2e+29) (not (<= z 1.7e-6))) (/ t (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.2e+29) || !(z <= 1.7e-6)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-5.2d+29)) .or. (.not. (z <= 1.7d-6))) then
tmp = t / (b - y)
else
tmp = x / (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.2e+29) || !(z <= 1.7e-6)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.2e+29) or not (z <= 1.7e-6): tmp = t / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.2e+29) || !(z <= 1.7e-6)) tmp = Float64(t / Float64(b - y)); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.2e+29) || ~((z <= 1.7e-6))) tmp = t / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.2e+29], N[Not[LessEqual[z, 1.7e-6]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+29} \lor \neg \left(z \leq 1.7 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -5.2e29 or 1.70000000000000003e-6 < z Initial program 49.6%
Taylor expanded in t around inf 23.7%
*-commutative23.7%
Simplified23.7%
Taylor expanded in z around inf 44.1%
if -5.2e29 < z < 1.70000000000000003e-6Initial program 86.4%
Taylor expanded in y around inf 49.7%
mul-1-neg49.7%
unsub-neg49.7%
Simplified49.7%
Final simplification47.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.6e-34) (not (<= y 1.9e-35))) (/ 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 <= -5.6e-34) || !(y <= 1.9e-35)) {
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 <= (-5.6d-34)) .or. (.not. (y <= 1.9d-35))) 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 <= -5.6e-34) || !(y <= 1.9e-35)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.6e-34) or not (y <= 1.9e-35): 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 <= -5.6e-34) || !(y <= 1.9e-35)) 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 <= -5.6e-34) || ~((y <= 1.9e-35))) 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, -5.6e-34], N[Not[LessEqual[y, 1.9e-35]], $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 -5.6 \cdot 10^{-34} \lor \neg \left(y \leq 1.9 \cdot 10^{-35}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -5.59999999999999994e-34 or 1.9000000000000001e-35 < y Initial program 59.7%
Taylor expanded in y around inf 45.9%
mul-1-neg45.9%
unsub-neg45.9%
Simplified45.9%
if -5.59999999999999994e-34 < y < 1.9000000000000001e-35Initial program 84.5%
Taylor expanded in y around 0 55.7%
Final simplification49.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -8.5e+34) (not (<= z 0.082))) (/ a y) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8.5e+34) || !(z <= 0.082)) {
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 <= (-8.5d+34)) .or. (.not. (z <= 0.082d0))) 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 <= -8.5e+34) || !(z <= 0.082)) {
tmp = a / y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -8.5e+34) or not (z <= 0.082): tmp = a / y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -8.5e+34) || !(z <= 0.082)) 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 <= -8.5e+34) || ~((z <= 0.082))) tmp = a / y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -8.5e+34], N[Not[LessEqual[z, 0.082]], $MachinePrecision]], N[(a / y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+34} \lor \neg \left(z \leq 0.082\right):\\
\;\;\;\;\frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -8.5000000000000003e34 or 0.0820000000000000034 < z Initial program 48.4%
Taylor expanded in t around 0 31.3%
+-commutative31.3%
mul-1-neg31.3%
unsub-neg31.3%
*-commutative31.3%
*-commutative31.3%
Simplified31.3%
Taylor expanded in z around inf 45.1%
associate-*r/45.1%
neg-mul-145.1%
Simplified45.1%
Taylor expanded in b around 0 26.4%
if -8.5000000000000003e34 < z < 0.0820000000000000034Initial program 86.7%
Taylor expanded in z around 0 46.7%
Final simplification37.6%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 69.5%
Taylor expanded in z around 0 27.1%
Final simplification27.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 2024034
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:herbie-target
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))