
(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 24 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 (/ (+ (* z (- t a)) (* y x)) (+ y (* z (- b y))))))
(if (<= t_1 -2e+259)
(- (* (/ z y) (/ (- a t) (+ z -1.0))) (/ x (+ z -1.0)))
(if (<= t_1 -2e-308)
t_1
(if (<= t_1 0.0)
(+
(/ (+ (/ (* y x) (- b y)) (/ (- a t) (/ (pow (- b y) 2.0) y))) z)
(/ (- t a) (- b y)))
(if (<= t_1 5e+283)
t_1
(- (/ t (- b y)) (+ (/ x z) (/ a (- b y))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
double tmp;
if (t_1 <= -2e+259) {
tmp = ((z / y) * ((a - t) / (z + -1.0))) - (x / (z + -1.0));
} else if (t_1 <= -2e-308) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((((y * x) / (b - y)) + ((a - t) / (pow((b - y), 2.0) / y))) / z) + ((t - a) / (b - y));
} else if (t_1 <= 5e+283) {
tmp = t_1;
} else {
tmp = (t / (b - y)) - ((x / z) + (a / (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) :: t_1
real(8) :: tmp
t_1 = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)))
if (t_1 <= (-2d+259)) then
tmp = ((z / y) * ((a - t) / (z + (-1.0d0)))) - (x / (z + (-1.0d0)))
else if (t_1 <= (-2d-308)) then
tmp = t_1
else if (t_1 <= 0.0d0) then
tmp = ((((y * x) / (b - y)) + ((a - t) / (((b - y) ** 2.0d0) / y))) / z) + ((t - a) / (b - y))
else if (t_1 <= 5d+283) then
tmp = t_1
else
tmp = (t / (b - y)) - ((x / z) + (a / (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 t_1 = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
double tmp;
if (t_1 <= -2e+259) {
tmp = ((z / y) * ((a - t) / (z + -1.0))) - (x / (z + -1.0));
} else if (t_1 <= -2e-308) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((((y * x) / (b - y)) + ((a - t) / (Math.pow((b - y), 2.0) / y))) / z) + ((t - a) / (b - y));
} else if (t_1 <= 5e+283) {
tmp = t_1;
} else {
tmp = (t / (b - y)) - ((x / z) + (a / (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))) tmp = 0 if t_1 <= -2e+259: tmp = ((z / y) * ((a - t) / (z + -1.0))) - (x / (z + -1.0)) elif t_1 <= -2e-308: tmp = t_1 elif t_1 <= 0.0: tmp = ((((y * x) / (b - y)) + ((a - t) / (math.pow((b - y), 2.0) / y))) / z) + ((t - a) / (b - y)) elif t_1 <= 5e+283: tmp = t_1 else: tmp = (t / (b - y)) - ((x / z) + (a / (b - y))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) tmp = 0.0 if (t_1 <= -2e+259) tmp = Float64(Float64(Float64(z / y) * Float64(Float64(a - t) / Float64(z + -1.0))) - Float64(x / Float64(z + -1.0))); elseif (t_1 <= -2e-308) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(Float64(Float64(y * x) / Float64(b - y)) + Float64(Float64(a - t) / Float64((Float64(b - y) ^ 2.0) / y))) / z) + Float64(Float64(t - a) / Float64(b - y))); elseif (t_1 <= 5e+283) tmp = t_1; else tmp = Float64(Float64(t / Float64(b - y)) - Float64(Float64(x / z) + Float64(a / Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))); tmp = 0.0; if (t_1 <= -2e+259) tmp = ((z / y) * ((a - t) / (z + -1.0))) - (x / (z + -1.0)); elseif (t_1 <= -2e-308) tmp = t_1; elseif (t_1 <= 0.0) tmp = ((((y * x) / (b - y)) + ((a - t) / (((b - y) ^ 2.0) / y))) / z) + ((t - a) / (b - y)); elseif (t_1 <= 5e+283) tmp = t_1; else tmp = (t / (b - y)) - ((x / z) + (a / (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+259], N[(N[(N[(z / y), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-308], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(N[(N[(y * x), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(a - t), $MachinePrecision] / N[(N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+283], t$95$1, N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(N[(x / z), $MachinePrecision] + N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+259}:\\
\;\;\;\;\frac{z}{y} \cdot \frac{a - t}{z + -1} - \frac{x}{z + -1}\\
\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-308}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{\frac{y \cdot x}{b - y} + \frac{a - t}{\frac{{\left(b - y\right)}^{2}}{y}}}{z} + \frac{t - a}{b - y}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+283}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y} - \left(\frac{x}{z} + \frac{a}{b - y}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e259Initial program 35.6%
Taylor expanded in y around -inf 16.3%
+-commutative16.3%
mul-1-neg16.3%
unsub-neg16.3%
Simplified50.8%
Taylor expanded in b around 0 60.4%
times-frac76.7%
sub-neg76.7%
metadata-eval76.7%
Simplified76.7%
if -2e259 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.9999999999999998e-308 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.0000000000000004e283Initial program 99.6%
if -1.9999999999999998e-308 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 20.8%
Taylor expanded in z around -inf 83.2%
+-commutative83.2%
associate--l+83.2%
Simplified94.3%
if 5.0000000000000004e283 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 6.6%
Taylor expanded in z around -inf 38.2%
associate--l+38.2%
mul-1-neg38.2%
distribute-lft-out--38.2%
associate-/l*54.9%
associate-/l*89.3%
Simplified89.3%
Taylor expanded in y around inf 88.0%
Final simplification94.0%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -250000000000.0) (not (<= z 23000000.0)))
(-
(* (/ y (- b y)) (/ x z))
(-
(- (/ a (- b y)) (* (/ y (pow (- b y) 2.0)) (/ (- a t) z)))
(/ t (- b y))))
(/ (fma x y (* z (- t a))) (fma z (- b y) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -250000000000.0) || !(z <= 23000000.0)) {
tmp = ((y / (b - y)) * (x / z)) - (((a / (b - y)) - ((y / pow((b - y), 2.0)) * ((a - t) / z))) - (t / (b - y)));
} else {
tmp = fma(x, y, (z * (t - a))) / fma(z, (b - y), y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -250000000000.0) || !(z <= 23000000.0)) tmp = Float64(Float64(Float64(y / Float64(b - y)) * Float64(x / z)) - Float64(Float64(Float64(a / Float64(b - y)) - Float64(Float64(y / (Float64(b - y) ^ 2.0)) * Float64(Float64(a - t) / z))) - Float64(t / Float64(b - y)))); else tmp = Float64(fma(x, y, Float64(z * Float64(t - a))) / fma(z, Float64(b - y), y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -250000000000.0], N[Not[LessEqual[z, 23000000.0]], $MachinePrecision]], N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(N[(y / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -250000000000 \lor \neg \left(z \leq 23000000\right):\\
\;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} - \left(\left(\frac{a}{b - y} - \frac{y}{{\left(b - y\right)}^{2}} \cdot \frac{a - t}{z}\right) - \frac{t}{b - y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
\end{array}
\end{array}
if z < -2.5e11 or 2.3e7 < z Initial program 39.6%
Taylor expanded in z around inf 62.3%
associate--l+62.3%
*-commutative62.3%
times-frac76.8%
+-commutative76.8%
times-frac96.1%
Simplified96.1%
if -2.5e11 < z < 2.3e7Initial program 89.4%
fma-def89.4%
+-commutative89.4%
fma-def89.4%
Simplified89.4%
Final simplification92.8%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -3950000000.0) (not (<= z 1350000.0)))
(-
(* (/ y (- b y)) (/ x z))
(-
(- (/ a (- b y)) (* (/ y (pow (- b y) 2.0)) (/ (- a t) z)))
(/ t (- b y))))
(/ (+ (* z (- t a)) (* y x)) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3950000000.0) || !(z <= 1350000.0)) {
tmp = ((y / (b - y)) * (x / z)) - (((a / (b - y)) - ((y / pow((b - y), 2.0)) * ((a - t) / z))) - (t / (b - y)));
} else {
tmp = ((z * (t - a)) + (y * x)) / (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 <= (-3950000000.0d0)) .or. (.not. (z <= 1350000.0d0))) then
tmp = ((y / (b - y)) * (x / z)) - (((a / (b - y)) - ((y / ((b - y) ** 2.0d0)) * ((a - t) / z))) - (t / (b - y)))
else
tmp = ((z * (t - a)) + (y * x)) / (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 <= -3950000000.0) || !(z <= 1350000.0)) {
tmp = ((y / (b - y)) * (x / z)) - (((a / (b - y)) - ((y / Math.pow((b - y), 2.0)) * ((a - t) / z))) - (t / (b - y)));
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3950000000.0) or not (z <= 1350000.0): tmp = ((y / (b - y)) * (x / z)) - (((a / (b - y)) - ((y / math.pow((b - y), 2.0)) * ((a - t) / z))) - (t / (b - y))) else: tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3950000000.0) || !(z <= 1350000.0)) tmp = Float64(Float64(Float64(y / Float64(b - y)) * Float64(x / z)) - Float64(Float64(Float64(a / Float64(b - y)) - Float64(Float64(y / (Float64(b - y) ^ 2.0)) * Float64(Float64(a - t) / z))) - Float64(t / Float64(b - y)))); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / 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 <= -3950000000.0) || ~((z <= 1350000.0))) tmp = ((y / (b - y)) * (x / z)) - (((a / (b - y)) - ((y / ((b - y) ^ 2.0)) * ((a - t) / z))) - (t / (b - y))); else tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3950000000.0], N[Not[LessEqual[z, 1350000.0]], $MachinePrecision]], N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(N[(y / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3950000000 \lor \neg \left(z \leq 1350000\right):\\
\;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} - \left(\left(\frac{a}{b - y} - \frac{y}{{\left(b - y\right)}^{2}} \cdot \frac{a - t}{z}\right) - \frac{t}{b - y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -3.95e9 or 1.35e6 < z Initial program 39.6%
Taylor expanded in z around inf 62.3%
associate--l+62.3%
*-commutative62.3%
times-frac76.8%
+-commutative76.8%
times-frac96.1%
Simplified96.1%
if -3.95e9 < z < 1.35e6Initial program 89.4%
Final simplification92.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (+ x (/ (- t a) y))))))
(if (<= z -5.2e-6)
(/ (- t a) (- b y))
(if (<= z -1.3e-270)
t_1
(if (<= z 3.8e-183)
(/ (+ (* y x) (* z t)) (+ y (* z b)))
(if (<= z 1.2e-94)
t_1
(if (<= z 1.26e+16)
(/ (* z (- t a)) (+ y (* z (- b y))))
(- (/ t (- b y)) (/ a (- b y))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (x + ((t - a) / y)));
double tmp;
if (z <= -5.2e-6) {
tmp = (t - a) / (b - y);
} else if (z <= -1.3e-270) {
tmp = t_1;
} else if (z <= 3.8e-183) {
tmp = ((y * x) + (z * t)) / (y + (z * b));
} else if (z <= 1.2e-94) {
tmp = t_1;
} else if (z <= 1.26e+16) {
tmp = (z * (t - a)) / (y + (z * (b - y)));
} else {
tmp = (t / (b - y)) - (a / (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) :: t_1
real(8) :: tmp
t_1 = x + (z * (x + ((t - a) / y)))
if (z <= (-5.2d-6)) then
tmp = (t - a) / (b - y)
else if (z <= (-1.3d-270)) then
tmp = t_1
else if (z <= 3.8d-183) then
tmp = ((y * x) + (z * t)) / (y + (z * b))
else if (z <= 1.2d-94) then
tmp = t_1
else if (z <= 1.26d+16) then
tmp = (z * (t - a)) / (y + (z * (b - y)))
else
tmp = (t / (b - y)) - (a / (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 t_1 = x + (z * (x + ((t - a) / y)));
double tmp;
if (z <= -5.2e-6) {
tmp = (t - a) / (b - y);
} else if (z <= -1.3e-270) {
tmp = t_1;
} else if (z <= 3.8e-183) {
tmp = ((y * x) + (z * t)) / (y + (z * b));
} else if (z <= 1.2e-94) {
tmp = t_1;
} else if (z <= 1.26e+16) {
tmp = (z * (t - a)) / (y + (z * (b - y)));
} else {
tmp = (t / (b - y)) - (a / (b - y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (x + ((t - a) / y))) tmp = 0 if z <= -5.2e-6: tmp = (t - a) / (b - y) elif z <= -1.3e-270: tmp = t_1 elif z <= 3.8e-183: tmp = ((y * x) + (z * t)) / (y + (z * b)) elif z <= 1.2e-94: tmp = t_1 elif z <= 1.26e+16: tmp = (z * (t - a)) / (y + (z * (b - y))) else: tmp = (t / (b - y)) - (a / (b - y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(x + Float64(Float64(t - a) / y)))) tmp = 0.0 if (z <= -5.2e-6) tmp = Float64(Float64(t - a) / Float64(b - y)); elseif (z <= -1.3e-270) tmp = t_1; elseif (z <= 3.8e-183) tmp = Float64(Float64(Float64(y * x) + Float64(z * t)) / Float64(y + Float64(z * b))); elseif (z <= 1.2e-94) tmp = t_1; elseif (z <= 1.26e+16) tmp = Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y)))); else tmp = Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * (x + ((t - a) / y))); tmp = 0.0; if (z <= -5.2e-6) tmp = (t - a) / (b - y); elseif (z <= -1.3e-270) tmp = t_1; elseif (z <= 3.8e-183) tmp = ((y * x) + (z * t)) / (y + (z * b)); elseif (z <= 1.2e-94) tmp = t_1; elseif (z <= 1.26e+16) tmp = (z * (t - a)) / (y + (z * (b - y))); else tmp = (t / (b - y)) - (a / (b - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * N[(x + N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e-6], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.3e-270], t$95$1, If[LessEqual[z, 3.8e-183], N[(N[(N[(y * x), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e-94], t$95$1, If[LessEqual[z, 1.26e+16], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \left(x + \frac{t - a}{y}\right)\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-270}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-183}:\\
\;\;\;\;\frac{y \cdot x + z \cdot t}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.26 \cdot 10^{+16}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\
\end{array}
\end{array}
if z < -5.20000000000000019e-6Initial program 41.6%
Taylor expanded in z around inf 77.7%
if -5.20000000000000019e-6 < z < -1.3000000000000001e-270 or 3.7999999999999996e-183 < z < 1.2e-94Initial program 88.1%
Taylor expanded in y around -inf 59.0%
+-commutative59.0%
mul-1-neg59.0%
unsub-neg59.0%
Simplified74.1%
Taylor expanded in b around 0 81.2%
times-frac74.8%
sub-neg74.8%
metadata-eval74.8%
Simplified74.8%
Taylor expanded in z around 0 75.7%
if -1.3000000000000001e-270 < z < 3.7999999999999996e-183Initial program 91.2%
Taylor expanded in b around inf 91.2%
Taylor expanded in a around 0 81.1%
if 1.2e-94 < z < 1.26e16Initial program 90.4%
fma-def90.4%
+-commutative90.4%
fma-def90.4%
Simplified90.4%
Taylor expanded in x around 0 71.1%
if 1.26e16 < z Initial program 38.1%
Taylor expanded in z around -inf 70.3%
associate--l+70.3%
mul-1-neg70.3%
distribute-lft-out--70.3%
associate-/l*73.6%
associate-/l*91.3%
Simplified91.3%
Taylor expanded in y around inf 87.9%
Taylor expanded in x around 0 72.4%
Final simplification75.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (* y x) (* z a)) y)))
(if (<= z -7.5e-6)
(/ (- t a) (- b y))
(if (<= z -9.6e-164)
(* x (/ 1.0 (- 1.0 z)))
(if (<= z -2.65e-275)
t_1
(if (<= z 8.8e-183)
(/ (* y x) (+ y (* z (- b y))))
(if (<= z 4.4e-79) t_1 (- (/ t (- b y)) (/ a (- b y))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * x) - (z * a)) / y;
double tmp;
if (z <= -7.5e-6) {
tmp = (t - a) / (b - y);
} else if (z <= -9.6e-164) {
tmp = x * (1.0 / (1.0 - z));
} else if (z <= -2.65e-275) {
tmp = t_1;
} else if (z <= 8.8e-183) {
tmp = (y * x) / (y + (z * (b - y)));
} else if (z <= 4.4e-79) {
tmp = t_1;
} else {
tmp = (t / (b - y)) - (a / (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) :: t_1
real(8) :: tmp
t_1 = ((y * x) - (z * a)) / y
if (z <= (-7.5d-6)) then
tmp = (t - a) / (b - y)
else if (z <= (-9.6d-164)) then
tmp = x * (1.0d0 / (1.0d0 - z))
else if (z <= (-2.65d-275)) then
tmp = t_1
else if (z <= 8.8d-183) then
tmp = (y * x) / (y + (z * (b - y)))
else if (z <= 4.4d-79) then
tmp = t_1
else
tmp = (t / (b - y)) - (a / (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 t_1 = ((y * x) - (z * a)) / y;
double tmp;
if (z <= -7.5e-6) {
tmp = (t - a) / (b - y);
} else if (z <= -9.6e-164) {
tmp = x * (1.0 / (1.0 - z));
} else if (z <= -2.65e-275) {
tmp = t_1;
} else if (z <= 8.8e-183) {
tmp = (y * x) / (y + (z * (b - y)));
} else if (z <= 4.4e-79) {
tmp = t_1;
} else {
tmp = (t / (b - y)) - (a / (b - y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y * x) - (z * a)) / y tmp = 0 if z <= -7.5e-6: tmp = (t - a) / (b - y) elif z <= -9.6e-164: tmp = x * (1.0 / (1.0 - z)) elif z <= -2.65e-275: tmp = t_1 elif z <= 8.8e-183: tmp = (y * x) / (y + (z * (b - y))) elif z <= 4.4e-79: tmp = t_1 else: tmp = (t / (b - y)) - (a / (b - y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * x) - Float64(z * a)) / y) tmp = 0.0 if (z <= -7.5e-6) tmp = Float64(Float64(t - a) / Float64(b - y)); elseif (z <= -9.6e-164) tmp = Float64(x * Float64(1.0 / Float64(1.0 - z))); elseif (z <= -2.65e-275) tmp = t_1; elseif (z <= 8.8e-183) tmp = Float64(Float64(y * x) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 4.4e-79) tmp = t_1; else tmp = Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y * x) - (z * a)) / y; tmp = 0.0; if (z <= -7.5e-6) tmp = (t - a) / (b - y); elseif (z <= -9.6e-164) tmp = x * (1.0 / (1.0 - z)); elseif (z <= -2.65e-275) tmp = t_1; elseif (z <= 8.8e-183) tmp = (y * x) / (y + (z * (b - y))); elseif (z <= 4.4e-79) tmp = t_1; else tmp = (t / (b - y)) - (a / (b - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * x), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -7.5e-6], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.6e-164], N[(x * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.65e-275], t$95$1, If[LessEqual[z, 8.8e-183], N[(N[(y * x), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e-79], t$95$1, N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot x - z \cdot a}{y}\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{elif}\;z \leq -9.6 \cdot 10^{-164}:\\
\;\;\;\;x \cdot \frac{1}{1 - z}\\
\mathbf{elif}\;z \leq -2.65 \cdot 10^{-275}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-183}:\\
\;\;\;\;\frac{y \cdot x}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-79}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\
\end{array}
\end{array}
if z < -7.50000000000000019e-6Initial program 41.6%
Taylor expanded in z around inf 77.7%
if -7.50000000000000019e-6 < z < -9.59999999999999932e-164Initial program 83.5%
Taylor expanded in y around inf 52.9%
+-commutative52.9%
mul-1-neg52.9%
unsub-neg52.9%
Simplified52.9%
div-inv53.0%
Applied egg-rr53.0%
if -9.59999999999999932e-164 < z < -2.64999999999999993e-275 or 8.7999999999999999e-183 < z < 4.3999999999999998e-79Initial program 92.1%
Taylor expanded in b around inf 92.1%
Taylor expanded in t around 0 70.6%
*-commutative70.6%
mul-1-neg70.6%
unsub-neg70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in b around 0 60.7%
if -2.64999999999999993e-275 < z < 8.7999999999999999e-183Initial program 90.7%
fma-def90.7%
+-commutative90.7%
fma-def90.7%
Simplified90.7%
Taylor expanded in x around inf 64.7%
if 4.3999999999999998e-79 < z Initial program 49.9%
Taylor expanded in z around -inf 67.6%
associate--l+67.6%
mul-1-neg67.6%
distribute-lft-out--67.6%
associate-/l*70.1%
associate-/l*83.7%
Simplified83.7%
Taylor expanded in y around inf 73.3%
Taylor expanded in x around 0 65.1%
Final simplification66.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.3e+33) (not (<= z 1.2e+19))) (- (/ t (- b y)) (+ (/ x z) (/ a (- b y)))) (/ (+ (* z (- t a)) (* y x)) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.3e+33) || !(z <= 1.2e+19)) {
tmp = (t / (b - y)) - ((x / z) + (a / (b - y)));
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3.3d+33)) .or. (.not. (z <= 1.2d+19))) then
tmp = (t / (b - y)) - ((x / z) + (a / (b - y)))
else
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.3e+33) || !(z <= 1.2e+19)) {
tmp = (t / (b - y)) - ((x / z) + (a / (b - y)));
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.3e+33) or not (z <= 1.2e+19): tmp = (t / (b - y)) - ((x / z) + (a / (b - y))) else: tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.3e+33) || !(z <= 1.2e+19)) tmp = Float64(Float64(t / Float64(b - y)) - Float64(Float64(x / z) + Float64(a / Float64(b - y)))); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.3e+33) || ~((z <= 1.2e+19))) tmp = (t / (b - y)) - ((x / z) + (a / (b - y))); else tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.3e+33], N[Not[LessEqual[z, 1.2e+19]], $MachinePrecision]], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(N[(x / z), $MachinePrecision] + N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+33} \lor \neg \left(z \leq 1.2 \cdot 10^{+19}\right):\\
\;\;\;\;\frac{t}{b - y} - \left(\frac{x}{z} + \frac{a}{b - y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -3.29999999999999976e33 or 1.2e19 < z Initial program 35.7%
Taylor expanded in z around -inf 64.1%
associate--l+64.1%
mul-1-neg64.1%
distribute-lft-out--64.1%
associate-/l*72.1%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in y around inf 90.0%
if -3.29999999999999976e33 < z < 1.2e19Initial program 90.0%
Final simplification90.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -0.00013)
t_1
(if (<= z -4.7e-169)
(* x (/ 1.0 (- 1.0 z)))
(if (<= z 7e-122)
(/ (- (* y x) (* z a)) y)
(if (<= z 4e-26)
(/ (* z t) (+ y (* z b)))
(if (<= z 3.1e+19) (* (/ z y) (/ a (+ z -1.0))) 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 <= -0.00013) {
tmp = t_1;
} else if (z <= -4.7e-169) {
tmp = x * (1.0 / (1.0 - z));
} else if (z <= 7e-122) {
tmp = ((y * x) - (z * a)) / y;
} else if (z <= 4e-26) {
tmp = (z * t) / (y + (z * b));
} else if (z <= 3.1e+19) {
tmp = (z / y) * (a / (z + -1.0));
} 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 <= (-0.00013d0)) then
tmp = t_1
else if (z <= (-4.7d-169)) then
tmp = x * (1.0d0 / (1.0d0 - z))
else if (z <= 7d-122) then
tmp = ((y * x) - (z * a)) / y
else if (z <= 4d-26) then
tmp = (z * t) / (y + (z * b))
else if (z <= 3.1d+19) then
tmp = (z / y) * (a / (z + (-1.0d0)))
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 <= -0.00013) {
tmp = t_1;
} else if (z <= -4.7e-169) {
tmp = x * (1.0 / (1.0 - z));
} else if (z <= 7e-122) {
tmp = ((y * x) - (z * a)) / y;
} else if (z <= 4e-26) {
tmp = (z * t) / (y + (z * b));
} else if (z <= 3.1e+19) {
tmp = (z / y) * (a / (z + -1.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -0.00013: tmp = t_1 elif z <= -4.7e-169: tmp = x * (1.0 / (1.0 - z)) elif z <= 7e-122: tmp = ((y * x) - (z * a)) / y elif z <= 4e-26: tmp = (z * t) / (y + (z * b)) elif z <= 3.1e+19: tmp = (z / y) * (a / (z + -1.0)) 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 <= -0.00013) tmp = t_1; elseif (z <= -4.7e-169) tmp = Float64(x * Float64(1.0 / Float64(1.0 - z))); elseif (z <= 7e-122) tmp = Float64(Float64(Float64(y * x) - Float64(z * a)) / y); elseif (z <= 4e-26) tmp = Float64(Float64(z * t) / Float64(y + Float64(z * b))); elseif (z <= 3.1e+19) tmp = Float64(Float64(z / y) * Float64(a / Float64(z + -1.0))); 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 <= -0.00013) tmp = t_1; elseif (z <= -4.7e-169) tmp = x * (1.0 / (1.0 - z)); elseif (z <= 7e-122) tmp = ((y * x) - (z * a)) / y; elseif (z <= 4e-26) tmp = (z * t) / (y + (z * b)); elseif (z <= 3.1e+19) tmp = (z / y) * (a / (z + -1.0)); 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, -0.00013], t$95$1, If[LessEqual[z, -4.7e-169], N[(x * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-122], N[(N[(N[(y * x), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 4e-26], N[(N[(z * t), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e+19], N[(N[(z / y), $MachinePrecision] * N[(a / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -0.00013:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{-169}:\\
\;\;\;\;x \cdot \frac{1}{1 - z}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-122}:\\
\;\;\;\;\frac{y \cdot x - z \cdot a}{y}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-26}:\\
\;\;\;\;\frac{z \cdot t}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+19}:\\
\;\;\;\;\frac{z}{y} \cdot \frac{a}{z + -1}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.29999999999999989e-4 or 3.1e19 < z Initial program 40.3%
Taylor expanded in z around inf 75.2%
if -1.29999999999999989e-4 < z < -4.6999999999999999e-169Initial program 83.5%
Taylor expanded in y around inf 52.9%
+-commutative52.9%
mul-1-neg52.9%
unsub-neg52.9%
Simplified52.9%
div-inv53.0%
Applied egg-rr53.0%
if -4.6999999999999999e-169 < z < 7.0000000000000003e-122Initial program 91.7%
Taylor expanded in b around inf 91.7%
Taylor expanded in t around 0 75.5%
*-commutative75.5%
mul-1-neg75.5%
unsub-neg75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in b around 0 60.5%
if 7.0000000000000003e-122 < z < 4.0000000000000002e-26Initial program 84.9%
Taylor expanded in b around inf 84.9%
Taylor expanded in t around inf 52.6%
if 4.0000000000000002e-26 < z < 3.1e19Initial program 88.9%
Taylor expanded in y around -inf 77.4%
+-commutative77.4%
mul-1-neg77.4%
unsub-neg77.4%
Simplified88.4%
Taylor expanded in b around 0 78.8%
times-frac89.4%
sub-neg89.4%
metadata-eval89.4%
Simplified89.4%
Taylor expanded in a around inf 44.7%
times-frac55.7%
sub-neg55.7%
metadata-eval55.7%
+-commutative55.7%
Simplified55.7%
Final simplification66.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -0.00033)
(/ (- t a) (- b y))
(if (<= z 1.2e-94)
(+ x (* z (+ x (/ (- t a) y))))
(if (<= z 1.85e+15)
(/ (* z (- t a)) (+ y (* z (- b y))))
(- (/ t (- b y)) (/ a (- b y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.00033) {
tmp = (t - a) / (b - y);
} else if (z <= 1.2e-94) {
tmp = x + (z * (x + ((t - a) / y)));
} else if (z <= 1.85e+15) {
tmp = (z * (t - a)) / (y + (z * (b - y)));
} else {
tmp = (t / (b - y)) - (a / (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 <= (-0.00033d0)) then
tmp = (t - a) / (b - y)
else if (z <= 1.2d-94) then
tmp = x + (z * (x + ((t - a) / y)))
else if (z <= 1.85d+15) then
tmp = (z * (t - a)) / (y + (z * (b - y)))
else
tmp = (t / (b - y)) - (a / (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 <= -0.00033) {
tmp = (t - a) / (b - y);
} else if (z <= 1.2e-94) {
tmp = x + (z * (x + ((t - a) / y)));
} else if (z <= 1.85e+15) {
tmp = (z * (t - a)) / (y + (z * (b - y)));
} else {
tmp = (t / (b - y)) - (a / (b - y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.00033: tmp = (t - a) / (b - y) elif z <= 1.2e-94: tmp = x + (z * (x + ((t - a) / y))) elif z <= 1.85e+15: tmp = (z * (t - a)) / (y + (z * (b - y))) else: tmp = (t / (b - y)) - (a / (b - y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.00033) tmp = Float64(Float64(t - a) / Float64(b - y)); elseif (z <= 1.2e-94) tmp = Float64(x + Float64(z * Float64(x + Float64(Float64(t - a) / y)))); elseif (z <= 1.85e+15) tmp = Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y)))); else tmp = Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.00033) tmp = (t - a) / (b - y); elseif (z <= 1.2e-94) tmp = x + (z * (x + ((t - a) / y))); elseif (z <= 1.85e+15) tmp = (z * (t - a)) / (y + (z * (b - y))); else tmp = (t / (b - y)) - (a / (b - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.00033], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e-94], N[(x + N[(z * N[(x + N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e+15], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00033:\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-94}:\\
\;\;\;\;x + z \cdot \left(x + \frac{t - a}{y}\right)\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+15}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\
\end{array}
\end{array}
if z < -3.3e-4Initial program 41.6%
Taylor expanded in z around inf 77.7%
if -3.3e-4 < z < 1.2e-94Initial program 89.1%
Taylor expanded in y around -inf 56.9%
+-commutative56.9%
mul-1-neg56.9%
unsub-neg56.9%
Simplified70.9%
Taylor expanded in b around 0 78.9%
times-frac74.2%
sub-neg74.2%
metadata-eval74.2%
Simplified74.2%
Taylor expanded in z around 0 73.4%
if 1.2e-94 < z < 1.85e15Initial program 90.4%
fma-def90.4%
+-commutative90.4%
fma-def90.4%
Simplified90.4%
Taylor expanded in x around 0 71.1%
if 1.85e15 < z Initial program 38.1%
Taylor expanded in z around -inf 70.3%
associate--l+70.3%
mul-1-neg70.3%
distribute-lft-out--70.3%
associate-/l*73.6%
associate-/l*91.3%
Simplified91.3%
Taylor expanded in y around inf 87.9%
Taylor expanded in x around 0 72.4%
Final simplification74.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.5e+30) (not (<= z 50.0))) (- (/ t (- b y)) (+ (/ x z) (/ a (- b y)))) (/ (+ (* z (- t a)) (* y x)) (+ y (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.5e+30) || !(z <= 50.0)) {
tmp = (t / (b - y)) - ((x / z) + (a / (b - y)));
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.5d+30)) .or. (.not. (z <= 50.0d0))) then
tmp = (t / (b - y)) - ((x / z) + (a / (b - y)))
else
tmp = ((z * (t - a)) + (y * x)) / (y + (z * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.5e+30) || !(z <= 50.0)) {
tmp = (t / (b - y)) - ((x / z) + (a / (b - y)));
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.5e+30) or not (z <= 50.0): tmp = (t / (b - y)) - ((x / z) + (a / (b - y))) else: tmp = ((z * (t - a)) + (y * x)) / (y + (z * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.5e+30) || !(z <= 50.0)) tmp = Float64(Float64(t / Float64(b - y)) - Float64(Float64(x / z) + Float64(a / Float64(b - y)))); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(y + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.5e+30) || ~((z <= 50.0))) tmp = (t / (b - y)) - ((x / z) + (a / (b - y))); else tmp = ((z * (t - a)) + (y * x)) / (y + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.5e+30], N[Not[LessEqual[z, 50.0]], $MachinePrecision]], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(N[(x / z), $MachinePrecision] + N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+30} \lor \neg \left(z \leq 50\right):\\
\;\;\;\;\frac{t}{b - y} - \left(\frac{x}{z} + \frac{a}{b - y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot b}\\
\end{array}
\end{array}
if z < -1.49999999999999989e30 or 50 < z Initial program 37.7%
Taylor expanded in z around -inf 64.4%
associate--l+64.4%
mul-1-neg64.4%
distribute-lft-out--64.4%
associate-/l*72.0%
associate-/l*92.0%
Simplified92.0%
Taylor expanded in y around inf 88.7%
if -1.49999999999999989e30 < z < 50Initial program 89.7%
Taylor expanded in b around inf 87.6%
Final simplification88.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.3e+17)
(/ (- t a) (- b y))
(if (<= z 7.3)
(/ (+ (* z (- t a)) (* y x)) (+ y (* z b)))
(- (/ t (- b y)) (/ a (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.3e+17) {
tmp = (t - a) / (b - y);
} else if (z <= 7.3) {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * b));
} else {
tmp = (t / (b - y)) - (a / (b - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.3d+17)) then
tmp = (t - a) / (b - y)
else if (z <= 7.3d0) then
tmp = ((z * (t - a)) + (y * x)) / (y + (z * b))
else
tmp = (t / (b - y)) - (a / (b - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.3e+17) {
tmp = (t - a) / (b - y);
} else if (z <= 7.3) {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * b));
} else {
tmp = (t / (b - y)) - (a / (b - y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.3e+17: tmp = (t - a) / (b - y) elif z <= 7.3: tmp = ((z * (t - a)) + (y * x)) / (y + (z * b)) else: tmp = (t / (b - y)) - (a / (b - y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.3e+17) tmp = Float64(Float64(t - a) / Float64(b - y)); elseif (z <= 7.3) tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(y + Float64(z * b))); else tmp = Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.3e+17) tmp = (t - a) / (b - y); elseif (z <= 7.3) tmp = ((z * (t - a)) + (y * x)) / (y + (z * b)); else tmp = (t / (b - y)) - (a / (b - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.3e+17], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.3], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+17}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{elif}\;z \leq 7.3:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\
\end{array}
\end{array}
if z < -1.3e17Initial program 36.5%
Taylor expanded in z around inf 77.1%
if -1.3e17 < z < 7.29999999999999982Initial program 89.4%
Taylor expanded in b around inf 88.1%
if 7.29999999999999982 < z Initial program 42.2%
Taylor expanded in z around -inf 70.4%
associate--l+70.4%
mul-1-neg70.4%
distribute-lft-out--70.4%
associate-/l*73.5%
associate-/l*90.0%
Simplified90.0%
Taylor expanded in y around inf 85.3%
Taylor expanded in x around 0 70.4%
Final simplification81.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))) (t_2 (/ t (- b y))))
(if (<= t -2.55e+151)
t_2
(if (<= t -5e+74)
t_1
(if (<= t -9e+49)
t_2
(if (<= t -3.4e-296)
t_1
(if (<= t 1.62e-124)
(- (/ a b))
(if (<= t 210000000000.0) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double t_2 = t / (b - y);
double tmp;
if (t <= -2.55e+151) {
tmp = t_2;
} else if (t <= -5e+74) {
tmp = t_1;
} else if (t <= -9e+49) {
tmp = t_2;
} else if (t <= -3.4e-296) {
tmp = t_1;
} else if (t <= 1.62e-124) {
tmp = -(a / b);
} else if (t <= 210000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / (1.0d0 - z)
t_2 = t / (b - y)
if (t <= (-2.55d+151)) then
tmp = t_2
else if (t <= (-5d+74)) then
tmp = t_1
else if (t <= (-9d+49)) then
tmp = t_2
else if (t <= (-3.4d-296)) then
tmp = t_1
else if (t <= 1.62d-124) then
tmp = -(a / b)
else if (t <= 210000000000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double t_2 = t / (b - y);
double tmp;
if (t <= -2.55e+151) {
tmp = t_2;
} else if (t <= -5e+74) {
tmp = t_1;
} else if (t <= -9e+49) {
tmp = t_2;
} else if (t <= -3.4e-296) {
tmp = t_1;
} else if (t <= 1.62e-124) {
tmp = -(a / b);
} else if (t <= 210000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) t_2 = t / (b - y) tmp = 0 if t <= -2.55e+151: tmp = t_2 elif t <= -5e+74: tmp = t_1 elif t <= -9e+49: tmp = t_2 elif t <= -3.4e-296: tmp = t_1 elif t <= 1.62e-124: tmp = -(a / b) elif t <= 210000000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) t_2 = Float64(t / Float64(b - y)) tmp = 0.0 if (t <= -2.55e+151) tmp = t_2; elseif (t <= -5e+74) tmp = t_1; elseif (t <= -9e+49) tmp = t_2; elseif (t <= -3.4e-296) tmp = t_1; elseif (t <= 1.62e-124) tmp = Float64(-Float64(a / b)); elseif (t <= 210000000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); t_2 = t / (b - y); tmp = 0.0; if (t <= -2.55e+151) tmp = t_2; elseif (t <= -5e+74) tmp = t_1; elseif (t <= -9e+49) tmp = t_2; elseif (t <= -3.4e-296) tmp = t_1; elseif (t <= 1.62e-124) tmp = -(a / b); elseif (t <= 210000000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.55e+151], t$95$2, If[LessEqual[t, -5e+74], t$95$1, If[LessEqual[t, -9e+49], t$95$2, If[LessEqual[t, -3.4e-296], t$95$1, If[LessEqual[t, 1.62e-124], (-N[(a / b), $MachinePrecision]), If[LessEqual[t, 210000000000.0], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
t_2 := \frac{t}{b - y}\\
\mathbf{if}\;t \leq -2.55 \cdot 10^{+151}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -5 \cdot 10^{+74}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -9 \cdot 10^{+49}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -3.4 \cdot 10^{-296}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.62 \cdot 10^{-124}:\\
\;\;\;\;-\frac{a}{b}\\
\mathbf{elif}\;t \leq 210000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.54999999999999998e151 or -4.99999999999999963e74 < t < -8.99999999999999965e49 or 2.1e11 < t Initial program 55.5%
Taylor expanded in z around inf 65.2%
Taylor expanded in t around inf 54.0%
if -2.54999999999999998e151 < t < -4.99999999999999963e74 or -8.99999999999999965e49 < t < -3.39999999999999997e-296 or 1.62000000000000006e-124 < t < 2.1e11Initial program 69.4%
Taylor expanded in y around inf 48.7%
+-commutative48.7%
mul-1-neg48.7%
unsub-neg48.7%
Simplified48.7%
if -3.39999999999999997e-296 < t < 1.62000000000000006e-124Initial program 69.9%
Taylor expanded in b around inf 67.3%
Taylor expanded in t around 0 64.4%
*-commutative64.4%
mul-1-neg64.4%
unsub-neg64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in y around 0 41.0%
associate-*r/41.0%
neg-mul-141.0%
Simplified41.0%
Final simplification49.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a t) y)))
(if (<= y -8.5e+17)
(/ x (- 1.0 z))
(if (<= y -1.2e-36)
t_1
(if (<= y -9.8e-67)
(* x (+ z 1.0))
(if (<= y -9e-68)
t_1
(if (<= y 2900000000.0) (/ (- t a) b) (* x (/ 1.0 (- 1.0 z))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / y;
double tmp;
if (y <= -8.5e+17) {
tmp = x / (1.0 - z);
} else if (y <= -1.2e-36) {
tmp = t_1;
} else if (y <= -9.8e-67) {
tmp = x * (z + 1.0);
} else if (y <= -9e-68) {
tmp = t_1;
} else if (y <= 2900000000.0) {
tmp = (t - a) / b;
} else {
tmp = x * (1.0 / (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) :: t_1
real(8) :: tmp
t_1 = (a - t) / y
if (y <= (-8.5d+17)) then
tmp = x / (1.0d0 - z)
else if (y <= (-1.2d-36)) then
tmp = t_1
else if (y <= (-9.8d-67)) then
tmp = x * (z + 1.0d0)
else if (y <= (-9d-68)) then
tmp = t_1
else if (y <= 2900000000.0d0) then
tmp = (t - a) / b
else
tmp = x * (1.0d0 / (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 t_1 = (a - t) / y;
double tmp;
if (y <= -8.5e+17) {
tmp = x / (1.0 - z);
} else if (y <= -1.2e-36) {
tmp = t_1;
} else if (y <= -9.8e-67) {
tmp = x * (z + 1.0);
} else if (y <= -9e-68) {
tmp = t_1;
} else if (y <= 2900000000.0) {
tmp = (t - a) / b;
} else {
tmp = x * (1.0 / (1.0 - z));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - t) / y tmp = 0 if y <= -8.5e+17: tmp = x / (1.0 - z) elif y <= -1.2e-36: tmp = t_1 elif y <= -9.8e-67: tmp = x * (z + 1.0) elif y <= -9e-68: tmp = t_1 elif y <= 2900000000.0: tmp = (t - a) / b else: tmp = x * (1.0 / (1.0 - z)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - t) / y) tmp = 0.0 if (y <= -8.5e+17) tmp = Float64(x / Float64(1.0 - z)); elseif (y <= -1.2e-36) tmp = t_1; elseif (y <= -9.8e-67) tmp = Float64(x * Float64(z + 1.0)); elseif (y <= -9e-68) tmp = t_1; elseif (y <= 2900000000.0) tmp = Float64(Float64(t - a) / b); else tmp = Float64(x * Float64(1.0 / Float64(1.0 - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - t) / y; tmp = 0.0; if (y <= -8.5e+17) tmp = x / (1.0 - z); elseif (y <= -1.2e-36) tmp = t_1; elseif (y <= -9.8e-67) tmp = x * (z + 1.0); elseif (y <= -9e-68) tmp = t_1; elseif (y <= 2900000000.0) tmp = (t - a) / b; else tmp = x * (1.0 / (1.0 - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -8.5e+17], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.2e-36], t$95$1, If[LessEqual[y, -9.8e-67], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9e-68], t$95$1, If[LessEqual[y, 2900000000.0], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], N[(x * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y}\\
\mathbf{if}\;y \leq -8.5 \cdot 10^{+17}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -9.8 \cdot 10^{-67}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2900000000:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{1 - z}\\
\end{array}
\end{array}
if y < -8.5e17Initial program 45.6%
Taylor expanded in y around inf 53.2%
+-commutative53.2%
mul-1-neg53.2%
unsub-neg53.2%
Simplified53.2%
if -8.5e17 < y < -1.2e-36 or -9.79999999999999987e-67 < y < -8.99999999999999998e-68Initial program 50.2%
Taylor expanded in z around inf 75.1%
Taylor expanded in b around 0 62.6%
mul-1-neg62.6%
Simplified62.6%
if -1.2e-36 < y < -9.79999999999999987e-67Initial program 99.6%
Taylor expanded in y around inf 58.5%
+-commutative58.5%
mul-1-neg58.5%
unsub-neg58.5%
Simplified58.5%
div-inv58.5%
Applied egg-rr58.5%
Taylor expanded in z around 0 59.6%
+-commutative59.6%
Simplified59.6%
if -8.99999999999999998e-68 < y < 2.9e9Initial program 81.4%
Taylor expanded in y around 0 54.4%
if 2.9e9 < y Initial program 52.9%
Taylor expanded in y around inf 52.9%
+-commutative52.9%
mul-1-neg52.9%
unsub-neg52.9%
Simplified52.9%
div-inv52.9%
Applied egg-rr52.9%
Final simplification54.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -0.0004)
(/ (- t a) (- b y))
(if (<= z -1.1e-163)
(* x (/ 1.0 (- 1.0 z)))
(if (<= z 1.12e-77)
(/ (- (* y x) (* z a)) y)
(- (/ t (- b y)) (/ a (- b y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.0004) {
tmp = (t - a) / (b - y);
} else if (z <= -1.1e-163) {
tmp = x * (1.0 / (1.0 - z));
} else if (z <= 1.12e-77) {
tmp = ((y * x) - (z * a)) / y;
} else {
tmp = (t / (b - y)) - (a / (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 <= (-0.0004d0)) then
tmp = (t - a) / (b - y)
else if (z <= (-1.1d-163)) then
tmp = x * (1.0d0 / (1.0d0 - z))
else if (z <= 1.12d-77) then
tmp = ((y * x) - (z * a)) / y
else
tmp = (t / (b - y)) - (a / (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 <= -0.0004) {
tmp = (t - a) / (b - y);
} else if (z <= -1.1e-163) {
tmp = x * (1.0 / (1.0 - z));
} else if (z <= 1.12e-77) {
tmp = ((y * x) - (z * a)) / y;
} else {
tmp = (t / (b - y)) - (a / (b - y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.0004: tmp = (t - a) / (b - y) elif z <= -1.1e-163: tmp = x * (1.0 / (1.0 - z)) elif z <= 1.12e-77: tmp = ((y * x) - (z * a)) / y else: tmp = (t / (b - y)) - (a / (b - y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.0004) tmp = Float64(Float64(t - a) / Float64(b - y)); elseif (z <= -1.1e-163) tmp = Float64(x * Float64(1.0 / Float64(1.0 - z))); elseif (z <= 1.12e-77) tmp = Float64(Float64(Float64(y * x) - Float64(z * a)) / y); else tmp = Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.0004) tmp = (t - a) / (b - y); elseif (z <= -1.1e-163) tmp = x * (1.0 / (1.0 - z)); elseif (z <= 1.12e-77) tmp = ((y * x) - (z * a)) / y; else tmp = (t / (b - y)) - (a / (b - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.0004], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e-163], N[(x * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.12e-77], N[(N[(N[(y * x), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0004:\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-163}:\\
\;\;\;\;x \cdot \frac{1}{1 - z}\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-77}:\\
\;\;\;\;\frac{y \cdot x - z \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\
\end{array}
\end{array}
if z < -4.00000000000000019e-4Initial program 41.6%
Taylor expanded in z around inf 77.7%
if -4.00000000000000019e-4 < z < -1.10000000000000005e-163Initial program 83.5%
Taylor expanded in y around inf 52.9%
+-commutative52.9%
mul-1-neg52.9%
unsub-neg52.9%
Simplified52.9%
div-inv53.0%
Applied egg-rr53.0%
if -1.10000000000000005e-163 < z < 1.12000000000000009e-77Initial program 91.5%
Taylor expanded in b around inf 91.5%
Taylor expanded in t around 0 71.3%
*-commutative71.3%
mul-1-neg71.3%
unsub-neg71.3%
*-commutative71.3%
Simplified71.3%
Taylor expanded in b around 0 55.8%
if 1.12000000000000009e-77 < z Initial program 49.9%
Taylor expanded in z around -inf 67.6%
associate--l+67.6%
mul-1-neg67.6%
distribute-lft-out--67.6%
associate-/l*70.1%
associate-/l*83.7%
Simplified83.7%
Taylor expanded in y around inf 73.3%
Taylor expanded in x around 0 65.1%
Final simplification64.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a t) y)) (t_2 (/ x (- 1.0 z))))
(if (<= y -1.45e+18)
t_2
(if (<= y -3.4e-36)
t_1
(if (<= y -1.15e-66)
(* x (+ z 1.0))
(if (<= y -5.2e-68)
t_1
(if (<= y 1900000000.0) (/ (- t a) b) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / y;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -1.45e+18) {
tmp = t_2;
} else if (y <= -3.4e-36) {
tmp = t_1;
} else if (y <= -1.15e-66) {
tmp = x * (z + 1.0);
} else if (y <= -5.2e-68) {
tmp = t_1;
} else if (y <= 1900000000.0) {
tmp = (t - a) / b;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (a - t) / y
t_2 = x / (1.0d0 - z)
if (y <= (-1.45d+18)) then
tmp = t_2
else if (y <= (-3.4d-36)) then
tmp = t_1
else if (y <= (-1.15d-66)) then
tmp = x * (z + 1.0d0)
else if (y <= (-5.2d-68)) then
tmp = t_1
else if (y <= 1900000000.0d0) then
tmp = (t - a) / b
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / y;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -1.45e+18) {
tmp = t_2;
} else if (y <= -3.4e-36) {
tmp = t_1;
} else if (y <= -1.15e-66) {
tmp = x * (z + 1.0);
} else if (y <= -5.2e-68) {
tmp = t_1;
} else if (y <= 1900000000.0) {
tmp = (t - a) / b;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - t) / y t_2 = x / (1.0 - z) tmp = 0 if y <= -1.45e+18: tmp = t_2 elif y <= -3.4e-36: tmp = t_1 elif y <= -1.15e-66: tmp = x * (z + 1.0) elif y <= -5.2e-68: tmp = t_1 elif y <= 1900000000.0: tmp = (t - a) / b else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - t) / y) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -1.45e+18) tmp = t_2; elseif (y <= -3.4e-36) tmp = t_1; elseif (y <= -1.15e-66) tmp = Float64(x * Float64(z + 1.0)); elseif (y <= -5.2e-68) tmp = t_1; elseif (y <= 1900000000.0) tmp = Float64(Float64(t - a) / b); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - t) / y; t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -1.45e+18) tmp = t_2; elseif (y <= -3.4e-36) tmp = t_1; elseif (y <= -1.15e-66) tmp = x * (z + 1.0); elseif (y <= -5.2e-68) tmp = t_1; elseif (y <= 1900000000.0) tmp = (t - a) / b; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.45e+18], t$95$2, If[LessEqual[y, -3.4e-36], t$95$1, If[LessEqual[y, -1.15e-66], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.2e-68], t$95$1, If[LessEqual[y, 1900000000.0], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{+18}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{-66}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1900000000:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.45e18 or 1.9e9 < y Initial program 48.8%
Taylor expanded in y around inf 53.1%
+-commutative53.1%
mul-1-neg53.1%
unsub-neg53.1%
Simplified53.1%
if -1.45e18 < y < -3.4000000000000003e-36 or -1.14999999999999996e-66 < y < -5.1999999999999996e-68Initial program 50.2%
Taylor expanded in z around inf 75.1%
Taylor expanded in b around 0 62.6%
mul-1-neg62.6%
Simplified62.6%
if -3.4000000000000003e-36 < y < -1.14999999999999996e-66Initial program 99.6%
Taylor expanded in y around inf 58.5%
+-commutative58.5%
mul-1-neg58.5%
unsub-neg58.5%
Simplified58.5%
div-inv58.5%
Applied egg-rr58.5%
Taylor expanded in z around 0 59.6%
+-commutative59.6%
Simplified59.6%
if -5.1999999999999996e-68 < y < 1.9e9Initial program 81.4%
Taylor expanded in y around 0 54.4%
Final simplification54.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -0.017)
t_1
(if (<= z 9.8e-118)
(* x (/ 1.0 (- 1.0 z)))
(if (<= z 8e-29)
(/ (* z t) (+ y (* z b)))
(if (<= z 460.0) (/ x (- 1.0 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 <= -0.017) {
tmp = t_1;
} else if (z <= 9.8e-118) {
tmp = x * (1.0 / (1.0 - z));
} else if (z <= 8e-29) {
tmp = (z * t) / (y + (z * b));
} else if (z <= 460.0) {
tmp = x / (1.0 - 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 <= (-0.017d0)) then
tmp = t_1
else if (z <= 9.8d-118) then
tmp = x * (1.0d0 / (1.0d0 - z))
else if (z <= 8d-29) then
tmp = (z * t) / (y + (z * b))
else if (z <= 460.0d0) then
tmp = x / (1.0d0 - 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 <= -0.017) {
tmp = t_1;
} else if (z <= 9.8e-118) {
tmp = x * (1.0 / (1.0 - z));
} else if (z <= 8e-29) {
tmp = (z * t) / (y + (z * b));
} else if (z <= 460.0) {
tmp = x / (1.0 - 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 <= -0.017: tmp = t_1 elif z <= 9.8e-118: tmp = x * (1.0 / (1.0 - z)) elif z <= 8e-29: tmp = (z * t) / (y + (z * b)) elif z <= 460.0: tmp = x / (1.0 - 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 <= -0.017) tmp = t_1; elseif (z <= 9.8e-118) tmp = Float64(x * Float64(1.0 / Float64(1.0 - z))); elseif (z <= 8e-29) tmp = Float64(Float64(z * t) / Float64(y + Float64(z * b))); elseif (z <= 460.0) tmp = Float64(x / Float64(1.0 - 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 <= -0.017) tmp = t_1; elseif (z <= 9.8e-118) tmp = x * (1.0 / (1.0 - z)); elseif (z <= 8e-29) tmp = (z * t) / (y + (z * b)); elseif (z <= 460.0) tmp = x / (1.0 - 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, -0.017], t$95$1, If[LessEqual[z, 9.8e-118], N[(x * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-29], N[(N[(z * t), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 460.0], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -0.017:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{-118}:\\
\;\;\;\;x \cdot \frac{1}{1 - z}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-29}:\\
\;\;\;\;\frac{z \cdot t}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 460:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -0.017000000000000001 or 460 < z Initial program 41.4%
Taylor expanded in z around inf 75.0%
if -0.017000000000000001 < z < 9.7999999999999995e-118Initial program 88.6%
Taylor expanded in y around inf 50.1%
+-commutative50.1%
mul-1-neg50.1%
unsub-neg50.1%
Simplified50.1%
div-inv50.1%
Applied egg-rr50.1%
if 9.7999999999999995e-118 < z < 7.99999999999999955e-29Initial program 93.8%
Taylor expanded in b around inf 93.8%
Taylor expanded in t around inf 56.1%
if 7.99999999999999955e-29 < z < 460Initial program 84.0%
Taylor expanded in y around inf 52.8%
+-commutative52.8%
mul-1-neg52.8%
unsub-neg52.8%
Simplified52.8%
Final simplification63.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -5.7e-6)
(/ (- t a) (- b y))
(if (<= z 1.15e-77)
(/ (+ (* z (- t a)) (* y x)) y)
(- (/ t (- b y)) (/ a (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.7e-6) {
tmp = (t - a) / (b - y);
} else if (z <= 1.15e-77) {
tmp = ((z * (t - a)) + (y * x)) / y;
} else {
tmp = (t / (b - y)) - (a / (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 <= (-5.7d-6)) then
tmp = (t - a) / (b - y)
else if (z <= 1.15d-77) then
tmp = ((z * (t - a)) + (y * x)) / y
else
tmp = (t / (b - y)) - (a / (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 <= -5.7e-6) {
tmp = (t - a) / (b - y);
} else if (z <= 1.15e-77) {
tmp = ((z * (t - a)) + (y * x)) / y;
} else {
tmp = (t / (b - y)) - (a / (b - y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -5.7e-6: tmp = (t - a) / (b - y) elif z <= 1.15e-77: tmp = ((z * (t - a)) + (y * x)) / y else: tmp = (t / (b - y)) - (a / (b - y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5.7e-6) tmp = Float64(Float64(t - a) / Float64(b - y)); elseif (z <= 1.15e-77) tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / y); else tmp = Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -5.7e-6) tmp = (t - a) / (b - y); elseif (z <= 1.15e-77) tmp = ((z * (t - a)) + (y * x)) / y; else tmp = (t / (b - y)) - (a / (b - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5.7e-6], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e-77], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.7 \cdot 10^{-6}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-77}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\
\end{array}
\end{array}
if z < -5.6999999999999996e-6Initial program 41.6%
Taylor expanded in z around inf 77.7%
if -5.6999999999999996e-6 < z < 1.14999999999999999e-77Initial program 89.4%
Taylor expanded in b around inf 88.3%
Taylor expanded in b around 0 68.9%
if 1.14999999999999999e-77 < z Initial program 49.9%
Taylor expanded in z around -inf 67.6%
associate--l+67.6%
mul-1-neg67.6%
distribute-lft-out--67.6%
associate-/l*70.1%
associate-/l*83.7%
Simplified83.7%
Taylor expanded in y around inf 73.3%
Taylor expanded in x around 0 65.1%
Final simplification70.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -0.00037)
(/ (- t a) (- b y))
(if (<= z 0.00012)
(+ x (* z (+ x (/ (- t a) y))))
(- (/ t (- b y)) (/ a (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.00037) {
tmp = (t - a) / (b - y);
} else if (z <= 0.00012) {
tmp = x + (z * (x + ((t - a) / y)));
} else {
tmp = (t / (b - y)) - (a / (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 <= (-0.00037d0)) then
tmp = (t - a) / (b - y)
else if (z <= 0.00012d0) then
tmp = x + (z * (x + ((t - a) / y)))
else
tmp = (t / (b - y)) - (a / (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 <= -0.00037) {
tmp = (t - a) / (b - y);
} else if (z <= 0.00012) {
tmp = x + (z * (x + ((t - a) / y)));
} else {
tmp = (t / (b - y)) - (a / (b - y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.00037: tmp = (t - a) / (b - y) elif z <= 0.00012: tmp = x + (z * (x + ((t - a) / y))) else: tmp = (t / (b - y)) - (a / (b - y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.00037) tmp = Float64(Float64(t - a) / Float64(b - y)); elseif (z <= 0.00012) tmp = Float64(x + Float64(z * Float64(x + Float64(Float64(t - a) / y)))); else tmp = Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.00037) tmp = (t - a) / (b - y); elseif (z <= 0.00012) tmp = x + (z * (x + ((t - a) / y))); else tmp = (t / (b - y)) - (a / (b - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.00037], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.00012], N[(x + N[(z * N[(x + N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00037:\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{elif}\;z \leq 0.00012:\\
\;\;\;\;x + z \cdot \left(x + \frac{t - a}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\
\end{array}
\end{array}
if z < -3.6999999999999999e-4Initial program 41.6%
Taylor expanded in z around inf 77.7%
if -3.6999999999999999e-4 < z < 1.20000000000000003e-4Initial program 89.0%
Taylor expanded in y around -inf 56.0%
+-commutative56.0%
mul-1-neg56.0%
unsub-neg56.0%
Simplified69.0%
Taylor expanded in b around 0 76.1%
times-frac71.9%
sub-neg71.9%
metadata-eval71.9%
Simplified71.9%
Taylor expanded in z around 0 70.2%
if 1.20000000000000003e-4 < z Initial program 42.2%
Taylor expanded in z around -inf 70.4%
associate--l+70.4%
mul-1-neg70.4%
distribute-lft-out--70.4%
associate-/l*73.5%
associate-/l*90.0%
Simplified90.0%
Taylor expanded in y around inf 85.3%
Taylor expanded in x around 0 70.4%
Final simplification72.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -7e+125)
t_1
(if (<= z -4e+54)
(- (/ x z))
(if (or (<= z -7.5e-6) (not (<= z 1.12e-94))) t_1 (* x (+ z 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -7e+125) {
tmp = t_1;
} else if (z <= -4e+54) {
tmp = -(x / z);
} else if ((z <= -7.5e-6) || !(z <= 1.12e-94)) {
tmp = t_1;
} else {
tmp = x * (z + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t / (b - y)
if (z <= (-7d+125)) then
tmp = t_1
else if (z <= (-4d+54)) then
tmp = -(x / z)
else if ((z <= (-7.5d-6)) .or. (.not. (z <= 1.12d-94))) then
tmp = t_1
else
tmp = x * (z + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -7e+125) {
tmp = t_1;
} else if (z <= -4e+54) {
tmp = -(x / z);
} else if ((z <= -7.5e-6) || !(z <= 1.12e-94)) {
tmp = t_1;
} else {
tmp = x * (z + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -7e+125: tmp = t_1 elif z <= -4e+54: tmp = -(x / z) elif (z <= -7.5e-6) or not (z <= 1.12e-94): tmp = t_1 else: tmp = x * (z + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -7e+125) tmp = t_1; elseif (z <= -4e+54) tmp = Float64(-Float64(x / z)); elseif ((z <= -7.5e-6) || !(z <= 1.12e-94)) tmp = t_1; else tmp = Float64(x * Float64(z + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -7e+125) tmp = t_1; elseif (z <= -4e+54) tmp = -(x / z); elseif ((z <= -7.5e-6) || ~((z <= 1.12e-94))) tmp = t_1; else tmp = x * (z + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7e+125], t$95$1, If[LessEqual[z, -4e+54], (-N[(x / z), $MachinePrecision]), If[Or[LessEqual[z, -7.5e-6], N[Not[LessEqual[z, 1.12e-94]], $MachinePrecision]], t$95$1, N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -7 \cdot 10^{+125}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4 \cdot 10^{+54}:\\
\;\;\;\;-\frac{x}{z}\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-6} \lor \neg \left(z \leq 1.12 \cdot 10^{-94}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\end{array}
\end{array}
if z < -7.00000000000000023e125 or -4.0000000000000003e54 < z < -7.50000000000000019e-6 or 1.12e-94 < z Initial program 48.0%
Taylor expanded in z around inf 72.1%
Taylor expanded in t around inf 40.2%
if -7.00000000000000023e125 < z < -4.0000000000000003e54Initial program 37.0%
Taylor expanded in y around inf 52.2%
+-commutative52.2%
mul-1-neg52.2%
unsub-neg52.2%
Simplified52.2%
Taylor expanded in z around inf 52.2%
associate-*r/52.2%
mul-1-neg52.2%
Simplified52.2%
if -7.50000000000000019e-6 < z < 1.12e-94Initial program 89.1%
Taylor expanded in y around inf 48.8%
+-commutative48.8%
mul-1-neg48.8%
unsub-neg48.8%
Simplified48.8%
div-inv48.8%
Applied egg-rr48.8%
Taylor expanded in z around 0 48.6%
+-commutative48.6%
Simplified48.6%
Final simplification44.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.85e+133)
(- (/ a b))
(if (<= z -3e+53)
(- (/ x z))
(if (<= z -0.0033) (/ t b) (if (<= z 1.2e-94) (* x (+ z 1.0)) (/ t b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.85e+133) {
tmp = -(a / b);
} else if (z <= -3e+53) {
tmp = -(x / z);
} else if (z <= -0.0033) {
tmp = t / b;
} else if (z <= 1.2e-94) {
tmp = x * (z + 1.0);
} 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 <= (-2.85d+133)) then
tmp = -(a / b)
else if (z <= (-3d+53)) then
tmp = -(x / z)
else if (z <= (-0.0033d0)) then
tmp = t / b
else if (z <= 1.2d-94) then
tmp = x * (z + 1.0d0)
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 <= -2.85e+133) {
tmp = -(a / b);
} else if (z <= -3e+53) {
tmp = -(x / z);
} else if (z <= -0.0033) {
tmp = t / b;
} else if (z <= 1.2e-94) {
tmp = x * (z + 1.0);
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.85e+133: tmp = -(a / b) elif z <= -3e+53: tmp = -(x / z) elif z <= -0.0033: tmp = t / b elif z <= 1.2e-94: tmp = x * (z + 1.0) else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.85e+133) tmp = Float64(-Float64(a / b)); elseif (z <= -3e+53) tmp = Float64(-Float64(x / z)); elseif (z <= -0.0033) tmp = Float64(t / b); elseif (z <= 1.2e-94) tmp = Float64(x * Float64(z + 1.0)); else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.85e+133) tmp = -(a / b); elseif (z <= -3e+53) tmp = -(x / z); elseif (z <= -0.0033) tmp = t / b; elseif (z <= 1.2e-94) tmp = x * (z + 1.0); else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.85e+133], (-N[(a / b), $MachinePrecision]), If[LessEqual[z, -3e+53], (-N[(x / z), $MachinePrecision]), If[LessEqual[z, -0.0033], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.2e-94], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], N[(t / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.85 \cdot 10^{+133}:\\
\;\;\;\;-\frac{a}{b}\\
\mathbf{elif}\;z \leq -3 \cdot 10^{+53}:\\
\;\;\;\;-\frac{x}{z}\\
\mathbf{elif}\;z \leq -0.0033:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-94}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -2.84999999999999989e133Initial program 34.4%
Taylor expanded in b around inf 25.5%
Taylor expanded in t around 0 11.8%
*-commutative11.8%
mul-1-neg11.8%
unsub-neg11.8%
*-commutative11.8%
Simplified11.8%
Taylor expanded in y around 0 28.2%
associate-*r/28.2%
neg-mul-128.2%
Simplified28.2%
if -2.84999999999999989e133 < z < -2.99999999999999998e53Initial program 30.5%
Taylor expanded in y around inf 47.3%
+-commutative47.3%
mul-1-neg47.3%
unsub-neg47.3%
Simplified47.3%
Taylor expanded in z around inf 47.3%
associate-*r/47.3%
mul-1-neg47.3%
Simplified47.3%
if -2.99999999999999998e53 < z < -0.0033 or 1.2e-94 < z Initial program 56.7%
fma-def56.7%
+-commutative56.7%
fma-def56.7%
Simplified56.7%
Taylor expanded in t around inf 24.5%
Taylor expanded in b around inf 27.1%
if -0.0033 < z < 1.2e-94Initial program 89.1%
Taylor expanded in y around inf 48.8%
+-commutative48.8%
mul-1-neg48.8%
unsub-neg48.8%
Simplified48.8%
div-inv48.8%
Applied egg-rr48.8%
Taylor expanded in z around 0 48.6%
+-commutative48.6%
Simplified48.6%
Final simplification37.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -3.35e+25)
t_1
(if (<= y -9.5e-31)
(/ t (- b y))
(if (<= y -5.5e-131)
(* x (+ z 1.0))
(if (<= y 1.9e+15) (/ (- t a) b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.35e+25) {
tmp = t_1;
} else if (y <= -9.5e-31) {
tmp = t / (b - y);
} else if (y <= -5.5e-131) {
tmp = x * (z + 1.0);
} else if (y <= 1.9e+15) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-3.35d+25)) then
tmp = t_1
else if (y <= (-9.5d-31)) then
tmp = t / (b - y)
else if (y <= (-5.5d-131)) then
tmp = x * (z + 1.0d0)
else if (y <= 1.9d+15) then
tmp = (t - a) / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.35e+25) {
tmp = t_1;
} else if (y <= -9.5e-31) {
tmp = t / (b - y);
} else if (y <= -5.5e-131) {
tmp = x * (z + 1.0);
} else if (y <= 1.9e+15) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -3.35e+25: tmp = t_1 elif y <= -9.5e-31: tmp = t / (b - y) elif y <= -5.5e-131: tmp = x * (z + 1.0) elif y <= 1.9e+15: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -3.35e+25) tmp = t_1; elseif (y <= -9.5e-31) tmp = Float64(t / Float64(b - y)); elseif (y <= -5.5e-131) tmp = Float64(x * Float64(z + 1.0)); elseif (y <= 1.9e+15) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -3.35e+25) tmp = t_1; elseif (y <= -9.5e-31) tmp = t / (b - y); elseif (y <= -5.5e-131) tmp = x * (z + 1.0); elseif (y <= 1.9e+15) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.35e+25], t$95$1, If[LessEqual[y, -9.5e-31], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.5e-131], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+15], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.35 \cdot 10^{+25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{-31}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-131}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+15}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.35000000000000019e25 or 1.9e15 < y Initial program 49.2%
Taylor expanded in y around inf 54.3%
+-commutative54.3%
mul-1-neg54.3%
unsub-neg54.3%
Simplified54.3%
if -3.35000000000000019e25 < y < -9.5000000000000008e-31Initial program 45.0%
Taylor expanded in z around inf 72.6%
Taylor expanded in t around inf 43.0%
if -9.5000000000000008e-31 < y < -5.4999999999999997e-131Initial program 86.5%
Taylor expanded in y around inf 35.5%
+-commutative35.5%
mul-1-neg35.5%
unsub-neg35.5%
Simplified35.5%
div-inv35.5%
Applied egg-rr35.5%
Taylor expanded in z around 0 35.9%
+-commutative35.9%
Simplified35.9%
if -5.4999999999999997e-131 < y < 1.9e15Initial program 80.0%
Taylor expanded in y around 0 56.5%
Final simplification53.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.1e+133)
(- (/ a b))
(if (<= z -4e+54)
(- (/ x z))
(if (<= z -65.0) (/ t b) (if (<= z 1.6e-96) x (/ t b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.1e+133) {
tmp = -(a / b);
} else if (z <= -4e+54) {
tmp = -(x / z);
} else if (z <= -65.0) {
tmp = t / b;
} else if (z <= 1.6e-96) {
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 <= (-3.1d+133)) then
tmp = -(a / b)
else if (z <= (-4d+54)) then
tmp = -(x / z)
else if (z <= (-65.0d0)) then
tmp = t / b
else if (z <= 1.6d-96) 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 <= -3.1e+133) {
tmp = -(a / b);
} else if (z <= -4e+54) {
tmp = -(x / z);
} else if (z <= -65.0) {
tmp = t / b;
} else if (z <= 1.6e-96) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.1e+133: tmp = -(a / b) elif z <= -4e+54: tmp = -(x / z) elif z <= -65.0: tmp = t / b elif z <= 1.6e-96: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.1e+133) tmp = Float64(-Float64(a / b)); elseif (z <= -4e+54) tmp = Float64(-Float64(x / z)); elseif (z <= -65.0) tmp = Float64(t / b); elseif (z <= 1.6e-96) 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 <= -3.1e+133) tmp = -(a / b); elseif (z <= -4e+54) tmp = -(x / z); elseif (z <= -65.0) tmp = t / b; elseif (z <= 1.6e-96) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.1e+133], (-N[(a / b), $MachinePrecision]), If[LessEqual[z, -4e+54], (-N[(x / z), $MachinePrecision]), If[LessEqual[z, -65.0], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.6e-96], x, N[(t / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+133}:\\
\;\;\;\;-\frac{a}{b}\\
\mathbf{elif}\;z \leq -4 \cdot 10^{+54}:\\
\;\;\;\;-\frac{x}{z}\\
\mathbf{elif}\;z \leq -65:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-96}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -3.1e133Initial program 34.4%
Taylor expanded in b around inf 25.5%
Taylor expanded in t around 0 11.8%
*-commutative11.8%
mul-1-neg11.8%
unsub-neg11.8%
*-commutative11.8%
Simplified11.8%
Taylor expanded in y around 0 28.2%
associate-*r/28.2%
neg-mul-128.2%
Simplified28.2%
if -3.1e133 < z < -4.0000000000000003e54Initial program 30.5%
Taylor expanded in y around inf 47.3%
+-commutative47.3%
mul-1-neg47.3%
unsub-neg47.3%
Simplified47.3%
Taylor expanded in z around inf 47.3%
associate-*r/47.3%
mul-1-neg47.3%
Simplified47.3%
if -4.0000000000000003e54 < z < -65 or 1.60000000000000006e-96 < z Initial program 56.2%
fma-def56.2%
+-commutative56.2%
fma-def56.2%
Simplified56.2%
Taylor expanded in t around inf 24.8%
Taylor expanded in b around inf 27.4%
if -65 < z < 1.60000000000000006e-96Initial program 89.2%
Taylor expanded in z around 0 47.2%
Final simplification37.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.6e-6) (not (<= z 2.1e-98))) (/ (- t a) (- b y)) (* x (/ 1.0 (- 1.0 z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.6e-6) || !(z <= 2.1e-98)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * (1.0 / (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 <= (-4.6d-6)) .or. (.not. (z <= 2.1d-98))) then
tmp = (t - a) / (b - y)
else
tmp = x * (1.0d0 / (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 <= -4.6e-6) || !(z <= 2.1e-98)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * (1.0 / (1.0 - z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.6e-6) or not (z <= 2.1e-98): tmp = (t - a) / (b - y) else: tmp = x * (1.0 / (1.0 - z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.6e-6) || !(z <= 2.1e-98)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x * Float64(1.0 / Float64(1.0 - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.6e-6) || ~((z <= 2.1e-98))) tmp = (t - a) / (b - y); else tmp = x * (1.0 / (1.0 - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.6e-6], N[Not[LessEqual[z, 2.1e-98]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{-6} \lor \neg \left(z \leq 2.1 \cdot 10^{-98}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{1 - z}\\
\end{array}
\end{array}
if z < -4.6e-6 or 2.09999999999999992e-98 < z Initial program 46.8%
Taylor expanded in z around inf 70.1%
if -4.6e-6 < z < 2.09999999999999992e-98Initial program 89.1%
Taylor expanded in y around inf 48.8%
+-commutative48.8%
mul-1-neg48.8%
unsub-neg48.8%
Simplified48.8%
div-inv48.8%
Applied egg-rr48.8%
Final simplification61.3%
(FPCore (x y z t a b) :precision binary64 (if (<= z -70.0) (/ t b) (if (<= z 1.4e-95) x (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -70.0) {
tmp = t / b;
} else if (z <= 1.4e-95) {
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 <= (-70.0d0)) then
tmp = t / b
else if (z <= 1.4d-95) 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 <= -70.0) {
tmp = t / b;
} else if (z <= 1.4e-95) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -70.0: tmp = t / b elif z <= 1.4e-95: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -70.0) tmp = Float64(t / b); elseif (z <= 1.4e-95) 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 <= -70.0) tmp = t / b; elseif (z <= 1.4e-95) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -70.0], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.4e-95], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -70:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-95}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -70 or 1.4e-95 < z Initial program 46.4%
fma-def46.4%
+-commutative46.4%
fma-def46.5%
Simplified46.5%
Taylor expanded in t around inf 21.3%
Taylor expanded in b around inf 25.6%
if -70 < z < 1.4e-95Initial program 89.2%
Taylor expanded in z around 0 47.2%
Final simplification34.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 64.3%
Taylor expanded in z around 0 22.7%
Final simplification22.7%
(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 2023174
(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)))))