
(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 (/ (- t a) (- b y)))
(t_3 (/ (+ (* x y) (* z (- t a))) t_1))
(t_4 (pow (- b y) 2.0))
(t_5 (/ y (/ (- b y) x))))
(if (<= t_3 (- INFINITY))
(- (* (/ z (+ z -1.0)) (/ (- a t) y)) (/ x (+ z -1.0)))
(if (<= t_3 -5e-262)
t_3
(if (<= t_3 0.0)
(+ t_2 (/ (+ (/ y (/ t_4 (- a t))) t_5) z))
(if (<= t_3 2e+245)
(/ (+ (* x y) (- (* z t) (* z a))) t_1)
(+ (/ (+ t_5 (/ (- a t) (/ t_4 y))) z) 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 = pow((b - y), 2.0);
double t_5 = y / ((b - y) / x);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = ((z / (z + -1.0)) * ((a - t) / y)) - (x / (z + -1.0));
} else if (t_3 <= -5e-262) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_2 + (((y / (t_4 / (a - t))) + t_5) / z);
} else if (t_3 <= 2e+245) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else {
tmp = ((t_5 + ((a - t) / (t_4 / y))) / z) + 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 = Math.pow((b - y), 2.0);
double t_5 = y / ((b - y) / x);
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = ((z / (z + -1.0)) * ((a - t) / y)) - (x / (z + -1.0));
} else if (t_3 <= -5e-262) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_2 + (((y / (t_4 / (a - t))) + t_5) / z);
} else if (t_3 <= 2e+245) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else {
tmp = ((t_5 + ((a - t) / (t_4 / y))) / z) + 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 = math.pow((b - y), 2.0) t_5 = y / ((b - y) / x) tmp = 0 if t_3 <= -math.inf: tmp = ((z / (z + -1.0)) * ((a - t) / y)) - (x / (z + -1.0)) elif t_3 <= -5e-262: tmp = t_3 elif t_3 <= 0.0: tmp = t_2 + (((y / (t_4 / (a - t))) + t_5) / z) elif t_3 <= 2e+245: tmp = ((x * y) + ((z * t) - (z * a))) / t_1 else: tmp = ((t_5 + ((a - t) / (t_4 / y))) / z) + 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(b - y) ^ 2.0 t_5 = Float64(y / Float64(Float64(b - y) / x)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(Float64(Float64(z / Float64(z + -1.0)) * Float64(Float64(a - t) / y)) - Float64(x / Float64(z + -1.0))); elseif (t_3 <= -5e-262) tmp = t_3; elseif (t_3 <= 0.0) tmp = Float64(t_2 + Float64(Float64(Float64(y / Float64(t_4 / Float64(a - t))) + t_5) / z)); elseif (t_3 <= 2e+245) tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / t_1); else tmp = Float64(Float64(Float64(t_5 + Float64(Float64(a - t) / Float64(t_4 / y))) / z) + 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 = (b - y) ^ 2.0; t_5 = y / ((b - y) / x); tmp = 0.0; if (t_3 <= -Inf) tmp = ((z / (z + -1.0)) * ((a - t) / y)) - (x / (z + -1.0)); elseif (t_3 <= -5e-262) tmp = t_3; elseif (t_3 <= 0.0) tmp = t_2 + (((y / (t_4 / (a - t))) + t_5) / z); elseif (t_3 <= 2e+245) tmp = ((x * y) + ((z * t) - (z * a))) / t_1; else tmp = ((t_5 + ((a - t) / (t_4 / y))) / z) + 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[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$5 = N[(y / N[(N[(b - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[(N[(z / N[(z + -1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -5e-262], t$95$3, If[LessEqual[t$95$3, 0.0], N[(t$95$2 + N[(N[(N[(y / N[(t$95$4 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+245], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[(N[(t$95$5 + N[(N[(a - t), $MachinePrecision] / N[(t$95$4 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + t$95$2), $MachinePrecision]]]]]]]]]]
\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 := {\left(b - y\right)}^{2}\\
t_5 := \frac{y}{\frac{b - y}{x}}\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;\frac{z}{z + -1} \cdot \frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{elif}\;t_3 \leq -5 \cdot 10^{-262}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;t_2 + \frac{\frac{y}{\frac{t_4}{a - t}} + t_5}{z}\\
\mathbf{elif}\;t_3 \leq 2 \cdot 10^{+245}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_5 + \frac{a - t}{\frac{t_4}{y}}}{z} + t_2\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 41.0%
Taylor expanded in y around -inf 57.2%
mul-1-neg57.2%
unsub-neg57.2%
mul-1-neg57.2%
distribute-neg-frac57.2%
Simplified60.5%
Taylor expanded in b around 0 69.6%
*-commutative69.6%
times-frac75.6%
sub-neg75.6%
metadata-eval75.6%
Simplified75.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99999999999999992e-262Initial program 99.7%
if -4.99999999999999992e-262 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 10.6%
sub-neg10.6%
distribute-lft-in10.6%
Applied egg-rr10.6%
Taylor expanded in z around -inf 82.0%
+-commutative82.0%
mul-1-neg82.0%
unsub-neg82.0%
associate-*r/82.0%
mul-1-neg82.0%
+-commutative82.0%
mul-1-neg82.0%
unsub-neg82.0%
Simplified82.5%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000009e245Initial program 99.6%
sub-neg99.6%
distribute-lft-in99.6%
Applied egg-rr99.6%
if 2.00000000000000009e245 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 9.2%
Taylor expanded in z around -inf 36.0%
+-commutative36.0%
associate--l+36.0%
Simplified82.6%
Final simplification90.6%
(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)))
(if (<= t_2 (- INFINITY))
(- (* (/ z (+ z -1.0)) (/ (- a t) y)) (/ x (+ z -1.0)))
(if (<= t_2 -5e-262)
t_2
(if (or (<= t_2 0.0) (not (<= t_2 2e+245)))
(+
(/ (+ (/ y (/ (- b y) x)) (/ (- a t) (/ (pow (- b y) 2.0) y))) z)
(/ (- t a) (- b y)))
(/ (+ (* x y) (- (* z t) (* z a))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((x * y) + (z * (t - a))) / t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = ((z / (z + -1.0)) * ((a - t) / y)) - (x / (z + -1.0));
} else if (t_2 <= -5e-262) {
tmp = t_2;
} else if ((t_2 <= 0.0) || !(t_2 <= 2e+245)) {
tmp = (((y / ((b - y) / x)) + ((a - t) / (pow((b - y), 2.0) / y))) / z) + ((t - a) / (b - y));
} else {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((x * y) + (z * (t - a))) / t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = ((z / (z + -1.0)) * ((a - t) / y)) - (x / (z + -1.0));
} else if (t_2 <= -5e-262) {
tmp = t_2;
} else if ((t_2 <= 0.0) || !(t_2 <= 2e+245)) {
tmp = (((y / ((b - y) / x)) + ((a - t) / (Math.pow((b - y), 2.0) / y))) / z) + ((t - a) / (b - y));
} else {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
}
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 tmp = 0 if t_2 <= -math.inf: tmp = ((z / (z + -1.0)) * ((a - t) / y)) - (x / (z + -1.0)) elif t_2 <= -5e-262: tmp = t_2 elif (t_2 <= 0.0) or not (t_2 <= 2e+245): tmp = (((y / ((b - y) / x)) + ((a - t) / (math.pow((b - y), 2.0) / y))) / z) + ((t - a) / (b - y)) else: tmp = ((x * y) + ((z * t) - (z * a))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(Float64(z / Float64(z + -1.0)) * Float64(Float64(a - t) / y)) - Float64(x / Float64(z + -1.0))); elseif (t_2 <= -5e-262) tmp = t_2; elseif ((t_2 <= 0.0) || !(t_2 <= 2e+245)) tmp = Float64(Float64(Float64(Float64(y / Float64(Float64(b - y) / x)) + Float64(Float64(a - t) / Float64((Float64(b - y) ^ 2.0) / y))) / z) + Float64(Float64(t - a) / Float64(b - y))); else tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = ((x * y) + (z * (t - a))) / t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = ((z / (z + -1.0)) * ((a - t) / y)) - (x / (z + -1.0)); elseif (t_2 <= -5e-262) tmp = t_2; elseif ((t_2 <= 0.0) || ~((t_2 <= 2e+245))) tmp = (((y / ((b - y) / x)) + ((a - t) / (((b - y) ^ 2.0) / y))) / z) + ((t - a) / (b - y)); else tmp = ((x * y) + ((z * t) - (z * a))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(N[(z / N[(z + -1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -5e-262], t$95$2, If[Or[LessEqual[t$95$2, 0.0], N[Not[LessEqual[t$95$2, 2e+245]], $MachinePrecision]], N[(N[(N[(N[(y / N[(N[(b - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(a - t), $MachinePrecision] / N[(N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t_1}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{z}{z + -1} \cdot \frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{elif}\;t_2 \leq -5 \cdot 10^{-262}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 0 \lor \neg \left(t_2 \leq 2 \cdot 10^{+245}\right):\\
\;\;\;\;\frac{\frac{y}{\frac{b - y}{x}} + \frac{a - t}{\frac{{\left(b - y\right)}^{2}}{y}}}{z} + \frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_1}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 41.0%
Taylor expanded in y around -inf 57.2%
mul-1-neg57.2%
unsub-neg57.2%
mul-1-neg57.2%
distribute-neg-frac57.2%
Simplified60.5%
Taylor expanded in b around 0 69.6%
*-commutative69.6%
times-frac75.6%
sub-neg75.6%
metadata-eval75.6%
Simplified75.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99999999999999992e-262Initial program 99.7%
if -4.99999999999999992e-262 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 2.00000000000000009e245 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 9.5%
Taylor expanded in z around -inf 47.2%
+-commutative47.2%
associate--l+47.2%
Simplified82.6%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000009e245Initial program 99.6%
sub-neg99.6%
distribute-lft-in99.6%
Applied egg-rr99.6%
Final simplification90.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.45e+80)
t_1
(if (<= z -8e-13)
(- (/ (- a t) y) (/ x (+ z -1.0)))
(if (<= z 6.2e-206)
(+ x (* (* z (- t a)) (/ 1.0 y)))
(if (<= z 6e-160)
(/ (+ (* x y) (* z t)) (+ y (* z (- b y))))
(if (<= z 7.8e-28) (+ x (/ (- t a) (/ y z))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.45e+80) {
tmp = t_1;
} else if (z <= -8e-13) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if (z <= 6.2e-206) {
tmp = x + ((z * (t - a)) * (1.0 / y));
} else if (z <= 6e-160) {
tmp = ((x * y) + (z * t)) / (y + (z * (b - y)));
} else if (z <= 7.8e-28) {
tmp = x + ((t - a) / (y / z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-1.45d+80)) then
tmp = t_1
else if (z <= (-8d-13)) then
tmp = ((a - t) / y) - (x / (z + (-1.0d0)))
else if (z <= 6.2d-206) then
tmp = x + ((z * (t - a)) * (1.0d0 / y))
else if (z <= 6d-160) then
tmp = ((x * y) + (z * t)) / (y + (z * (b - y)))
else if (z <= 7.8d-28) then
tmp = x + ((t - a) / (y / z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.45e+80) {
tmp = t_1;
} else if (z <= -8e-13) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if (z <= 6.2e-206) {
tmp = x + ((z * (t - a)) * (1.0 / y));
} else if (z <= 6e-160) {
tmp = ((x * y) + (z * t)) / (y + (z * (b - y)));
} else if (z <= 7.8e-28) {
tmp = x + ((t - a) / (y / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.45e+80: tmp = t_1 elif z <= -8e-13: tmp = ((a - t) / y) - (x / (z + -1.0)) elif z <= 6.2e-206: tmp = x + ((z * (t - a)) * (1.0 / y)) elif z <= 6e-160: tmp = ((x * y) + (z * t)) / (y + (z * (b - y))) elif z <= 7.8e-28: tmp = x + ((t - a) / (y / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.45e+80) tmp = t_1; elseif (z <= -8e-13) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))); elseif (z <= 6.2e-206) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) * Float64(1.0 / y))); elseif (z <= 6e-160) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 7.8e-28) tmp = Float64(x + Float64(Float64(t - a) / Float64(y / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.45e+80) tmp = t_1; elseif (z <= -8e-13) tmp = ((a - t) / y) - (x / (z + -1.0)); elseif (z <= 6.2e-206) tmp = x + ((z * (t - a)) * (1.0 / y)); elseif (z <= 6e-160) tmp = ((x * y) + (z * t)) / (y + (z * (b - y))); elseif (z <= 7.8e-28) tmp = x + ((t - a) / (y / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+80], t$95$1, If[LessEqual[z, -8e-13], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e-206], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-160], 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, 7.8e-28], N[(x + N[(N[(t - a), $MachinePrecision] / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+80}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-13}:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-206}:\\
\;\;\;\;x + \left(z \cdot \left(t - a\right)\right) \cdot \frac{1}{y}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-160}:\\
\;\;\;\;\frac{x \cdot y + z \cdot t}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{-28}:\\
\;\;\;\;x + \frac{t - a}{\frac{y}{z}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.44999999999999993e80 or 7.79999999999999998e-28 < z Initial program 38.4%
Taylor expanded in z around inf 80.5%
if -1.44999999999999993e80 < z < -8.0000000000000002e-13Initial program 72.8%
Taylor expanded in y around -inf 53.7%
mul-1-neg53.7%
unsub-neg53.7%
mul-1-neg53.7%
distribute-neg-frac53.7%
Simplified60.8%
Taylor expanded in z around inf 69.3%
if -8.0000000000000002e-13 < z < 6.2000000000000005e-206Initial program 84.5%
add-cube-cbrt84.4%
pow384.4%
Applied egg-rr84.4%
Taylor expanded in y around inf 83.5%
div-inv83.5%
*-commutative83.5%
Applied egg-rr83.5%
if 6.2000000000000005e-206 < z < 5.99999999999999993e-160Initial program 99.6%
Taylor expanded in a around 0 99.6%
if 5.99999999999999993e-160 < z < 7.79999999999999998e-28Initial program 77.1%
add-cube-cbrt76.8%
pow376.8%
Applied egg-rr76.8%
Taylor expanded in y around inf 77.7%
+-commutative77.7%
associate-/l*77.8%
Simplified77.8%
Final simplification80.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9e+60) (not (<= z 8.5e+59))) (/ (- t a) (- b y)) (/ (+ (* x y) (- (* z t) (* z a))) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9e+60) || !(z <= 8.5e+59)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-9d+60)) .or. (.not. (z <= 8.5d+59))) then
tmp = (t - a) / (b - y)
else
tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9e+60) || !(z <= 8.5e+59)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -9e+60) or not (z <= 8.5e+59): tmp = (t - a) / (b - y) else: tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -9e+60) || !(z <= 8.5e+59)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -9e+60) || ~((z <= 8.5e+59))) tmp = (t - a) / (b - y); else tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9e+60], N[Not[LessEqual[z, 8.5e+59]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+60} \lor \neg \left(z \leq 8.5 \cdot 10^{+59}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -9.00000000000000026e60 or 8.4999999999999999e59 < z Initial program 34.0%
Taylor expanded in z around inf 83.2%
if -9.00000000000000026e60 < z < 8.4999999999999999e59Initial program 82.3%
sub-neg82.3%
distribute-lft-in82.3%
Applied egg-rr82.3%
Final simplification82.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9.5e+64) (not (<= z 3.8e+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 <= -9.5e+64) || !(z <= 3.8e+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 <= (-9.5d+64)) .or. (.not. (z <= 3.8d+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 <= -9.5e+64) || !(z <= 3.8e+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 <= -9.5e+64) or not (z <= 3.8e+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 <= -9.5e+64) || !(z <= 3.8e+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 <= -9.5e+64) || ~((z <= 3.8e+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, -9.5e+64], N[Not[LessEqual[z, 3.8e+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 -9.5 \cdot 10^{+64} \lor \neg \left(z \leq 3.8 \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 < -9.50000000000000028e64 or 3.8000000000000001e63 < z Initial program 34.0%
Taylor expanded in z around inf 83.2%
if -9.50000000000000028e64 < z < 3.8000000000000001e63Initial program 82.3%
Final simplification82.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.7e+80)
t_1
(if (<= z -1.05e-12)
(- (/ (- a t) y) (/ x (+ z -1.0)))
(if (<= z 4.9e-27) (+ x (* (* z (- t a)) (/ 1.0 y))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.7e+80) {
tmp = t_1;
} else if (z <= -1.05e-12) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if (z <= 4.9e-27) {
tmp = x + ((z * (t - a)) * (1.0 / y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-1.7d+80)) then
tmp = t_1
else if (z <= (-1.05d-12)) then
tmp = ((a - t) / y) - (x / (z + (-1.0d0)))
else if (z <= 4.9d-27) then
tmp = x + ((z * (t - a)) * (1.0d0 / y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.7e+80) {
tmp = t_1;
} else if (z <= -1.05e-12) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if (z <= 4.9e-27) {
tmp = x + ((z * (t - a)) * (1.0 / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.7e+80: tmp = t_1 elif z <= -1.05e-12: tmp = ((a - t) / y) - (x / (z + -1.0)) elif z <= 4.9e-27: tmp = x + ((z * (t - a)) * (1.0 / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.7e+80) tmp = t_1; elseif (z <= -1.05e-12) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))); elseif (z <= 4.9e-27) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) * Float64(1.0 / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.7e+80) tmp = t_1; elseif (z <= -1.05e-12) tmp = ((a - t) / y) - (x / (z + -1.0)); elseif (z <= 4.9e-27) tmp = x + ((z * (t - a)) * (1.0 / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.7e+80], t$95$1, If[LessEqual[z, -1.05e-12], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.9e-27], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.7 \cdot 10^{+80}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-12}:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{-27}:\\
\;\;\;\;x + \left(z \cdot \left(t - a\right)\right) \cdot \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.69999999999999996e80 or 4.89999999999999976e-27 < z Initial program 38.4%
Taylor expanded in z around inf 80.5%
if -1.69999999999999996e80 < z < -1.04999999999999997e-12Initial program 72.8%
Taylor expanded in y around -inf 53.7%
mul-1-neg53.7%
unsub-neg53.7%
mul-1-neg53.7%
distribute-neg-frac53.7%
Simplified60.8%
Taylor expanded in z around inf 69.3%
if -1.04999999999999997e-12 < z < 4.89999999999999976e-27Initial program 83.4%
add-cube-cbrt83.2%
pow383.3%
Applied egg-rr83.3%
Taylor expanded in y around inf 78.7%
div-inv78.8%
*-commutative78.8%
Applied egg-rr78.8%
Final simplification79.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -195.0) (not (<= z 4.9e-27))) (/ (- t a) (- b y)) (+ x (* (* z (- t a)) (/ 1.0 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -195.0) || !(z <= 4.9e-27)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) * (1.0 / 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 <= (-195.0d0)) .or. (.not. (z <= 4.9d-27))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((z * (t - a)) * (1.0d0 / 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 <= -195.0) || !(z <= 4.9e-27)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) * (1.0 / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -195.0) or not (z <= 4.9e-27): tmp = (t - a) / (b - y) else: tmp = x + ((z * (t - a)) * (1.0 / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -195.0) || !(z <= 4.9e-27)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) * Float64(1.0 / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -195.0) || ~((z <= 4.9e-27))) tmp = (t - a) / (b - y); else tmp = x + ((z * (t - a)) * (1.0 / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -195.0], N[Not[LessEqual[z, 4.9e-27]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -195 \lor \neg \left(z \leq 4.9 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot \left(t - a\right)\right) \cdot \frac{1}{y}\\
\end{array}
\end{array}
if z < -195 or 4.89999999999999976e-27 < z Initial program 41.2%
Taylor expanded in z around inf 76.7%
if -195 < z < 4.89999999999999976e-27Initial program 83.7%
add-cube-cbrt83.5%
pow383.6%
Applied egg-rr83.6%
Taylor expanded in y around inf 78.2%
div-inv78.2%
*-commutative78.2%
Applied egg-rr78.2%
Final simplification77.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -5.2e+241)
t_1
(if (<= y -1.6e+204)
(/ (- a t) y)
(if (or (<= y -9e+22) (not (<= y 15000000000.0))) t_1 (/ (- t a) b))))))
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 <= -5.2e+241) {
tmp = t_1;
} else if (y <= -1.6e+204) {
tmp = (a - t) / y;
} else if ((y <= -9e+22) || !(y <= 15000000000.0)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-5.2d+241)) then
tmp = t_1
else if (y <= (-1.6d+204)) then
tmp = (a - t) / y
else if ((y <= (-9d+22)) .or. (.not. (y <= 15000000000.0d0))) then
tmp = t_1
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 t_1 = x / (1.0 - z);
double tmp;
if (y <= -5.2e+241) {
tmp = t_1;
} else if (y <= -1.6e+204) {
tmp = (a - t) / y;
} else if ((y <= -9e+22) || !(y <= 15000000000.0)) {
tmp = t_1;
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -5.2e+241: tmp = t_1 elif y <= -1.6e+204: tmp = (a - t) / y elif (y <= -9e+22) or not (y <= 15000000000.0): tmp = t_1 else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -5.2e+241) tmp = t_1; elseif (y <= -1.6e+204) tmp = Float64(Float64(a - t) / y); elseif ((y <= -9e+22) || !(y <= 15000000000.0)) tmp = t_1; else tmp = Float64(Float64(t - a) / b); 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 <= -5.2e+241) tmp = t_1; elseif (y <= -1.6e+204) tmp = (a - t) / y; elseif ((y <= -9e+22) || ~((y <= 15000000000.0))) tmp = t_1; else tmp = (t - a) / b; 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, -5.2e+241], t$95$1, If[LessEqual[y, -1.6e+204], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], If[Or[LessEqual[y, -9e+22], N[Not[LessEqual[y, 15000000000.0]], $MachinePrecision]], t$95$1, N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{+241}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{+204}:\\
\;\;\;\;\frac{a - t}{y}\\
\mathbf{elif}\;y \leq -9 \cdot 10^{+22} \lor \neg \left(y \leq 15000000000\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -5.20000000000000015e241 or -1.6e204 < y < -8.9999999999999996e22 or 1.5e10 < y Initial program 48.8%
Taylor expanded in y around inf 54.9%
+-commutative54.9%
mul-1-neg54.9%
unsub-neg54.9%
Simplified54.9%
if -5.20000000000000015e241 < y < -1.6e204Initial program 15.7%
Taylor expanded in z around inf 79.0%
Taylor expanded in b around 0 79.0%
associate-*r/79.0%
mul-1-neg79.0%
Simplified79.0%
if -8.9999999999999996e22 < y < 1.5e10Initial program 75.9%
Taylor expanded in y around 0 57.7%
Final simplification56.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -195.0) (not (<= z 1.3e-28))) (/ (- t a) (- b y)) (+ x (/ (- t a) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -195.0) || !(z <= 1.3e-28)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((t - a) / (y / 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 <= (-195.0d0)) .or. (.not. (z <= 1.3d-28))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((t - a) / (y / 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 <= -195.0) || !(z <= 1.3e-28)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((t - a) / (y / z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -195.0) or not (z <= 1.3e-28): tmp = (t - a) / (b - y) else: tmp = x + ((t - a) / (y / z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -195.0) || !(z <= 1.3e-28)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(t - a) / Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -195.0) || ~((z <= 1.3e-28))) tmp = (t - a) / (b - y); else tmp = x + ((t - a) / (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -195.0], N[Not[LessEqual[z, 1.3e-28]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - a), $MachinePrecision] / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -195 \lor \neg \left(z \leq 1.3 \cdot 10^{-28}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - a}{\frac{y}{z}}\\
\end{array}
\end{array}
if z < -195 or 1.3e-28 < z Initial program 41.2%
Taylor expanded in z around inf 76.7%
if -195 < z < 1.3e-28Initial program 83.7%
add-cube-cbrt83.5%
pow383.6%
Applied egg-rr83.6%
Taylor expanded in y around inf 78.2%
+-commutative78.2%
associate-/l*76.6%
Simplified76.6%
Final simplification76.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -195.0) (not (<= z 4.9e-27))) (/ (- 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 <= -195.0) || !(z <= 4.9e-27)) {
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 <= (-195.0d0)) .or. (.not. (z <= 4.9d-27))) 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 <= -195.0) || !(z <= 4.9e-27)) {
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 <= -195.0) or not (z <= 4.9e-27): 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 <= -195.0) || !(z <= 4.9e-27)) 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 <= -195.0) || ~((z <= 4.9e-27))) 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, -195.0], N[Not[LessEqual[z, 4.9e-27]], $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 -195 \lor \neg \left(z \leq 4.9 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -195 or 4.89999999999999976e-27 < z Initial program 41.2%
Taylor expanded in z around inf 76.7%
if -195 < z < 4.89999999999999976e-27Initial program 83.7%
add-cube-cbrt83.5%
pow383.6%
Applied egg-rr83.6%
Taylor expanded in y around inf 78.2%
Final simplification77.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -105000000.0) (not (<= z 4.9e-27))) (/ t (- b y)) (+ x (/ (* z t) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -105000000.0) || !(z <= 4.9e-27)) {
tmp = t / (b - y);
} else {
tmp = x + ((z * t) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-105000000.0d0)) .or. (.not. (z <= 4.9d-27))) then
tmp = t / (b - y)
else
tmp = x + ((z * t) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -105000000.0) || !(z <= 4.9e-27)) {
tmp = t / (b - y);
} else {
tmp = x + ((z * t) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -105000000.0) or not (z <= 4.9e-27): tmp = t / (b - y) else: tmp = x + ((z * t) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -105000000.0) || !(z <= 4.9e-27)) tmp = Float64(t / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * t) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -105000000.0) || ~((z <= 4.9e-27))) tmp = t / (b - y); else tmp = x + ((z * t) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -105000000.0], N[Not[LessEqual[z, 4.9e-27]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -105000000 \lor \neg \left(z \leq 4.9 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot t}{y}\\
\end{array}
\end{array}
if z < -1.05e8 or 4.89999999999999976e-27 < z Initial program 40.4%
Taylor expanded in a around 0 29.9%
Taylor expanded in z around inf 50.1%
if -1.05e8 < z < 4.89999999999999976e-27Initial program 84.0%
add-cube-cbrt83.8%
pow383.8%
Applied egg-rr83.8%
Taylor expanded in y around inf 77.1%
Taylor expanded in t around inf 69.0%
*-commutative69.0%
Simplified69.0%
Final simplification58.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -195.0) (not (<= z 4.6e-27))) (/ (- t a) (- b y)) (+ x (/ (* z t) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -195.0) || !(z <= 4.6e-27)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * t) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-195.0d0)) .or. (.not. (z <= 4.6d-27))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((z * t) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -195.0) || !(z <= 4.6e-27)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * t) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -195.0) or not (z <= 4.6e-27): tmp = (t - a) / (b - y) else: tmp = x + ((z * t) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -195.0) || !(z <= 4.6e-27)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * t) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -195.0) || ~((z <= 4.6e-27))) tmp = (t - a) / (b - y); else tmp = x + ((z * t) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -195.0], N[Not[LessEqual[z, 4.6e-27]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -195 \lor \neg \left(z \leq 4.6 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot t}{y}\\
\end{array}
\end{array}
if z < -195 or 4.5999999999999999e-27 < z Initial program 41.2%
Taylor expanded in z around inf 76.7%
if -195 < z < 4.5999999999999999e-27Initial program 83.7%
add-cube-cbrt83.5%
pow383.6%
Applied egg-rr83.6%
Taylor expanded in y around inf 78.2%
Taylor expanded in t around inf 70.1%
*-commutative70.1%
Simplified70.1%
Final simplification73.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -195.0) (not (<= z 2.7e-28))) (/ t b) (+ x (* x z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -195.0) || !(z <= 2.7e-28)) {
tmp = t / b;
} 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 <= (-195.0d0)) .or. (.not. (z <= 2.7d-28))) then
tmp = t / b
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 <= -195.0) || !(z <= 2.7e-28)) {
tmp = t / b;
} else {
tmp = x + (x * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -195.0) or not (z <= 2.7e-28): tmp = t / b else: tmp = x + (x * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -195.0) || !(z <= 2.7e-28)) tmp = Float64(t / b); 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 <= -195.0) || ~((z <= 2.7e-28))) tmp = t / b; else tmp = x + (x * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -195.0], N[Not[LessEqual[z, 2.7e-28]], $MachinePrecision]], N[(t / b), $MachinePrecision], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -195 \lor \neg \left(z \leq 2.7 \cdot 10^{-28}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot z\\
\end{array}
\end{array}
if z < -195 or 2.6999999999999999e-28 < z Initial program 41.2%
Taylor expanded in a around 0 30.2%
Taylor expanded in y around 0 28.1%
if -195 < z < 2.6999999999999999e-28Initial program 83.7%
Taylor expanded in y around inf 54.6%
+-commutative54.6%
mul-1-neg54.6%
unsub-neg54.6%
Simplified54.6%
Taylor expanded in z around 0 53.7%
Final simplification39.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.2e-5) (not (<= z 2.6e-27))) (/ t (- b y)) (+ x (* x z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.2e-5) || !(z <= 2.6e-27)) {
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 <= (-2.2d-5)) .or. (.not. (z <= 2.6d-27))) 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 <= -2.2e-5) || !(z <= 2.6e-27)) {
tmp = t / (b - y);
} else {
tmp = x + (x * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.2e-5) or not (z <= 2.6e-27): tmp = t / (b - y) else: tmp = x + (x * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.2e-5) || !(z <= 2.6e-27)) 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 <= -2.2e-5) || ~((z <= 2.6e-27))) 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, -2.2e-5], N[Not[LessEqual[z, 2.6e-27]], $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 -2.2 \cdot 10^{-5} \lor \neg \left(z \leq 2.6 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot z\\
\end{array}
\end{array}
if z < -2.1999999999999999e-5 or 2.60000000000000017e-27 < z Initial program 41.6%
Taylor expanded in a around 0 30.7%
Taylor expanded in z around inf 49.2%
if -2.1999999999999999e-5 < z < 2.60000000000000017e-27Initial program 83.6%
Taylor expanded in y around inf 54.2%
+-commutative54.2%
mul-1-neg54.2%
unsub-neg54.2%
Simplified54.2%
Taylor expanded in z around 0 54.2%
Final simplification51.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4e+80) (not (<= z 6.5e+33))) (/ 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 <= -4e+80) || !(z <= 6.5e+33)) {
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 <= (-4d+80)) .or. (.not. (z <= 6.5d+33))) 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 <= -4e+80) || !(z <= 6.5e+33)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4e+80) or not (z <= 6.5e+33): 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 <= -4e+80) || !(z <= 6.5e+33)) 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 <= -4e+80) || ~((z <= 6.5e+33))) 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, -4e+80], N[Not[LessEqual[z, 6.5e+33]], $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 -4 \cdot 10^{+80} \lor \neg \left(z \leq 6.5 \cdot 10^{+33}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -4e80 or 6.49999999999999993e33 < z Initial program 36.0%
Taylor expanded in a around 0 27.8%
Taylor expanded in z around inf 54.7%
if -4e80 < z < 6.49999999999999993e33Initial program 81.3%
Taylor expanded in y around inf 51.4%
+-commutative51.4%
mul-1-neg51.4%
unsub-neg51.4%
Simplified51.4%
Final simplification52.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.7e+24) (not (<= y 160000000000.0))) (/ 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 <= -1.7e+24) || !(y <= 160000000000.0)) {
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 <= (-1.7d+24)) .or. (.not. (y <= 160000000000.0d0))) 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 <= -1.7e+24) || !(y <= 160000000000.0)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.7e+24) or not (y <= 160000000000.0): 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 <= -1.7e+24) || !(y <= 160000000000.0)) 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 <= -1.7e+24) || ~((y <= 160000000000.0))) 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, -1.7e+24], N[Not[LessEqual[y, 160000000000.0]], $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 -1.7 \cdot 10^{+24} \lor \neg \left(y \leq 160000000000\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -1.7e24 or 1.6e11 < y Initial program 47.1%
Taylor expanded in y around inf 53.0%
+-commutative53.0%
mul-1-neg53.0%
unsub-neg53.0%
Simplified53.0%
if -1.7e24 < y < 1.6e11Initial program 75.9%
Taylor expanded in y around 0 57.7%
Final simplification55.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -105000000.0) (/ t b) (if (<= z 2.25e-29) x (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -105000000.0) {
tmp = t / b;
} else if (z <= 2.25e-29) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-105000000.0d0)) then
tmp = t / b
else if (z <= 2.25d-29) then
tmp = x
else
tmp = t / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -105000000.0) {
tmp = t / b;
} else if (z <= 2.25e-29) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -105000000.0: tmp = t / b elif z <= 2.25e-29: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -105000000.0) tmp = Float64(t / b); elseif (z <= 2.25e-29) tmp = x; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -105000000.0) tmp = t / b; elseif (z <= 2.25e-29) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -105000000.0], N[(t / b), $MachinePrecision], If[LessEqual[z, 2.25e-29], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -105000000:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-29}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -1.05e8 or 2.2499999999999999e-29 < z Initial program 40.4%
Taylor expanded in a around 0 29.9%
Taylor expanded in y around 0 28.5%
if -1.05e8 < z < 2.2499999999999999e-29Initial program 84.0%
Taylor expanded in z around 0 52.9%
Final simplification39.8%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 60.6%
Taylor expanded in z around 0 26.4%
Final simplification26.4%
(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 2023199
(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)))))