
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))))
(if (or (<= z -1.46e+37) (not (<= z 1.02e+65)))
(-
(+ (/ (* (/ x z) y) (- b y)) (/ (- t a) (- b y)))
(* (- t a) (/ y (* z (pow (- b y) 2.0)))))
(* x (+ (/ y t_1) (/ (* z (- t a)) (* x t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if ((z <= -1.46e+37) || !(z <= 1.02e+65)) {
tmp = ((((x / z) * y) / (b - y)) + ((t - a) / (b - y))) - ((t - a) * (y / (z * pow((b - y), 2.0))));
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * 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 = y + (z * (b - y))
if ((z <= (-1.46d+37)) .or. (.not. (z <= 1.02d+65))) then
tmp = ((((x / z) * y) / (b - y)) + ((t - a) / (b - y))) - ((t - a) * (y / (z * ((b - y) ** 2.0d0))))
else
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * 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 = y + (z * (b - y));
double tmp;
if ((z <= -1.46e+37) || !(z <= 1.02e+65)) {
tmp = ((((x / z) * y) / (b - y)) + ((t - a) / (b - y))) - ((t - a) * (y / (z * Math.pow((b - y), 2.0))));
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) tmp = 0 if (z <= -1.46e+37) or not (z <= 1.02e+65): tmp = ((((x / z) * y) / (b - y)) + ((t - a) / (b - y))) - ((t - a) * (y / (z * math.pow((b - y), 2.0)))) else: tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if ((z <= -1.46e+37) || !(z <= 1.02e+65)) tmp = Float64(Float64(Float64(Float64(Float64(x / z) * y) / Float64(b - y)) + Float64(Float64(t - a) / Float64(b - y))) - Float64(Float64(t - a) * Float64(y / Float64(z * (Float64(b - y) ^ 2.0))))); else tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); tmp = 0.0; if ((z <= -1.46e+37) || ~((z <= 1.02e+65))) tmp = ((((x / z) * y) / (b - y)) + ((t - a) / (b - y))) - ((t - a) * (y / (z * ((b - y) ^ 2.0)))); else tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -1.46e+37], N[Not[LessEqual[z, 1.02e+65]], $MachinePrecision]], N[(N[(N[(N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(t - a), $MachinePrecision] * N[(y / N[(z * N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -1.46 \cdot 10^{+37} \lor \neg \left(z \leq 1.02 \cdot 10^{+65}\right):\\
\;\;\;\;\left(\frac{\frac{x}{z} \cdot y}{b - y} + \frac{t - a}{b - y}\right) - \left(t - a\right) \cdot \frac{y}{z \cdot {\left(b - y\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_1}\right)\\
\end{array}
\end{array}
if z < -1.4599999999999999e37 or 1.02000000000000005e65 < z Initial program 32.5%
Taylor expanded in z around inf 66.1%
associate--r+66.1%
+-commutative66.1%
associate--l+66.1%
times-frac79.8%
associate-*r/81.4%
div-sub81.4%
*-commutative81.4%
associate-/l*98.0%
Simplified98.0%
if -1.4599999999999999e37 < z < 1.02000000000000005e65Initial program 86.8%
Taylor expanded in x around inf 92.9%
Final simplification94.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ y (* z (- b y))))
(t_3 (/ (- t a) (- b y))))
(if (<= z -1.8e+37)
t_3
(if (<= z -1.15e-60)
(/ (+ t_1 (* x y)) t_2)
(if (<= z -6.8e-298)
(+ x (/ t_1 t_2))
(if (<= z 1.25e+65) (* x (+ (/ y t_2) (/ t_1 (* x t_2)))) t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -1.8e+37) {
tmp = t_3;
} else if (z <= -1.15e-60) {
tmp = (t_1 + (x * y)) / t_2;
} else if (z <= -6.8e-298) {
tmp = x + (t_1 / t_2);
} else if (z <= 1.25e+65) {
tmp = x * ((y / t_2) + (t_1 / (x * t_2)));
} else {
tmp = t_3;
}
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 = z * (t - a)
t_2 = y + (z * (b - y))
t_3 = (t - a) / (b - y)
if (z <= (-1.8d+37)) then
tmp = t_3
else if (z <= (-1.15d-60)) then
tmp = (t_1 + (x * y)) / t_2
else if (z <= (-6.8d-298)) then
tmp = x + (t_1 / t_2)
else if (z <= 1.25d+65) then
tmp = x * ((y / t_2) + (t_1 / (x * t_2)))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -1.8e+37) {
tmp = t_3;
} else if (z <= -1.15e-60) {
tmp = (t_1 + (x * y)) / t_2;
} else if (z <= -6.8e-298) {
tmp = x + (t_1 / t_2);
} else if (z <= 1.25e+65) {
tmp = x * ((y / t_2) + (t_1 / (x * t_2)));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = y + (z * (b - y)) t_3 = (t - a) / (b - y) tmp = 0 if z <= -1.8e+37: tmp = t_3 elif z <= -1.15e-60: tmp = (t_1 + (x * y)) / t_2 elif z <= -6.8e-298: tmp = x + (t_1 / t_2) elif z <= 1.25e+65: tmp = x * ((y / t_2) + (t_1 / (x * t_2))) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.8e+37) tmp = t_3; elseif (z <= -1.15e-60) tmp = Float64(Float64(t_1 + Float64(x * y)) / t_2); elseif (z <= -6.8e-298) tmp = Float64(x + Float64(t_1 / t_2)); elseif (z <= 1.25e+65) tmp = Float64(x * Float64(Float64(y / t_2) + Float64(t_1 / Float64(x * t_2)))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = y + (z * (b - y)); t_3 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.8e+37) tmp = t_3; elseif (z <= -1.15e-60) tmp = (t_1 + (x * y)) / t_2; elseif (z <= -6.8e-298) tmp = x + (t_1 / t_2); elseif (z <= 1.25e+65) tmp = x * ((y / t_2) + (t_1 / (x * t_2))); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+37], t$95$3, If[LessEqual[z, -1.15e-60], N[(N[(t$95$1 + N[(x * y), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, -6.8e-298], N[(x + N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+65], N[(x * N[(N[(y / t$95$2), $MachinePrecision] + N[(t$95$1 / N[(x * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+37}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-60}:\\
\;\;\;\;\frac{t\_1 + x \cdot y}{t\_2}\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-298}:\\
\;\;\;\;x + \frac{t\_1}{t\_2}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+65}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_2} + \frac{t\_1}{x \cdot t\_2}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -1.79999999999999999e37 or 1.24999999999999993e65 < z Initial program 32.5%
Taylor expanded in z around inf 78.3%
if -1.79999999999999999e37 < z < -1.1500000000000001e-60Initial program 92.4%
if -1.1500000000000001e-60 < z < -6.8e-298Initial program 83.9%
Taylor expanded in x around 0 83.9%
Taylor expanded in z around 0 96.6%
if -6.8e-298 < z < 1.24999999999999993e65Initial program 87.0%
Taylor expanded in x around inf 95.9%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ y (* z (- b y))))
(t_3 (/ (- t a) (- b y))))
(if (<= z -2e+37)
t_3
(if (<= z -2.6e-65)
(/ (+ t_1 (* x y)) t_2)
(if (<= z 4.6e-78)
(+ x (/ t_1 t_2))
(if (<= z 1.95e+49) (/ (* z (- (+ t (/ (* x y) z)) a)) t_2) t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -2e+37) {
tmp = t_3;
} else if (z <= -2.6e-65) {
tmp = (t_1 + (x * y)) / t_2;
} else if (z <= 4.6e-78) {
tmp = x + (t_1 / t_2);
} else if (z <= 1.95e+49) {
tmp = (z * ((t + ((x * y) / z)) - a)) / t_2;
} else {
tmp = t_3;
}
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 = z * (t - a)
t_2 = y + (z * (b - y))
t_3 = (t - a) / (b - y)
if (z <= (-2d+37)) then
tmp = t_3
else if (z <= (-2.6d-65)) then
tmp = (t_1 + (x * y)) / t_2
else if (z <= 4.6d-78) then
tmp = x + (t_1 / t_2)
else if (z <= 1.95d+49) then
tmp = (z * ((t + ((x * y) / z)) - a)) / t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -2e+37) {
tmp = t_3;
} else if (z <= -2.6e-65) {
tmp = (t_1 + (x * y)) / t_2;
} else if (z <= 4.6e-78) {
tmp = x + (t_1 / t_2);
} else if (z <= 1.95e+49) {
tmp = (z * ((t + ((x * y) / z)) - a)) / t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = y + (z * (b - y)) t_3 = (t - a) / (b - y) tmp = 0 if z <= -2e+37: tmp = t_3 elif z <= -2.6e-65: tmp = (t_1 + (x * y)) / t_2 elif z <= 4.6e-78: tmp = x + (t_1 / t_2) elif z <= 1.95e+49: tmp = (z * ((t + ((x * y) / z)) - a)) / t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2e+37) tmp = t_3; elseif (z <= -2.6e-65) tmp = Float64(Float64(t_1 + Float64(x * y)) / t_2); elseif (z <= 4.6e-78) tmp = Float64(x + Float64(t_1 / t_2)); elseif (z <= 1.95e+49) tmp = Float64(Float64(z * Float64(Float64(t + Float64(Float64(x * y) / z)) - a)) / t_2); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = y + (z * (b - y)); t_3 = (t - a) / (b - y); tmp = 0.0; if (z <= -2e+37) tmp = t_3; elseif (z <= -2.6e-65) tmp = (t_1 + (x * y)) / t_2; elseif (z <= 4.6e-78) tmp = x + (t_1 / t_2); elseif (z <= 1.95e+49) tmp = (z * ((t + ((x * y) / z)) - a)) / t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e+37], t$95$3, If[LessEqual[z, -2.6e-65], N[(N[(t$95$1 + N[(x * y), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 4.6e-78], N[(x + N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e+49], N[(N[(z * N[(N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2 \cdot 10^{+37}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-65}:\\
\;\;\;\;\frac{t\_1 + x \cdot y}{t\_2}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-78}:\\
\;\;\;\;x + \frac{t\_1}{t\_2}\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+49}:\\
\;\;\;\;\frac{z \cdot \left(\left(t + \frac{x \cdot y}{z}\right) - a\right)}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -1.99999999999999991e37 or 1.95e49 < z Initial program 34.2%
Taylor expanded in z around inf 78.2%
if -1.99999999999999991e37 < z < -2.6000000000000001e-65Initial program 92.4%
if -2.6000000000000001e-65 < z < 4.6000000000000004e-78Initial program 84.4%
Taylor expanded in x around 0 84.4%
Taylor expanded in z around 0 95.4%
if 4.6000000000000004e-78 < z < 1.95e49Initial program 94.5%
Taylor expanded in z around inf 94.6%
Final simplification87.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ y (* z (- b y))))
(t_3 (/ (+ t_1 (* x y)) t_2))
(t_4 (/ (- t a) (- b y))))
(if (<= z -4.3e+37)
t_4
(if (<= z -1.4e-62)
t_3
(if (<= z 9e-76) (+ x (/ t_1 t_2)) (if (<= z 9.4e+48) t_3 t_4))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = (t_1 + (x * y)) / t_2;
double t_4 = (t - a) / (b - y);
double tmp;
if (z <= -4.3e+37) {
tmp = t_4;
} else if (z <= -1.4e-62) {
tmp = t_3;
} else if (z <= 9e-76) {
tmp = x + (t_1 / t_2);
} else if (z <= 9.4e+48) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = z * (t - a)
t_2 = y + (z * (b - y))
t_3 = (t_1 + (x * y)) / t_2
t_4 = (t - a) / (b - y)
if (z <= (-4.3d+37)) then
tmp = t_4
else if (z <= (-1.4d-62)) then
tmp = t_3
else if (z <= 9d-76) then
tmp = x + (t_1 / t_2)
else if (z <= 9.4d+48) then
tmp = t_3
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = (t_1 + (x * y)) / t_2;
double t_4 = (t - a) / (b - y);
double tmp;
if (z <= -4.3e+37) {
tmp = t_4;
} else if (z <= -1.4e-62) {
tmp = t_3;
} else if (z <= 9e-76) {
tmp = x + (t_1 / t_2);
} else if (z <= 9.4e+48) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = y + (z * (b - y)) t_3 = (t_1 + (x * y)) / t_2 t_4 = (t - a) / (b - y) tmp = 0 if z <= -4.3e+37: tmp = t_4 elif z <= -1.4e-62: tmp = t_3 elif z <= 9e-76: tmp = x + (t_1 / t_2) elif z <= 9.4e+48: tmp = t_3 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(t_1 + Float64(x * y)) / t_2) t_4 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -4.3e+37) tmp = t_4; elseif (z <= -1.4e-62) tmp = t_3; elseif (z <= 9e-76) tmp = Float64(x + Float64(t_1 / t_2)); elseif (z <= 9.4e+48) tmp = t_3; else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = y + (z * (b - y)); t_3 = (t_1 + (x * y)) / t_2; t_4 = (t - a) / (b - y); tmp = 0.0; if (z <= -4.3e+37) tmp = t_4; elseif (z <= -1.4e-62) tmp = t_3; elseif (z <= 9e-76) tmp = x + (t_1 / t_2); elseif (z <= 9.4e+48) tmp = t_3; else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$1 + N[(x * y), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.3e+37], t$95$4, If[LessEqual[z, -1.4e-62], t$95$3, If[LessEqual[z, 9e-76], N[(x + N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.4e+48], t$95$3, t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{t\_1 + x \cdot y}{t\_2}\\
t_4 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -4.3 \cdot 10^{+37}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-62}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-76}:\\
\;\;\;\;x + \frac{t\_1}{t\_2}\\
\mathbf{elif}\;z \leq 9.4 \cdot 10^{+48}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if z < -4.2999999999999997e37 or 9.40000000000000025e48 < z Initial program 34.2%
Taylor expanded in z around inf 78.2%
if -4.2999999999999997e37 < z < -1.40000000000000001e-62 or 9.0000000000000001e-76 < z < 9.40000000000000025e48Initial program 93.3%
if -1.40000000000000001e-62 < z < 9.0000000000000001e-76Initial program 84.4%
Taylor expanded in x around 0 84.4%
Taylor expanded in z around 0 95.4%
Final simplification87.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* z a) (- (* z (- y b)) y))) (t_2 (/ (- t a) (- b y))))
(if (<= z -13000.0)
t_2
(if (<= z -3.2e-32)
t_1
(if (<= z -2.6e-53)
t_2
(if (<= z 1.75e-76) (/ x (- 1.0 z)) (if (<= z 0.00013) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * a) / ((z * (y - b)) - y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -13000.0) {
tmp = t_2;
} else if (z <= -3.2e-32) {
tmp = t_1;
} else if (z <= -2.6e-53) {
tmp = t_2;
} else if (z <= 1.75e-76) {
tmp = x / (1.0 - z);
} else if (z <= 0.00013) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z * a) / ((z * (y - b)) - y)
t_2 = (t - a) / (b - y)
if (z <= (-13000.0d0)) then
tmp = t_2
else if (z <= (-3.2d-32)) then
tmp = t_1
else if (z <= (-2.6d-53)) then
tmp = t_2
else if (z <= 1.75d-76) then
tmp = x / (1.0d0 - z)
else if (z <= 0.00013d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * a) / ((z * (y - b)) - y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -13000.0) {
tmp = t_2;
} else if (z <= -3.2e-32) {
tmp = t_1;
} else if (z <= -2.6e-53) {
tmp = t_2;
} else if (z <= 1.75e-76) {
tmp = x / (1.0 - z);
} else if (z <= 0.00013) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * a) / ((z * (y - b)) - y) t_2 = (t - a) / (b - y) tmp = 0 if z <= -13000.0: tmp = t_2 elif z <= -3.2e-32: tmp = t_1 elif z <= -2.6e-53: tmp = t_2 elif z <= 1.75e-76: tmp = x / (1.0 - z) elif z <= 0.00013: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * a) / Float64(Float64(z * Float64(y - b)) - y)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -13000.0) tmp = t_2; elseif (z <= -3.2e-32) tmp = t_1; elseif (z <= -2.6e-53) tmp = t_2; elseif (z <= 1.75e-76) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= 0.00013) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * a) / ((z * (y - b)) - y); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -13000.0) tmp = t_2; elseif (z <= -3.2e-32) tmp = t_1; elseif (z <= -2.6e-53) tmp = t_2; elseif (z <= 1.75e-76) tmp = x / (1.0 - z); elseif (z <= 0.00013) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * a), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -13000.0], t$95$2, If[LessEqual[z, -3.2e-32], t$95$1, If[LessEqual[z, -2.6e-53], t$95$2, If[LessEqual[z, 1.75e-76], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.00013], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot a}{z \cdot \left(y - b\right) - y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -13000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-53}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-76}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq 0.00013:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -13000 or -3.2000000000000002e-32 < z < -2.59999999999999996e-53 or 1.29999999999999989e-4 < z Initial program 44.3%
Taylor expanded in z around inf 74.5%
if -13000 < z < -3.2000000000000002e-32 or 1.74999999999999999e-76 < z < 1.29999999999999989e-4Initial program 95.0%
Taylor expanded in a around inf 71.0%
mul-1-neg71.0%
distribute-lft-neg-out71.0%
*-commutative71.0%
Simplified71.0%
if -2.59999999999999996e-53 < z < 1.74999999999999999e-76Initial program 84.7%
Taylor expanded in y around inf 67.5%
mul-1-neg67.5%
unsub-neg67.5%
Simplified67.5%
Final simplification71.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.4e-9)
t_1
(if (<= z -3.4e-32)
(* a (/ z (* y (+ z -1.0))))
(if (or (<= z -3e-53) (not (<= z 6e-37))) t_1 x)))))
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 <= -2.4e-9) {
tmp = t_1;
} else if (z <= -3.4e-32) {
tmp = a * (z / (y * (z + -1.0)));
} else if ((z <= -3e-53) || !(z <= 6e-37)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-2.4d-9)) then
tmp = t_1
else if (z <= (-3.4d-32)) then
tmp = a * (z / (y * (z + (-1.0d0))))
else if ((z <= (-3d-53)) .or. (.not. (z <= 6d-37))) then
tmp = t_1
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 t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.4e-9) {
tmp = t_1;
} else if (z <= -3.4e-32) {
tmp = a * (z / (y * (z + -1.0)));
} else if ((z <= -3e-53) || !(z <= 6e-37)) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.4e-9: tmp = t_1 elif z <= -3.4e-32: tmp = a * (z / (y * (z + -1.0))) elif (z <= -3e-53) or not (z <= 6e-37): tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.4e-9) tmp = t_1; elseif (z <= -3.4e-32) tmp = Float64(a * Float64(z / Float64(y * Float64(z + -1.0)))); elseif ((z <= -3e-53) || !(z <= 6e-37)) tmp = t_1; else tmp = x; 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 <= -2.4e-9) tmp = t_1; elseif (z <= -3.4e-32) tmp = a * (z / (y * (z + -1.0))); elseif ((z <= -3e-53) || ~((z <= 6e-37))) tmp = t_1; else tmp = x; 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, -2.4e-9], t$95$1, If[LessEqual[z, -3.4e-32], N[(a * N[(z / N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -3e-53], N[Not[LessEqual[z, 6e-37]], $MachinePrecision]], t$95$1, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-32}:\\
\;\;\;\;a \cdot \frac{z}{y \cdot \left(z + -1\right)}\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-53} \lor \neg \left(z \leq 6 \cdot 10^{-37}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.4e-9 or -3.39999999999999978e-32 < z < -3.0000000000000002e-53 or 6e-37 < z Initial program 46.9%
Taylor expanded in z around inf 72.1%
if -2.4e-9 < z < -3.39999999999999978e-32Initial program 99.5%
Taylor expanded in a around inf 83.6%
mul-1-neg83.6%
distribute-lft-neg-out83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in y around -inf 83.3%
associate-/l*83.8%
sub-neg83.8%
metadata-eval83.8%
Simplified83.8%
if -3.0000000000000002e-53 < z < 6e-37Initial program 85.6%
Taylor expanded in z around 0 65.3%
Final simplification69.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.0) (not (<= z 1.52e+21))) (/ (- t a) (- b y)) (+ x (/ (* z (- t a)) (+ y (* z (- b y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.0) || !(z <= 1.52e+21)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-6.0d0)) .or. (.not. (z <= 1.52d+21))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((z * (t - a)) / (y + (z * (b - y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.0) || !(z <= 1.52e+21)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.0) or not (z <= 1.52e+21): tmp = (t - a) / (b - y) else: tmp = x + ((z * (t - a)) / (y + (z * (b - y)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.0) || !(z <= 1.52e+21)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.0) || ~((z <= 1.52e+21))) tmp = (t - a) / (b - y); else tmp = x + ((z * (t - a)) / (y + (z * (b - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.0], N[Not[LessEqual[z, 1.52e+21]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \lor \neg \left(z \leq 1.52 \cdot 10^{+21}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -6 or 1.52e21 < z Initial program 40.7%
Taylor expanded in z around inf 76.5%
if -6 < z < 1.52e21Initial program 87.1%
Taylor expanded in x around 0 87.1%
Taylor expanded in z around 0 91.5%
Final simplification84.4%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.15e+78) (/ t b) (if (or (<= z -0.315) (not (<= z 2.2e-33))) (- (/ a b)) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.15e+78) {
tmp = t / b;
} else if ((z <= -0.315) || !(z <= 2.2e-33)) {
tmp = -(a / 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 (z <= (-1.15d+78)) then
tmp = t / b
else if ((z <= (-0.315d0)) .or. (.not. (z <= 2.2d-33))) then
tmp = -(a / 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 (z <= -1.15e+78) {
tmp = t / b;
} else if ((z <= -0.315) || !(z <= 2.2e-33)) {
tmp = -(a / b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.15e+78: tmp = t / b elif (z <= -0.315) or not (z <= 2.2e-33): tmp = -(a / b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.15e+78) tmp = Float64(t / b); elseif ((z <= -0.315) || !(z <= 2.2e-33)) tmp = Float64(-Float64(a / b)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.15e+78) tmp = t / b; elseif ((z <= -0.315) || ~((z <= 2.2e-33))) tmp = -(a / b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.15e+78], N[(t / b), $MachinePrecision], If[Or[LessEqual[z, -0.315], N[Not[LessEqual[z, 2.2e-33]], $MachinePrecision]], (-N[(a / b), $MachinePrecision]), x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+78}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq -0.315 \lor \neg \left(z \leq 2.2 \cdot 10^{-33}\right):\\
\;\;\;\;-\frac{a}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.1500000000000001e78Initial program 32.2%
Taylor expanded in b around inf 14.3%
Taylor expanded in t around inf 31.7%
if -1.1500000000000001e78 < z < -0.315000000000000002 or 2.20000000000000005e-33 < z Initial program 51.5%
Taylor expanded in a around inf 27.1%
mul-1-neg27.1%
distribute-lft-neg-out27.1%
*-commutative27.1%
Simplified27.1%
Taylor expanded in y around 0 31.1%
associate-*r/31.1%
neg-mul-131.1%
Simplified31.1%
if -0.315000000000000002 < z < 2.20000000000000005e-33Initial program 86.9%
Taylor expanded in z around 0 60.3%
Final simplification45.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.9e-53) (not (<= z 8.2e-38))) (/ (- t a) (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.9e-53) || !(z <= 8.2e-38)) {
tmp = (t - a) / (b - y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3.9d-53)) .or. (.not. (z <= 8.2d-38))) then
tmp = (t - a) / (b - y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.9e-53) || !(z <= 8.2e-38)) {
tmp = (t - a) / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.9e-53) or not (z <= 8.2e-38): tmp = (t - a) / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.9e-53) || !(z <= 8.2e-38)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.9e-53) || ~((z <= 8.2e-38))) tmp = (t - a) / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.9e-53], N[Not[LessEqual[z, 8.2e-38]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{-53} \lor \neg \left(z \leq 8.2 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.9000000000000002e-53 or 8.1999999999999996e-38 < z Initial program 49.1%
Taylor expanded in z around inf 69.5%
if -3.9000000000000002e-53 < z < 8.1999999999999996e-38Initial program 85.6%
Taylor expanded in z around 0 65.3%
Final simplification67.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.5e-19) (not (<= y 300000000.0))) (/ x (- 1.0 z)) (/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.5e-19) || !(y <= 300000000.0)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-5.5d-19)) .or. (.not. (y <= 300000000.0d0))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.5e-19) || !(y <= 300000000.0)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.5e-19) or not (y <= 300000000.0): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.5e-19) || !(y <= 300000000.0)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.5e-19) || ~((y <= 300000000.0))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.5e-19], N[Not[LessEqual[y, 300000000.0]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-19} \lor \neg \left(y \leq 300000000\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -5.4999999999999996e-19 or 3e8 < y Initial program 58.1%
Taylor expanded in y around inf 58.7%
mul-1-neg58.7%
unsub-neg58.7%
Simplified58.7%
if -5.4999999999999996e-19 < y < 3e8Initial program 74.0%
Taylor expanded in y around 0 56.7%
Final simplification57.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3e-115) (not (<= y 4.5e-43))) (/ x (- 1.0 z)) (- (/ a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3e-115) || !(y <= 4.5e-43)) {
tmp = x / (1.0 - z);
} else {
tmp = -(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 <= (-3d-115)) .or. (.not. (y <= 4.5d-43))) then
tmp = x / (1.0d0 - z)
else
tmp = -(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 <= -3e-115) || !(y <= 4.5e-43)) {
tmp = x / (1.0 - z);
} else {
tmp = -(a / b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3e-115) or not (y <= 4.5e-43): tmp = x / (1.0 - z) else: tmp = -(a / b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3e-115) || !(y <= 4.5e-43)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(-Float64(a / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3e-115) || ~((y <= 4.5e-43))) tmp = x / (1.0 - z); else tmp = -(a / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3e-115], N[Not[LessEqual[y, 4.5e-43]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], (-N[(a / b), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{-115} \lor \neg \left(y \leq 4.5 \cdot 10^{-43}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;-\frac{a}{b}\\
\end{array}
\end{array}
if y < -3.0000000000000002e-115 or 4.50000000000000025e-43 < y Initial program 59.4%
Taylor expanded in y around inf 52.3%
mul-1-neg52.3%
unsub-neg52.3%
Simplified52.3%
if -3.0000000000000002e-115 < y < 4.50000000000000025e-43Initial program 77.4%
Taylor expanded in a around inf 28.6%
mul-1-neg28.6%
distribute-lft-neg-out28.6%
*-commutative28.6%
Simplified28.6%
Taylor expanded in y around 0 35.1%
associate-*r/35.1%
neg-mul-135.1%
Simplified35.1%
Final simplification46.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.5e-52) (not (<= z 1.45e-38))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.5e-52) || !(z <= 1.45e-38)) {
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 ((z <= (-2.5d-52)) .or. (.not. (z <= 1.45d-38))) 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 ((z <= -2.5e-52) || !(z <= 1.45e-38)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.5e-52) or not (z <= 1.45e-38): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.5e-52) || !(z <= 1.45e-38)) 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 ((z <= -2.5e-52) || ~((z <= 1.45e-38))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.5e-52], N[Not[LessEqual[z, 1.45e-38]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-52} \lor \neg \left(z \leq 1.45 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.5e-52 or 1.44999999999999997e-38 < z Initial program 48.7%
Taylor expanded in b around inf 24.3%
Taylor expanded in t around inf 25.6%
if -2.5e-52 < z < 1.44999999999999997e-38Initial program 85.7%
Taylor expanded in z around 0 64.8%
Final simplification43.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.8) (not (<= z 1.0))) (/ a y) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.8) || !(z <= 1.0)) {
tmp = a / y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-5.8d0)) .or. (.not. (z <= 1.0d0))) then
tmp = a / y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.8) || !(z <= 1.0)) {
tmp = a / y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.8) or not (z <= 1.0): tmp = a / y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.8) || !(z <= 1.0)) tmp = Float64(a / y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.8) || ~((z <= 1.0))) tmp = a / y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.8], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(a / y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;\frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.79999999999999982 or 1 < z Initial program 42.6%
Taylor expanded in a around inf 20.4%
mul-1-neg20.4%
distribute-lft-neg-out20.4%
*-commutative20.4%
Simplified20.4%
Taylor expanded in y around -inf 9.5%
associate-/l*11.3%
sub-neg11.3%
metadata-eval11.3%
Simplified11.3%
Taylor expanded in z around inf 13.7%
if -5.79999999999999982 < z < 1Initial program 86.8%
Taylor expanded in z around 0 57.7%
Final simplification36.2%
(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 65.2%
Taylor expanded in z around 0 31.1%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2024091
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))