
(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 16 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 (/ (- t a) (- b y))))
(if (<= z -1e+44)
(- t_1 (/ x z))
(if (<= z -3.05e-238)
(/ (+ (* x y) (* z (- t a))) (+ (* y (- 1.0 z)) (* z b)))
(if (<= z 6.7e-9)
(- x (/ (* z (- a t)) (+ y (* z (- b y)))))
(+
t_1
(/
(+ (/ y (/ (- b y) x)) (/ (- a t) (/ (pow (- b y) 2.0) y)))
z)))))))
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 <= -1e+44) {
tmp = t_1 - (x / z);
} else if (z <= -3.05e-238) {
tmp = ((x * y) + (z * (t - a))) / ((y * (1.0 - z)) + (z * b));
} else if (z <= 6.7e-9) {
tmp = x - ((z * (a - t)) / (y + (z * (b - y))));
} else {
tmp = t_1 + (((y / ((b - y) / x)) + ((a - t) / (pow((b - y), 2.0) / y))) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-1d+44)) then
tmp = t_1 - (x / z)
else if (z <= (-3.05d-238)) then
tmp = ((x * y) + (z * (t - a))) / ((y * (1.0d0 - z)) + (z * b))
else if (z <= 6.7d-9) then
tmp = x - ((z * (a - t)) / (y + (z * (b - y))))
else
tmp = t_1 + (((y / ((b - y) / x)) + ((a - t) / (((b - y) ** 2.0d0) / y))) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1e+44) {
tmp = t_1 - (x / z);
} else if (z <= -3.05e-238) {
tmp = ((x * y) + (z * (t - a))) / ((y * (1.0 - z)) + (z * b));
} else if (z <= 6.7e-9) {
tmp = x - ((z * (a - t)) / (y + (z * (b - y))));
} else {
tmp = t_1 + (((y / ((b - y) / x)) + ((a - t) / (Math.pow((b - y), 2.0) / y))) / z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1e+44: tmp = t_1 - (x / z) elif z <= -3.05e-238: tmp = ((x * y) + (z * (t - a))) / ((y * (1.0 - z)) + (z * b)) elif z <= 6.7e-9: tmp = x - ((z * (a - t)) / (y + (z * (b - y)))) else: tmp = t_1 + (((y / ((b - y) / x)) + ((a - t) / (math.pow((b - y), 2.0) / y))) / z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1e+44) tmp = Float64(t_1 - Float64(x / z)); elseif (z <= -3.05e-238) tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(Float64(y * Float64(1.0 - z)) + Float64(z * b))); elseif (z <= 6.7e-9) tmp = Float64(x - Float64(Float64(z * Float64(a - t)) / Float64(y + Float64(z * Float64(b - y))))); else tmp = Float64(t_1 + Float64(Float64(Float64(y / Float64(Float64(b - y) / x)) + Float64(Float64(a - t) / Float64((Float64(b - y) ^ 2.0) / y))) / z)); 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 <= -1e+44) tmp = t_1 - (x / z); elseif (z <= -3.05e-238) tmp = ((x * y) + (z * (t - a))) / ((y * (1.0 - z)) + (z * b)); elseif (z <= 6.7e-9) tmp = x - ((z * (a - t)) / (y + (z * (b - y)))); else tmp = t_1 + (((y / ((b - y) / x)) + ((a - t) / (((b - y) ^ 2.0) / y))) / z); 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, -1e+44], N[(t$95$1 - N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.05e-238], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.7e-9], N[(x - N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(N[(y / N[(N[(b - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(a - t), $MachinePrecision] / N[(N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1 \cdot 10^{+44}:\\
\;\;\;\;t_1 - \frac{x}{z}\\
\mathbf{elif}\;z \leq -3.05 \cdot 10^{-238}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y \cdot \left(1 - z\right) + z \cdot b}\\
\mathbf{elif}\;z \leq 6.7 \cdot 10^{-9}:\\
\;\;\;\;x - \frac{z \cdot \left(a - t\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{\frac{y}{\frac{b - y}{x}} + \frac{a - t}{\frac{{\left(b - y\right)}^{2}}{y}}}{z}\\
\end{array}
\end{array}
if z < -1.0000000000000001e44Initial program 47.7%
Taylor expanded in z around -inf 62.8%
+-commutative62.8%
associate--l+62.8%
Simplified83.9%
Taylor expanded in x around inf 79.3%
Taylor expanded in y around inf 89.3%
associate-*r/89.3%
neg-mul-189.3%
Simplified89.3%
if -1.0000000000000001e44 < z < -3.05e-238Initial program 94.9%
Taylor expanded in y around 0 94.9%
if -3.05e-238 < z < 6.69999999999999961e-9Initial program 79.6%
Taylor expanded in x around inf 79.6%
Taylor expanded in z around 0 90.9%
if 6.69999999999999961e-9 < z Initial program 44.7%
Taylor expanded in z around -inf 60.9%
+-commutative60.9%
associate--l+60.9%
Simplified94.1%
Final simplification92.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (- (/ (- t a) (- b y)) (/ x z)))
(t_3 (* z (- t a))))
(if (<= z -1.3e+49)
t_2
(if (<= z 1.36e-263)
(/ (+ (* x y) t_3) (+ (* y (- 1.0 z)) (* z b)))
(if (<= z 3.35e+50) (+ (/ t_3 t_1) (/ y (/ t_1 x))) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((t - a) / (b - y)) - (x / z);
double t_3 = z * (t - a);
double tmp;
if (z <= -1.3e+49) {
tmp = t_2;
} else if (z <= 1.36e-263) {
tmp = ((x * y) + t_3) / ((y * (1.0 - z)) + (z * b));
} else if (z <= 3.35e+50) {
tmp = (t_3 / t_1) + (y / (t_1 / x));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = ((t - a) / (b - y)) - (x / z)
t_3 = z * (t - a)
if (z <= (-1.3d+49)) then
tmp = t_2
else if (z <= 1.36d-263) then
tmp = ((x * y) + t_3) / ((y * (1.0d0 - z)) + (z * b))
else if (z <= 3.35d+50) then
tmp = (t_3 / t_1) + (y / (t_1 / x))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((t - a) / (b - y)) - (x / z);
double t_3 = z * (t - a);
double tmp;
if (z <= -1.3e+49) {
tmp = t_2;
} else if (z <= 1.36e-263) {
tmp = ((x * y) + t_3) / ((y * (1.0 - z)) + (z * b));
} else if (z <= 3.35e+50) {
tmp = (t_3 / t_1) + (y / (t_1 / x));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = ((t - a) / (b - y)) - (x / z) t_3 = z * (t - a) tmp = 0 if z <= -1.3e+49: tmp = t_2 elif z <= 1.36e-263: tmp = ((x * y) + t_3) / ((y * (1.0 - z)) + (z * b)) elif z <= 3.35e+50: tmp = (t_3 / t_1) + (y / (t_1 / x)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) t_3 = Float64(z * Float64(t - a)) tmp = 0.0 if (z <= -1.3e+49) tmp = t_2; elseif (z <= 1.36e-263) tmp = Float64(Float64(Float64(x * y) + t_3) / Float64(Float64(y * Float64(1.0 - z)) + Float64(z * b))); elseif (z <= 3.35e+50) tmp = Float64(Float64(t_3 / t_1) + Float64(y / Float64(t_1 / x))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = ((t - a) / (b - y)) - (x / z); t_3 = z * (t - a); tmp = 0.0; if (z <= -1.3e+49) tmp = t_2; elseif (z <= 1.36e-263) tmp = ((x * y) + t_3) / ((y * (1.0 - z)) + (z * b)); elseif (z <= 3.35e+50) tmp = (t_3 / t_1) + (y / (t_1 / x)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+49], t$95$2, If[LessEqual[z, 1.36e-263], N[(N[(N[(x * y), $MachinePrecision] + t$95$3), $MachinePrecision] / N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.35e+50], N[(N[(t$95$3 / t$95$1), $MachinePrecision] + N[(y / N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y} - \frac{x}{z}\\
t_3 := z \cdot \left(t - a\right)\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+49}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.36 \cdot 10^{-263}:\\
\;\;\;\;\frac{x \cdot y + t_3}{y \cdot \left(1 - z\right) + z \cdot b}\\
\mathbf{elif}\;z \leq 3.35 \cdot 10^{+50}:\\
\;\;\;\;\frac{t_3}{t_1} + \frac{y}{\frac{t_1}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.29999999999999994e49 or 3.3499999999999999e50 < z Initial program 41.8%
Taylor expanded in z around -inf 62.2%
+-commutative62.2%
associate--l+62.2%
Simplified88.4%
Taylor expanded in x around inf 77.2%
Taylor expanded in y around inf 91.3%
associate-*r/91.3%
neg-mul-191.3%
Simplified91.3%
if -1.29999999999999994e49 < z < 1.3599999999999999e-263Initial program 93.7%
Taylor expanded in y around 0 93.7%
if 1.3599999999999999e-263 < z < 3.3499999999999999e50Initial program 75.5%
Taylor expanded in x around inf 75.5%
Taylor expanded in x around 0 75.5%
associate-/l*87.3%
+-commutative87.3%
*-commutative87.3%
*-commutative87.3%
+-commutative87.3%
fma-def87.3%
Simplified87.3%
Taylor expanded in x around 0 87.3%
Final simplification90.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- t a) (- b y)) (/ x z))) (t_2 (+ y (* z (- b y)))))
(if (<= z -5.8e+42)
t_1
(if (<= z -8e-236)
(/ (+ (* x y) (* z (- t a))) t_2)
(if (<= z 3800000000000.0)
(- x (/ (* z (- a t)) t_2))
(if (<= z 1.65e+61)
(+ (/ t (- b y)) (* (/ x z) (/ y (- b y))))
t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double t_2 = y + (z * (b - y));
double tmp;
if (z <= -5.8e+42) {
tmp = t_1;
} else if (z <= -8e-236) {
tmp = ((x * y) + (z * (t - a))) / t_2;
} else if (z <= 3800000000000.0) {
tmp = x - ((z * (a - t)) / t_2);
} else if (z <= 1.65e+61) {
tmp = (t / (b - y)) + ((x / z) * (y / (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((t - a) / (b - y)) - (x / z)
t_2 = y + (z * (b - y))
if (z <= (-5.8d+42)) then
tmp = t_1
else if (z <= (-8d-236)) then
tmp = ((x * y) + (z * (t - a))) / t_2
else if (z <= 3800000000000.0d0) then
tmp = x - ((z * (a - t)) / t_2)
else if (z <= 1.65d+61) then
tmp = (t / (b - y)) + ((x / z) * (y / (b - y)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double t_2 = y + (z * (b - y));
double tmp;
if (z <= -5.8e+42) {
tmp = t_1;
} else if (z <= -8e-236) {
tmp = ((x * y) + (z * (t - a))) / t_2;
} else if (z <= 3800000000000.0) {
tmp = x - ((z * (a - t)) / t_2);
} else if (z <= 1.65e+61) {
tmp = (t / (b - y)) + ((x / z) * (y / (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t - a) / (b - y)) - (x / z) t_2 = y + (z * (b - y)) tmp = 0 if z <= -5.8e+42: tmp = t_1 elif z <= -8e-236: tmp = ((x * y) + (z * (t - a))) / t_2 elif z <= 3800000000000.0: tmp = x - ((z * (a - t)) / t_2) elif z <= 1.65e+61: tmp = (t / (b - y)) + ((x / z) * (y / (b - y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) t_2 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if (z <= -5.8e+42) tmp = t_1; elseif (z <= -8e-236) tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_2); elseif (z <= 3800000000000.0) tmp = Float64(x - Float64(Float64(z * Float64(a - t)) / t_2)); elseif (z <= 1.65e+61) tmp = Float64(Float64(t / Float64(b - y)) + Float64(Float64(x / z) * Float64(y / Float64(b - y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t - a) / (b - y)) - (x / z); t_2 = y + (z * (b - y)); tmp = 0.0; if (z <= -5.8e+42) tmp = t_1; elseif (z <= -8e-236) tmp = ((x * y) + (z * (t - a))) / t_2; elseif (z <= 3800000000000.0) tmp = x - ((z * (a - t)) / t_2); elseif (z <= 1.65e+61) tmp = (t / (b - y)) + ((x / z) * (y / (b - y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e+42], t$95$1, If[LessEqual[z, -8e-236], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 3800000000000.0], N[(x - N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+61], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\
t_2 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-236}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{t_2}\\
\mathbf{elif}\;z \leq 3800000000000:\\
\;\;\;\;x - \frac{z \cdot \left(a - t\right)}{t_2}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+61}:\\
\;\;\;\;\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.79999999999999961e42 or 1.6499999999999999e61 < z Initial program 41.8%
Taylor expanded in z around -inf 62.2%
+-commutative62.2%
associate--l+62.2%
Simplified88.4%
Taylor expanded in x around inf 77.2%
Taylor expanded in y around inf 91.3%
associate-*r/91.3%
neg-mul-191.3%
Simplified91.3%
if -5.79999999999999961e42 < z < -8.0000000000000004e-236Initial program 94.9%
if -8.0000000000000004e-236 < z < 3.8e12Initial program 78.9%
Taylor expanded in x around inf 78.9%
Taylor expanded in z around 0 89.9%
if 3.8e12 < z < 1.6499999999999999e61Initial program 74.4%
Taylor expanded in z around -inf 60.2%
+-commutative60.2%
associate--l+60.2%
Simplified99.5%
Taylor expanded in x around inf 74.2%
Taylor expanded in a around 0 74.2%
+-commutative74.2%
times-frac95.4%
*-commutative95.4%
Simplified95.4%
Final simplification91.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- t a) (- b y)) (/ x z))) (t_2 (+ y (* z (- b y)))))
(if (<= z -2.4e+46)
t_1
(if (<= z -2.7e-237)
(/ (+ (* x y) (- (* z t) (* z a))) t_2)
(if (<= z 960000000000.0)
(- x (/ (* z (- a t)) t_2))
(if (<= z 1.06e+65)
(+ (/ t (- b y)) (* (/ x z) (/ y (- b y))))
t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double t_2 = y + (z * (b - y));
double tmp;
if (z <= -2.4e+46) {
tmp = t_1;
} else if (z <= -2.7e-237) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_2;
} else if (z <= 960000000000.0) {
tmp = x - ((z * (a - t)) / t_2);
} else if (z <= 1.06e+65) {
tmp = (t / (b - y)) + ((x / z) * (y / (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((t - a) / (b - y)) - (x / z)
t_2 = y + (z * (b - y))
if (z <= (-2.4d+46)) then
tmp = t_1
else if (z <= (-2.7d-237)) then
tmp = ((x * y) + ((z * t) - (z * a))) / t_2
else if (z <= 960000000000.0d0) then
tmp = x - ((z * (a - t)) / t_2)
else if (z <= 1.06d+65) then
tmp = (t / (b - y)) + ((x / z) * (y / (b - y)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double t_2 = y + (z * (b - y));
double tmp;
if (z <= -2.4e+46) {
tmp = t_1;
} else if (z <= -2.7e-237) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_2;
} else if (z <= 960000000000.0) {
tmp = x - ((z * (a - t)) / t_2);
} else if (z <= 1.06e+65) {
tmp = (t / (b - y)) + ((x / z) * (y / (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t - a) / (b - y)) - (x / z) t_2 = y + (z * (b - y)) tmp = 0 if z <= -2.4e+46: tmp = t_1 elif z <= -2.7e-237: tmp = ((x * y) + ((z * t) - (z * a))) / t_2 elif z <= 960000000000.0: tmp = x - ((z * (a - t)) / t_2) elif z <= 1.06e+65: tmp = (t / (b - y)) + ((x / z) * (y / (b - y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) t_2 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if (z <= -2.4e+46) tmp = t_1; elseif (z <= -2.7e-237) tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / t_2); elseif (z <= 960000000000.0) tmp = Float64(x - Float64(Float64(z * Float64(a - t)) / t_2)); elseif (z <= 1.06e+65) tmp = Float64(Float64(t / Float64(b - y)) + Float64(Float64(x / z) * Float64(y / Float64(b - y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t - a) / (b - y)) - (x / z); t_2 = y + (z * (b - y)); tmp = 0.0; if (z <= -2.4e+46) tmp = t_1; elseif (z <= -2.7e-237) tmp = ((x * y) + ((z * t) - (z * a))) / t_2; elseif (z <= 960000000000.0) tmp = x - ((z * (a - t)) / t_2); elseif (z <= 1.06e+65) tmp = (t / (b - y)) + ((x / z) * (y / (b - y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e+46], t$95$1, If[LessEqual[z, -2.7e-237], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 960000000000.0], N[(x - N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.06e+65], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\
t_2 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-237}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_2}\\
\mathbf{elif}\;z \leq 960000000000:\\
\;\;\;\;x - \frac{z \cdot \left(a - t\right)}{t_2}\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{+65}:\\
\;\;\;\;\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.40000000000000008e46 or 1.06e65 < z Initial program 41.8%
Taylor expanded in z around -inf 62.2%
+-commutative62.2%
associate--l+62.2%
Simplified88.4%
Taylor expanded in x around inf 77.2%
Taylor expanded in y around inf 91.3%
associate-*r/91.3%
neg-mul-191.3%
Simplified91.3%
if -2.40000000000000008e46 < z < -2.69999999999999984e-237Initial program 94.9%
sub-neg94.9%
distribute-lft-in94.9%
Applied egg-rr94.9%
if -2.69999999999999984e-237 < z < 9.6e11Initial program 78.9%
Taylor expanded in x around inf 78.9%
Taylor expanded in z around 0 89.9%
if 9.6e11 < z < 1.06e65Initial program 74.4%
Taylor expanded in z around -inf 60.2%
+-commutative60.2%
associate--l+60.2%
Simplified99.5%
Taylor expanded in x around inf 74.2%
Taylor expanded in a around 0 74.2%
+-commutative74.2%
times-frac95.4%
*-commutative95.4%
Simplified95.4%
Final simplification91.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= z -6.2e+50)
t_1
(if (<= z -6.4e-239)
(/ (+ (* x y) (* z (- t a))) (+ (* y (- 1.0 z)) (* z b)))
(if (<= z 960000000000.0)
(- x (/ (* z (- a t)) (+ y (* z (- b y)))))
(if (<= z 1.8e+53)
(+ (/ t (- b y)) (* (/ x z) (/ y (- b y))))
t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -6.2e+50) {
tmp = t_1;
} else if (z <= -6.4e-239) {
tmp = ((x * y) + (z * (t - a))) / ((y * (1.0 - z)) + (z * b));
} else if (z <= 960000000000.0) {
tmp = x - ((z * (a - t)) / (y + (z * (b - y))));
} else if (z <= 1.8e+53) {
tmp = (t / (b - y)) + ((x / z) * (y / (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = ((t - a) / (b - y)) - (x / z)
if (z <= (-6.2d+50)) then
tmp = t_1
else if (z <= (-6.4d-239)) then
tmp = ((x * y) + (z * (t - a))) / ((y * (1.0d0 - z)) + (z * b))
else if (z <= 960000000000.0d0) then
tmp = x - ((z * (a - t)) / (y + (z * (b - y))))
else if (z <= 1.8d+53) then
tmp = (t / (b - y)) + ((x / z) * (y / (b - y)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -6.2e+50) {
tmp = t_1;
} else if (z <= -6.4e-239) {
tmp = ((x * y) + (z * (t - a))) / ((y * (1.0 - z)) + (z * b));
} else if (z <= 960000000000.0) {
tmp = x - ((z * (a - t)) / (y + (z * (b - y))));
} else if (z <= 1.8e+53) {
tmp = (t / (b - y)) + ((x / z) * (y / (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t - a) / (b - y)) - (x / z) tmp = 0 if z <= -6.2e+50: tmp = t_1 elif z <= -6.4e-239: tmp = ((x * y) + (z * (t - a))) / ((y * (1.0 - z)) + (z * b)) elif z <= 960000000000.0: tmp = x - ((z * (a - t)) / (y + (z * (b - y)))) elif z <= 1.8e+53: tmp = (t / (b - y)) + ((x / z) * (y / (b - y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (z <= -6.2e+50) tmp = t_1; elseif (z <= -6.4e-239) tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(Float64(y * Float64(1.0 - z)) + Float64(z * b))); elseif (z <= 960000000000.0) tmp = Float64(x - Float64(Float64(z * Float64(a - t)) / Float64(y + Float64(z * Float64(b - y))))); elseif (z <= 1.8e+53) tmp = Float64(Float64(t / Float64(b - y)) + Float64(Float64(x / z) * Float64(y / Float64(b - y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t - a) / (b - y)) - (x / z); tmp = 0.0; if (z <= -6.2e+50) tmp = t_1; elseif (z <= -6.4e-239) tmp = ((x * y) + (z * (t - a))) / ((y * (1.0 - z)) + (z * b)); elseif (z <= 960000000000.0) tmp = x - ((z * (a - t)) / (y + (z * (b - y)))); elseif (z <= 1.8e+53) tmp = (t / (b - y)) + ((x / z) * (y / (b - y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e+50], t$95$1, If[LessEqual[z, -6.4e-239], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 960000000000.0], N[(x - N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+53], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+50}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-239}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y \cdot \left(1 - z\right) + z \cdot b}\\
\mathbf{elif}\;z \leq 960000000000:\\
\;\;\;\;x - \frac{z \cdot \left(a - t\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+53}:\\
\;\;\;\;\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.20000000000000006e50 or 1.8e53 < z Initial program 41.8%
Taylor expanded in z around -inf 62.2%
+-commutative62.2%
associate--l+62.2%
Simplified88.4%
Taylor expanded in x around inf 77.2%
Taylor expanded in y around inf 91.3%
associate-*r/91.3%
neg-mul-191.3%
Simplified91.3%
if -6.20000000000000006e50 < z < -6.3999999999999998e-239Initial program 94.9%
Taylor expanded in y around 0 94.9%
if -6.3999999999999998e-239 < z < 9.6e11Initial program 78.9%
Taylor expanded in x around inf 78.9%
Taylor expanded in z around 0 89.9%
if 9.6e11 < z < 1.8e53Initial program 74.4%
Taylor expanded in z around -inf 60.2%
+-commutative60.2%
associate--l+60.2%
Simplified99.5%
Taylor expanded in x around inf 74.2%
Taylor expanded in a around 0 74.2%
+-commutative74.2%
times-frac95.4%
*-commutative95.4%
Simplified95.4%
Final simplification91.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= z -8e-22)
t_1
(if (<= z 2.25e-23)
(+ x (/ (- t a) (/ y z)))
(if (<= z 5.8e+53) (+ (/ t (- b y)) (* (/ x z) (/ y (- b y)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -8e-22) {
tmp = t_1;
} else if (z <= 2.25e-23) {
tmp = x + ((t - a) / (y / z));
} else if (z <= 5.8e+53) {
tmp = (t / (b - y)) + ((x / z) * (y / (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = ((t - a) / (b - y)) - (x / z)
if (z <= (-8d-22)) then
tmp = t_1
else if (z <= 2.25d-23) then
tmp = x + ((t - a) / (y / z))
else if (z <= 5.8d+53) then
tmp = (t / (b - y)) + ((x / z) * (y / (b - y)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -8e-22) {
tmp = t_1;
} else if (z <= 2.25e-23) {
tmp = x + ((t - a) / (y / z));
} else if (z <= 5.8e+53) {
tmp = (t / (b - y)) + ((x / z) * (y / (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t - a) / (b - y)) - (x / z) tmp = 0 if z <= -8e-22: tmp = t_1 elif z <= 2.25e-23: tmp = x + ((t - a) / (y / z)) elif z <= 5.8e+53: tmp = (t / (b - y)) + ((x / z) * (y / (b - y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (z <= -8e-22) tmp = t_1; elseif (z <= 2.25e-23) tmp = Float64(x + Float64(Float64(t - a) / Float64(y / z))); elseif (z <= 5.8e+53) tmp = Float64(Float64(t / Float64(b - y)) + Float64(Float64(x / z) * Float64(y / Float64(b - y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t - a) / (b - y)) - (x / z); tmp = 0.0; if (z <= -8e-22) tmp = t_1; elseif (z <= 2.25e-23) tmp = x + ((t - a) / (y / z)); elseif (z <= 5.8e+53) tmp = (t / (b - y)) + ((x / z) * (y / (b - y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e-22], t$95$1, If[LessEqual[z, 2.25e-23], N[(x + N[(N[(t - a), $MachinePrecision] / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+53], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -8 \cdot 10^{-22}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-23}:\\
\;\;\;\;x + \frac{t - a}{\frac{y}{z}}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+53}:\\
\;\;\;\;\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -8.0000000000000004e-22 or 5.8000000000000004e53 < z Initial program 44.7%
Taylor expanded in z around -inf 62.0%
+-commutative62.0%
associate--l+62.0%
Simplified87.3%
Taylor expanded in x around inf 76.9%
Taylor expanded in y around inf 88.3%
associate-*r/88.3%
neg-mul-188.3%
Simplified88.3%
if -8.0000000000000004e-22 < z < 2.24999999999999987e-23Initial program 86.0%
Taylor expanded in x around inf 86.0%
Taylor expanded in z around 0 63.8%
associate-/l*60.9%
Simplified60.9%
Taylor expanded in z around 0 71.1%
if 2.24999999999999987e-23 < z < 5.8000000000000004e53Initial program 73.4%
Taylor expanded in z around -inf 56.0%
+-commutative56.0%
associate--l+56.0%
Simplified89.8%
Taylor expanded in x around inf 73.2%
Taylor expanded in a around 0 67.8%
+-commutative67.8%
times-frac86.5%
*-commutative86.5%
Simplified86.5%
Final simplification79.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= z -10500000000000.0)
t_1
(if (<= z 4100000000000.0)
(- x (/ (* z (- a t)) (+ y (* z (- b y)))))
(if (<= z 3.3e+63) (+ (/ t (- b y)) (* (/ x z) (/ y (- b y)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -10500000000000.0) {
tmp = t_1;
} else if (z <= 4100000000000.0) {
tmp = x - ((z * (a - t)) / (y + (z * (b - y))));
} else if (z <= 3.3e+63) {
tmp = (t / (b - y)) + ((x / z) * (y / (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = ((t - a) / (b - y)) - (x / z)
if (z <= (-10500000000000.0d0)) then
tmp = t_1
else if (z <= 4100000000000.0d0) then
tmp = x - ((z * (a - t)) / (y + (z * (b - y))))
else if (z <= 3.3d+63) then
tmp = (t / (b - y)) + ((x / z) * (y / (b - y)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -10500000000000.0) {
tmp = t_1;
} else if (z <= 4100000000000.0) {
tmp = x - ((z * (a - t)) / (y + (z * (b - y))));
} else if (z <= 3.3e+63) {
tmp = (t / (b - y)) + ((x / z) * (y / (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t - a) / (b - y)) - (x / z) tmp = 0 if z <= -10500000000000.0: tmp = t_1 elif z <= 4100000000000.0: tmp = x - ((z * (a - t)) / (y + (z * (b - y)))) elif z <= 3.3e+63: tmp = (t / (b - y)) + ((x / z) * (y / (b - y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (z <= -10500000000000.0) tmp = t_1; elseif (z <= 4100000000000.0) tmp = Float64(x - Float64(Float64(z * Float64(a - t)) / Float64(y + Float64(z * Float64(b - y))))); elseif (z <= 3.3e+63) tmp = Float64(Float64(t / Float64(b - y)) + Float64(Float64(x / z) * Float64(y / Float64(b - y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t - a) / (b - y)) - (x / z); tmp = 0.0; if (z <= -10500000000000.0) tmp = t_1; elseif (z <= 4100000000000.0) tmp = x - ((z * (a - t)) / (y + (z * (b - y)))); elseif (z <= 3.3e+63) tmp = (t / (b - y)) + ((x / z) * (y / (b - y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -10500000000000.0], t$95$1, If[LessEqual[z, 4100000000000.0], N[(x - N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e+63], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -10500000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4100000000000:\\
\;\;\;\;x - \frac{z \cdot \left(a - t\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+63}:\\
\;\;\;\;\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.05e13 or 3.3000000000000002e63 < z Initial program 42.6%
Taylor expanded in z around -inf 62.4%
+-commutative62.4%
associate--l+62.4%
Simplified88.7%
Taylor expanded in x around inf 76.9%
Taylor expanded in y around inf 89.7%
associate-*r/89.7%
neg-mul-189.7%
Simplified89.7%
if -1.05e13 < z < 4.1e12Initial program 86.0%
Taylor expanded in x around inf 86.0%
Taylor expanded in z around 0 84.9%
if 4.1e12 < z < 3.3000000000000002e63Initial program 74.4%
Taylor expanded in z around -inf 60.2%
+-commutative60.2%
associate--l+60.2%
Simplified99.5%
Taylor expanded in x around inf 74.2%
Taylor expanded in a around 0 74.2%
+-commutative74.2%
times-frac95.4%
*-commutative95.4%
Simplified95.4%
Final simplification87.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.2e+252)
x
(if (<= y -1.9e+58)
(/ (- x) z)
(if (<= y -3.6e-30)
x
(if (<= y -1.02e-281)
(/ t b)
(if (<= y 5.9e-285) (/ (- a) b) (if (<= y 9e-18) (/ t b) x)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.2e+252) {
tmp = x;
} else if (y <= -1.9e+58) {
tmp = -x / z;
} else if (y <= -3.6e-30) {
tmp = x;
} else if (y <= -1.02e-281) {
tmp = t / b;
} else if (y <= 5.9e-285) {
tmp = -a / b;
} else if (y <= 9e-18) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.2d+252)) then
tmp = x
else if (y <= (-1.9d+58)) then
tmp = -x / z
else if (y <= (-3.6d-30)) then
tmp = x
else if (y <= (-1.02d-281)) then
tmp = t / b
else if (y <= 5.9d-285) then
tmp = -a / b
else if (y <= 9d-18) then
tmp = t / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.2e+252) {
tmp = x;
} else if (y <= -1.9e+58) {
tmp = -x / z;
} else if (y <= -3.6e-30) {
tmp = x;
} else if (y <= -1.02e-281) {
tmp = t / b;
} else if (y <= 5.9e-285) {
tmp = -a / b;
} else if (y <= 9e-18) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.2e+252: tmp = x elif y <= -1.9e+58: tmp = -x / z elif y <= -3.6e-30: tmp = x elif y <= -1.02e-281: tmp = t / b elif y <= 5.9e-285: tmp = -a / b elif y <= 9e-18: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.2e+252) tmp = x; elseif (y <= -1.9e+58) tmp = Float64(Float64(-x) / z); elseif (y <= -3.6e-30) tmp = x; elseif (y <= -1.02e-281) tmp = Float64(t / b); elseif (y <= 5.9e-285) tmp = Float64(Float64(-a) / b); elseif (y <= 9e-18) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.2e+252) tmp = x; elseif (y <= -1.9e+58) tmp = -x / z; elseif (y <= -3.6e-30) tmp = x; elseif (y <= -1.02e-281) tmp = t / b; elseif (y <= 5.9e-285) tmp = -a / b; elseif (y <= 9e-18) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.2e+252], x, If[LessEqual[y, -1.9e+58], N[((-x) / z), $MachinePrecision], If[LessEqual[y, -3.6e-30], x, If[LessEqual[y, -1.02e-281], N[(t / b), $MachinePrecision], If[LessEqual[y, 5.9e-285], N[((-a) / b), $MachinePrecision], If[LessEqual[y, 9e-18], N[(t / b), $MachinePrecision], x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+252}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{+58}:\\
\;\;\;\;\frac{-x}{z}\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-30}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{-281}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq 5.9 \cdot 10^{-285}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-18}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.2e252 or -1.8999999999999999e58 < y < -3.6000000000000003e-30 or 8.99999999999999987e-18 < y Initial program 57.0%
Taylor expanded in z around 0 49.5%
if -1.2e252 < y < -1.8999999999999999e58Initial program 46.7%
Taylor expanded in y around inf 43.8%
+-commutative43.8%
mul-1-neg43.8%
unsub-neg43.8%
Simplified43.8%
Taylor expanded in z around inf 33.8%
associate-*r/33.8%
mul-1-neg33.8%
Simplified33.8%
if -3.6000000000000003e-30 < y < -1.01999999999999996e-281 or 5.89999999999999963e-285 < y < 8.99999999999999987e-18Initial program 83.5%
Taylor expanded in x around inf 83.5%
Taylor expanded in y around 0 62.5%
Taylor expanded in t around inf 47.3%
if -1.01999999999999996e-281 < y < 5.89999999999999963e-285Initial program 83.1%
Taylor expanded in a around inf 50.6%
mul-1-neg50.6%
distribute-lft-neg-out50.6%
*-commutative50.6%
Simplified50.6%
Taylor expanded in y around 0 67.5%
associate-*r/67.5%
neg-mul-167.5%
Simplified67.5%
Final simplification47.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -8e-22) (not (<= z 2.7e-23))) (- (/ (- t a) (- b y)) (/ x z)) (+ x (/ (- t a) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8e-22) || !(z <= 2.7e-23)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = x + ((t - a) / (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-8d-22)) .or. (.not. (z <= 2.7d-23))) then
tmp = ((t - a) / (b - y)) - (x / z)
else
tmp = x + ((t - a) / (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8e-22) || !(z <= 2.7e-23)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = x + ((t - a) / (y / z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -8e-22) or not (z <= 2.7e-23): tmp = ((t - a) / (b - y)) - (x / z) else: tmp = x + ((t - a) / (y / z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -8e-22) || !(z <= 2.7e-23)) tmp = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)); else tmp = Float64(x + Float64(Float64(t - a) / Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -8e-22) || ~((z <= 2.7e-23))) tmp = ((t - a) / (b - y)) - (x / z); else tmp = x + ((t - a) / (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -8e-22], N[Not[LessEqual[z, 2.7e-23]], $MachinePrecision]], N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - a), $MachinePrecision] / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-22} \lor \neg \left(z \leq 2.7 \cdot 10^{-23}\right):\\
\;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - a}{\frac{y}{z}}\\
\end{array}
\end{array}
if z < -8.0000000000000004e-22 or 2.69999999999999985e-23 < z Initial program 48.7%
Taylor expanded in z around -inf 61.1%
+-commutative61.1%
associate--l+61.1%
Simplified87.6%
Taylor expanded in x around inf 76.3%
Taylor expanded in y around inf 84.7%
associate-*r/84.7%
neg-mul-184.7%
Simplified84.7%
if -8.0000000000000004e-22 < z < 2.69999999999999985e-23Initial program 86.0%
Taylor expanded in x around inf 86.0%
Taylor expanded in z around 0 63.8%
associate-/l*60.9%
Simplified60.9%
Taylor expanded in z around 0 71.1%
Final simplification77.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -8.2e-32)
t_1
(if (<= y -5.2e-280)
(/ t b)
(if (<= y 5.8e-287) (/ (- a) b) (if (<= y 2.25e-20) (/ t 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 <= -8.2e-32) {
tmp = t_1;
} else if (y <= -5.2e-280) {
tmp = t / b;
} else if (y <= 5.8e-287) {
tmp = -a / b;
} else if (y <= 2.25e-20) {
tmp = t / 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 <= (-8.2d-32)) then
tmp = t_1
else if (y <= (-5.2d-280)) then
tmp = t / b
else if (y <= 5.8d-287) then
tmp = -a / b
else if (y <= 2.25d-20) then
tmp = t / 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 <= -8.2e-32) {
tmp = t_1;
} else if (y <= -5.2e-280) {
tmp = t / b;
} else if (y <= 5.8e-287) {
tmp = -a / b;
} else if (y <= 2.25e-20) {
tmp = t / 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 <= -8.2e-32: tmp = t_1 elif y <= -5.2e-280: tmp = t / b elif y <= 5.8e-287: tmp = -a / b elif y <= 2.25e-20: tmp = t / 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 <= -8.2e-32) tmp = t_1; elseif (y <= -5.2e-280) tmp = Float64(t / b); elseif (y <= 5.8e-287) tmp = Float64(Float64(-a) / b); elseif (y <= 2.25e-20) tmp = Float64(t / 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 <= -8.2e-32) tmp = t_1; elseif (y <= -5.2e-280) tmp = t / b; elseif (y <= 5.8e-287) tmp = -a / b; elseif (y <= 2.25e-20) tmp = t / 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, -8.2e-32], t$95$1, If[LessEqual[y, -5.2e-280], N[(t / b), $MachinePrecision], If[LessEqual[y, 5.8e-287], N[((-a) / b), $MachinePrecision], If[LessEqual[y, 2.25e-20], N[(t / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{-32}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-280}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-287}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{-20}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -8.1999999999999995e-32 or 2.2500000000000001e-20 < y Initial program 54.9%
Taylor expanded in y around inf 57.1%
+-commutative57.1%
mul-1-neg57.1%
unsub-neg57.1%
Simplified57.1%
if -8.1999999999999995e-32 < y < -5.2e-280 or 5.7999999999999996e-287 < y < 2.2500000000000001e-20Initial program 83.5%
Taylor expanded in x around inf 83.5%
Taylor expanded in y around 0 62.5%
Taylor expanded in t around inf 47.3%
if -5.2e-280 < y < 5.7999999999999996e-287Initial program 83.1%
Taylor expanded in a around inf 50.6%
mul-1-neg50.6%
distribute-lft-neg-out50.6%
*-commutative50.6%
Simplified50.6%
Taylor expanded in y around 0 67.5%
associate-*r/67.5%
neg-mul-167.5%
Simplified67.5%
Final simplification53.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -8.2e-23) (not (<= z 2.45e-23))) (/ (- t a) (- b y)) (+ x (/ (- t a) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8.2e-23) || !(z <= 2.45e-23)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((t - a) / (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-8.2d-23)) .or. (.not. (z <= 2.45d-23))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((t - a) / (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8.2e-23) || !(z <= 2.45e-23)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((t - a) / (y / z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -8.2e-23) or not (z <= 2.45e-23): tmp = (t - a) / (b - y) else: tmp = x + ((t - a) / (y / z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -8.2e-23) || !(z <= 2.45e-23)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(t - a) / Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -8.2e-23) || ~((z <= 2.45e-23))) tmp = (t - a) / (b - y); else tmp = x + ((t - a) / (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -8.2e-23], N[Not[LessEqual[z, 2.45e-23]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - a), $MachinePrecision] / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{-23} \lor \neg \left(z \leq 2.45 \cdot 10^{-23}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - a}{\frac{y}{z}}\\
\end{array}
\end{array}
if z < -8.20000000000000059e-23 or 2.4499999999999999e-23 < z Initial program 48.7%
Taylor expanded in z around inf 77.9%
if -8.20000000000000059e-23 < z < 2.4499999999999999e-23Initial program 86.0%
Taylor expanded in x around inf 86.0%
Taylor expanded in z around 0 63.8%
associate-/l*60.9%
Simplified60.9%
Taylor expanded in z around 0 71.1%
Final simplification74.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -6.8e-31)
x
(if (<= y -6.6e-282)
(/ t b)
(if (<= y 1.85e-285) (/ (- a) b) (if (<= y 2.7e-20) (/ t b) x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.8e-31) {
tmp = x;
} else if (y <= -6.6e-282) {
tmp = t / b;
} else if (y <= 1.85e-285) {
tmp = -a / b;
} else if (y <= 2.7e-20) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-6.8d-31)) then
tmp = x
else if (y <= (-6.6d-282)) then
tmp = t / b
else if (y <= 1.85d-285) then
tmp = -a / b
else if (y <= 2.7d-20) then
tmp = t / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.8e-31) {
tmp = x;
} else if (y <= -6.6e-282) {
tmp = t / b;
} else if (y <= 1.85e-285) {
tmp = -a / b;
} else if (y <= 2.7e-20) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.8e-31: tmp = x elif y <= -6.6e-282: tmp = t / b elif y <= 1.85e-285: tmp = -a / b elif y <= 2.7e-20: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.8e-31) tmp = x; elseif (y <= -6.6e-282) tmp = Float64(t / b); elseif (y <= 1.85e-285) tmp = Float64(Float64(-a) / b); elseif (y <= 2.7e-20) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6.8e-31) tmp = x; elseif (y <= -6.6e-282) tmp = t / b; elseif (y <= 1.85e-285) tmp = -a / b; elseif (y <= 2.7e-20) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.8e-31], x, If[LessEqual[y, -6.6e-282], N[(t / b), $MachinePrecision], If[LessEqual[y, 1.85e-285], N[((-a) / b), $MachinePrecision], If[LessEqual[y, 2.7e-20], N[(t / b), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{-31}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -6.6 \cdot 10^{-282}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-285}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-20}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.8000000000000002e-31 or 2.7e-20 < y Initial program 54.9%
Taylor expanded in z around 0 42.3%
if -6.8000000000000002e-31 < y < -6.6e-282 or 1.8499999999999999e-285 < y < 2.7e-20Initial program 83.5%
Taylor expanded in x around inf 83.5%
Taylor expanded in y around 0 62.5%
Taylor expanded in t around inf 47.3%
if -6.6e-282 < y < 1.8499999999999999e-285Initial program 83.1%
Taylor expanded in a around inf 50.6%
mul-1-neg50.6%
distribute-lft-neg-out50.6%
*-commutative50.6%
Simplified50.6%
Taylor expanded in y around 0 67.5%
associate-*r/67.5%
neg-mul-167.5%
Simplified67.5%
Final simplification45.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -620000000000.0) (not (<= y 5.2e+45))) (/ x (- 1.0 z)) (/ (- t a) (- b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -620000000000.0) || !(y <= 5.2e+45)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - 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 ((y <= (-620000000000.0d0)) .or. (.not. (y <= 5.2d+45))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - 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 ((y <= -620000000000.0) || !(y <= 5.2e+45)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -620000000000.0) or not (y <= 5.2e+45): tmp = x / (1.0 - z) else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -620000000000.0) || !(y <= 5.2e+45)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -620000000000.0) || ~((y <= 5.2e+45))) tmp = x / (1.0 - z); else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -620000000000.0], N[Not[LessEqual[y, 5.2e+45]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -620000000000 \lor \neg \left(y \leq 5.2 \cdot 10^{+45}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\end{array}
\end{array}
if y < -6.2e11 or 5.20000000000000014e45 < y Initial program 52.2%
Taylor expanded in y around inf 60.3%
+-commutative60.3%
mul-1-neg60.3%
unsub-neg60.3%
Simplified60.3%
if -6.2e11 < y < 5.20000000000000014e45Initial program 81.2%
Taylor expanded in z around inf 74.9%
Final simplification68.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2e-29) (not (<= y 4.5e-18))) (/ x (- 1.0 z)) (/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2e-29) || !(y <= 4.5e-18)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2d-29)) .or. (.not. (y <= 4.5d-18))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2e-29) || !(y <= 4.5e-18)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2e-29) or not (y <= 4.5e-18): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2e-29) || !(y <= 4.5e-18)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2e-29) || ~((y <= 4.5e-18))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2e-29], N[Not[LessEqual[y, 4.5e-18]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-29} \lor \neg \left(y \leq 4.5 \cdot 10^{-18}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -1.99999999999999989e-29 or 4.49999999999999994e-18 < y Initial program 54.9%
Taylor expanded in y around inf 57.1%
+-commutative57.1%
mul-1-neg57.1%
unsub-neg57.1%
Simplified57.1%
if -1.99999999999999989e-29 < y < 4.49999999999999994e-18Initial program 83.5%
Taylor expanded in y around 0 67.3%
Final simplification61.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.5e-29) x (if (<= y 7.6e-18) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.5e-29) {
tmp = x;
} else if (y <= 7.6e-18) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.5d-29)) then
tmp = x
else if (y <= 7.6d-18) then
tmp = t / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.5e-29) {
tmp = x;
} else if (y <= 7.6e-18) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.5e-29: tmp = x elif y <= 7.6e-18: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.5e-29) tmp = x; elseif (y <= 7.6e-18) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.5e-29) tmp = x; elseif (y <= 7.6e-18) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.5e-29], x, If[LessEqual[y, 7.6e-18], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{-29}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{-18}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.5000000000000001e-29 or 7.5999999999999996e-18 < y Initial program 54.9%
Taylor expanded in z around 0 42.3%
if -1.5000000000000001e-29 < y < 7.5999999999999996e-18Initial program 83.5%
Taylor expanded in x around inf 83.5%
Taylor expanded in y around 0 65.6%
Taylor expanded in t around inf 45.2%
Final simplification43.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 67.5%
Taylor expanded in z around 0 27.5%
Final simplification27.5%
(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 2023200
(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)))))