
(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 15 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 -3e+28) (not (<= z 11600000000000.0)))
(+
(+ (* (/ y z) (/ x (- b y))) (/ (- a t) (- y b)))
(* y (/ (- a t) (* 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 <= -3e+28) || !(z <= 11600000000000.0)) {
tmp = (((y / z) * (x / (b - y))) + ((a - t) / (y - b))) + (y * ((a - t) / (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 <= (-3d+28)) .or. (.not. (z <= 11600000000000.0d0))) then
tmp = (((y / z) * (x / (b - y))) + ((a - t) / (y - b))) + (y * ((a - t) / (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 <= -3e+28) || !(z <= 11600000000000.0)) {
tmp = (((y / z) * (x / (b - y))) + ((a - t) / (y - b))) + (y * ((a - t) / (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 <= -3e+28) or not (z <= 11600000000000.0): tmp = (((y / z) * (x / (b - y))) + ((a - t) / (y - b))) + (y * ((a - t) / (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 <= -3e+28) || !(z <= 11600000000000.0)) tmp = Float64(Float64(Float64(Float64(y / z) * Float64(x / Float64(b - y))) + Float64(Float64(a - t) / Float64(y - b))) + Float64(y * Float64(Float64(a - t) / 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 <= -3e+28) || ~((z <= 11600000000000.0))) tmp = (((y / z) * (x / (b - y))) + ((a - t) / (y - b))) + (y * ((a - t) / (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, -3e+28], N[Not[LessEqual[z, 11600000000000.0]], $MachinePrecision]], N[(N[(N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a - t), $MachinePrecision] / 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 -3 \cdot 10^{+28} \lor \neg \left(z \leq 11600000000000\right):\\
\;\;\;\;\left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{a - t}{y - b}\right) + y \cdot \frac{a - t}{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 < -3.0000000000000001e28 or 1.16e13 < z Initial program 42.4%
Taylor expanded in z around inf 64.5%
associate--r+64.5%
+-commutative64.5%
associate--l+64.5%
*-commutative64.5%
times-frac69.5%
div-sub69.4%
associate-/l*92.5%
Simplified92.5%
if -3.0000000000000001e28 < z < 1.16e13Initial program 86.9%
Taylor expanded in x around inf 91.3%
Final simplification91.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))))
(if (or (<= z -5.4e+58) (not (<= z 1.6e+94)))
(/ (- a t) (- y b))
(* 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 <= -5.4e+58) || !(z <= 1.6e+94)) {
tmp = (a - t) / (y - b);
} 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 <= (-5.4d+58)) .or. (.not. (z <= 1.6d+94))) then
tmp = (a - t) / (y - b)
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 <= -5.4e+58) || !(z <= 1.6e+94)) {
tmp = (a - t) / (y - b);
} 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 <= -5.4e+58) or not (z <= 1.6e+94): tmp = (a - t) / (y - b) 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 <= -5.4e+58) || !(z <= 1.6e+94)) tmp = Float64(Float64(a - t) / Float64(y - b)); 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 <= -5.4e+58) || ~((z <= 1.6e+94))) tmp = (a - t) / (y - b); 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, -5.4e+58], N[Not[LessEqual[z, 1.6e+94]], $MachinePrecision]], N[(N[(a - t), $MachinePrecision] / N[(y - b), $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 -5.4 \cdot 10^{+58} \lor \neg \left(z \leq 1.6 \cdot 10^{+94}\right):\\
\;\;\;\;\frac{a - t}{y - b}\\
\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 < -5.4000000000000002e58 or 1.60000000000000007e94 < z Initial program 38.6%
Taylor expanded in z around inf 86.1%
if -5.4000000000000002e58 < z < 1.60000000000000007e94Initial program 84.6%
Taylor expanded in x around inf 89.1%
Final simplification87.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a t) (- y b))))
(if (<= z -1.9e+28)
t_1
(if (<= z -0.025)
(/ x (* z (+ (/ 1.0 z) -1.0)))
(if (<= z 460000000000.0)
(/ (+ (* z (- t a)) (* y x)) (+ y (* z b)))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / (y - b);
double tmp;
if (z <= -1.9e+28) {
tmp = t_1;
} else if (z <= -0.025) {
tmp = x / (z * ((1.0 / z) + -1.0));
} else if (z <= 460000000000.0) {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * 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 = (a - t) / (y - b)
if (z <= (-1.9d+28)) then
tmp = t_1
else if (z <= (-0.025d0)) then
tmp = x / (z * ((1.0d0 / z) + (-1.0d0)))
else if (z <= 460000000000.0d0) then
tmp = ((z * (t - a)) + (y * x)) / (y + (z * 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 = (a - t) / (y - b);
double tmp;
if (z <= -1.9e+28) {
tmp = t_1;
} else if (z <= -0.025) {
tmp = x / (z * ((1.0 / z) + -1.0));
} else if (z <= 460000000000.0) {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - t) / (y - b) tmp = 0 if z <= -1.9e+28: tmp = t_1 elif z <= -0.025: tmp = x / (z * ((1.0 / z) + -1.0)) elif z <= 460000000000.0: tmp = ((z * (t - a)) + (y * x)) / (y + (z * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - t) / Float64(y - b)) tmp = 0.0 if (z <= -1.9e+28) tmp = t_1; elseif (z <= -0.025) tmp = Float64(x / Float64(z * Float64(Float64(1.0 / z) + -1.0))); elseif (z <= 460000000000.0) tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(y + Float64(z * b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - t) / (y - b); tmp = 0.0; if (z <= -1.9e+28) tmp = t_1; elseif (z <= -0.025) tmp = x / (z * ((1.0 / z) + -1.0)); elseif (z <= 460000000000.0) tmp = ((z * (t - a)) + (y * x)) / (y + (z * b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e+28], t$95$1, If[LessEqual[z, -0.025], N[(x / N[(z * N[(N[(1.0 / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 460000000000.0], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b}\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -0.025:\\
\;\;\;\;\frac{x}{z \cdot \left(\frac{1}{z} + -1\right)}\\
\mathbf{elif}\;z \leq 460000000000:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.8999999999999999e28 or 4.6e11 < z Initial program 42.1%
Taylor expanded in z around inf 81.0%
if -1.8999999999999999e28 < z < -0.025000000000000001Initial program 89.2%
Taylor expanded in y around inf 79.1%
mul-1-neg79.1%
unsub-neg79.1%
Simplified79.1%
Taylor expanded in z around inf 79.3%
if -0.025000000000000001 < z < 4.6e11Initial program 87.4%
Taylor expanded in b around inf 86.6%
*-commutative86.6%
Simplified86.6%
Final simplification83.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.1e+130) (not (<= z 1.8e+94))) (/ (- a t) (- y b)) (/ (+ (* z (- t a)) (* y x)) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.1e+130) || !(z <= 1.8e+94)) {
tmp = (a - t) / (y - b);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3.1d+130)) .or. (.not. (z <= 1.8d+94))) then
tmp = (a - t) / (y - b)
else
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.1e+130) || !(z <= 1.8e+94)) {
tmp = (a - t) / (y - b);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.1e+130) or not (z <= 1.8e+94): tmp = (a - t) / (y - b) else: tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.1e+130) || !(z <= 1.8e+94)) tmp = Float64(Float64(a - t) / Float64(y - b)); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.1e+130) || ~((z <= 1.8e+94))) tmp = (a - t) / (y - b); else tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.1e+130], N[Not[LessEqual[z, 1.8e+94]], $MachinePrecision]], N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+130} \lor \neg \left(z \leq 1.8 \cdot 10^{+94}\right):\\
\;\;\;\;\frac{a - t}{y - b}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -3.1e130 or 1.79999999999999996e94 < z Initial program 29.1%
Taylor expanded in z around inf 87.6%
if -3.1e130 < z < 1.79999999999999996e94Initial program 84.5%
Final simplification85.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.3e+29)
(/ a (- y b))
(if (<= z -0.00018)
(/ x (- 1.0 z))
(if (<= z 1.25e-13) (+ x (/ (* z t) y)) (- (/ t b) (/ a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.3e+29) {
tmp = a / (y - b);
} else if (z <= -0.00018) {
tmp = x / (1.0 - z);
} else if (z <= 1.25e-13) {
tmp = x + ((z * t) / y);
} else {
tmp = (t / b) - (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 (z <= (-1.3d+29)) then
tmp = a / (y - b)
else if (z <= (-0.00018d0)) then
tmp = x / (1.0d0 - z)
else if (z <= 1.25d-13) then
tmp = x + ((z * t) / y)
else
tmp = (t / b) - (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 (z <= -1.3e+29) {
tmp = a / (y - b);
} else if (z <= -0.00018) {
tmp = x / (1.0 - z);
} else if (z <= 1.25e-13) {
tmp = x + ((z * t) / y);
} else {
tmp = (t / b) - (a / b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.3e+29: tmp = a / (y - b) elif z <= -0.00018: tmp = x / (1.0 - z) elif z <= 1.25e-13: tmp = x + ((z * t) / y) else: tmp = (t / b) - (a / b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.3e+29) tmp = Float64(a / Float64(y - b)); elseif (z <= -0.00018) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= 1.25e-13) tmp = Float64(x + Float64(Float64(z * t) / y)); else tmp = Float64(Float64(t / b) - Float64(a / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.3e+29) tmp = a / (y - b); elseif (z <= -0.00018) tmp = x / (1.0 - z); elseif (z <= 1.25e-13) tmp = x + ((z * t) / y); else tmp = (t / b) - (a / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.3e+29], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.00018], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e-13], N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t / b), $MachinePrecision] - N[(a / b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+29}:\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{elif}\;z \leq -0.00018:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-13}:\\
\;\;\;\;x + \frac{z \cdot t}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b} - \frac{a}{b}\\
\end{array}
\end{array}
if z < -1.3e29Initial program 49.3%
fma-define49.3%
Simplified49.3%
Taylor expanded in x around inf 43.2%
Taylor expanded in a around inf 32.6%
mul-1-neg32.6%
Simplified32.6%
Taylor expanded in z around inf 54.9%
associate-*r/54.9%
neg-mul-154.9%
Simplified54.9%
if -1.3e29 < z < -1.80000000000000011e-4Initial program 89.2%
Taylor expanded in y around inf 79.1%
mul-1-neg79.1%
unsub-neg79.1%
Simplified79.1%
if -1.80000000000000011e-4 < z < 1.24999999999999997e-13Initial program 87.1%
fma-define87.1%
Simplified87.1%
Taylor expanded in x around inf 82.4%
Taylor expanded in z around 0 64.3%
Taylor expanded in x around 0 79.2%
Taylor expanded in t around inf 63.4%
if 1.24999999999999997e-13 < z Initial program 37.0%
Taylor expanded in y around 0 49.8%
div-sub49.8%
Applied egg-rr49.8%
Final simplification58.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.9e+29)
(/ a (- y b))
(if (<= z -0.00018)
(/ x (- 1.0 z))
(if (<= z 2e-11) (+ x (/ (* z t) y)) (/ (- t a) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.9e+29) {
tmp = a / (y - b);
} else if (z <= -0.00018) {
tmp = x / (1.0 - z);
} else if (z <= 2e-11) {
tmp = x + ((z * t) / y);
} 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 (z <= (-2.9d+29)) then
tmp = a / (y - b)
else if (z <= (-0.00018d0)) then
tmp = x / (1.0d0 - z)
else if (z <= 2d-11) then
tmp = x + ((z * t) / y)
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 (z <= -2.9e+29) {
tmp = a / (y - b);
} else if (z <= -0.00018) {
tmp = x / (1.0 - z);
} else if (z <= 2e-11) {
tmp = x + ((z * t) / y);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.9e+29: tmp = a / (y - b) elif z <= -0.00018: tmp = x / (1.0 - z) elif z <= 2e-11: tmp = x + ((z * t) / y) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.9e+29) tmp = Float64(a / Float64(y - b)); elseif (z <= -0.00018) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= 2e-11) tmp = Float64(x + Float64(Float64(z * t) / y)); 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 (z <= -2.9e+29) tmp = a / (y - b); elseif (z <= -0.00018) tmp = x / (1.0 - z); elseif (z <= 2e-11) tmp = x + ((z * t) / y); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.9e+29], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.00018], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e-11], N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+29}:\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{elif}\;z \leq -0.00018:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-11}:\\
\;\;\;\;x + \frac{z \cdot t}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if z < -2.8999999999999999e29Initial program 49.3%
fma-define49.3%
Simplified49.3%
Taylor expanded in x around inf 43.2%
Taylor expanded in a around inf 32.6%
mul-1-neg32.6%
Simplified32.6%
Taylor expanded in z around inf 54.9%
associate-*r/54.9%
neg-mul-154.9%
Simplified54.9%
if -2.8999999999999999e29 < z < -1.80000000000000011e-4Initial program 89.2%
Taylor expanded in y around inf 79.1%
mul-1-neg79.1%
unsub-neg79.1%
Simplified79.1%
if -1.80000000000000011e-4 < z < 1.99999999999999988e-11Initial program 87.1%
fma-define87.1%
Simplified87.1%
Taylor expanded in x around inf 82.4%
Taylor expanded in z around 0 64.3%
Taylor expanded in x around 0 79.2%
Taylor expanded in t around inf 63.4%
if 1.99999999999999988e-11 < z Initial program 37.0%
Taylor expanded in y around 0 49.8%
Final simplification58.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -5e+46)
t_1
(if (<= y 1.6e-134) (/ t (- b y)) (if (<= y 4.7e-49) (/ a (- b)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -5e+46) {
tmp = t_1;
} else if (y <= 1.6e-134) {
tmp = t / (b - y);
} else if (y <= 4.7e-49) {
tmp = a / -b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-5d+46)) then
tmp = t_1
else if (y <= 1.6d-134) then
tmp = t / (b - y)
else if (y <= 4.7d-49) then
tmp = a / -b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -5e+46) {
tmp = t_1;
} else if (y <= 1.6e-134) {
tmp = t / (b - y);
} else if (y <= 4.7e-49) {
tmp = a / -b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -5e+46: tmp = t_1 elif y <= 1.6e-134: tmp = t / (b - y) elif y <= 4.7e-49: tmp = a / -b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -5e+46) tmp = t_1; elseif (y <= 1.6e-134) tmp = Float64(t / Float64(b - y)); elseif (y <= 4.7e-49) tmp = Float64(a / Float64(-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 <= -5e+46) tmp = t_1; elseif (y <= 1.6e-134) tmp = t / (b - y); elseif (y <= 4.7e-49) tmp = a / -b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5e+46], t$95$1, If[LessEqual[y, 1.6e-134], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.7e-49], N[(a / (-b)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -5 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-134}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq 4.7 \cdot 10^{-49}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.0000000000000002e46 or 4.70000000000000021e-49 < y Initial program 58.3%
Taylor expanded in y around inf 51.7%
mul-1-neg51.7%
unsub-neg51.7%
Simplified51.7%
if -5.0000000000000002e46 < y < 1.6000000000000001e-134Initial program 78.1%
fma-define78.2%
Simplified78.2%
Taylor expanded in x around inf 76.0%
Taylor expanded in t around inf 50.4%
associate-/l*46.8%
Simplified46.8%
Taylor expanded in z around inf 42.5%
if 1.6000000000000001e-134 < y < 4.70000000000000021e-49Initial program 67.5%
Taylor expanded in x around inf 56.3%
Taylor expanded in y around 0 40.4%
div-sub40.4%
Simplified40.4%
Taylor expanded in t around 0 51.5%
associate-*r/51.5%
mul-1-neg51.5%
Simplified51.5%
Final simplification48.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -3e-100)
t_1
(if (<= z 410000000000.0) x (if (<= z 1.8e+117) (/ x (- z)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -3e-100) {
tmp = t_1;
} else if (z <= 410000000000.0) {
tmp = x;
} else if (z <= 1.8e+117) {
tmp = x / -z;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t / (b - y)
if (z <= (-3d-100)) then
tmp = t_1
else if (z <= 410000000000.0d0) then
tmp = x
else if (z <= 1.8d+117) then
tmp = x / -z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -3e-100) {
tmp = t_1;
} else if (z <= 410000000000.0) {
tmp = x;
} else if (z <= 1.8e+117) {
tmp = x / -z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -3e-100: tmp = t_1 elif z <= 410000000000.0: tmp = x elif z <= 1.8e+117: tmp = x / -z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -3e-100) tmp = t_1; elseif (z <= 410000000000.0) tmp = x; elseif (z <= 1.8e+117) tmp = Float64(x / Float64(-z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -3e-100) tmp = t_1; elseif (z <= 410000000000.0) tmp = x; elseif (z <= 1.8e+117) tmp = x / -z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e-100], t$95$1, If[LessEqual[z, 410000000000.0], x, If[LessEqual[z, 1.8e+117], N[(x / (-z)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -3 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 410000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+117}:\\
\;\;\;\;\frac{x}{-z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.0000000000000001e-100 or 1.80000000000000006e117 < z Initial program 51.4%
fma-define51.5%
Simplified51.5%
Taylor expanded in x around inf 46.1%
Taylor expanded in t around inf 28.5%
associate-/l*24.7%
Simplified24.7%
Taylor expanded in z around inf 36.2%
if -3.0000000000000001e-100 < z < 4.1e11Initial program 85.4%
Taylor expanded in z around 0 54.1%
if 4.1e11 < z < 1.80000000000000006e117Initial program 57.8%
Taylor expanded in y around inf 45.5%
mul-1-neg45.5%
unsub-neg45.5%
Simplified45.5%
Taylor expanded in z around inf 44.5%
associate-*r/44.5%
mul-1-neg44.5%
Simplified44.5%
Final simplification44.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.5e-16) (not (<= z 1.16e-14))) (/ (- a t) (- y b)) (+ x (/ (* z (- t a)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.5e-16) || !(z <= 1.16e-14)) {
tmp = (a - t) / (y - b);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3.5d-16)) .or. (.not. (z <= 1.16d-14))) then
tmp = (a - t) / (y - b)
else
tmp = x + ((z * (t - a)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.5e-16) || !(z <= 1.16e-14)) {
tmp = (a - t) / (y - b);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.5e-16) or not (z <= 1.16e-14): tmp = (a - t) / (y - b) else: tmp = x + ((z * (t - a)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.5e-16) || !(z <= 1.16e-14)) tmp = Float64(Float64(a - t) / Float64(y - b)); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.5e-16) || ~((z <= 1.16e-14))) tmp = (a - t) / (y - b); else tmp = x + ((z * (t - a)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.5e-16], N[Not[LessEqual[z, 1.16e-14]], $MachinePrecision]], N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-16} \lor \neg \left(z \leq 1.16 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{a - t}{y - b}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -3.50000000000000017e-16 or 1.16000000000000007e-14 < z Initial program 47.7%
Taylor expanded in z around inf 77.1%
if -3.50000000000000017e-16 < z < 1.16000000000000007e-14Initial program 86.8%
fma-define86.8%
Simplified86.8%
Taylor expanded in x around inf 81.9%
Taylor expanded in z around 0 64.9%
Taylor expanded in x around 0 80.2%
Final simplification78.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ a (- b))))
(if (<= z -1.3e+63)
t_1
(if (<= z -1.9e-99) (/ t b) (if (<= z 1.15e-10) x t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / -b;
double tmp;
if (z <= -1.3e+63) {
tmp = t_1;
} else if (z <= -1.9e-99) {
tmp = t / b;
} else if (z <= 1.15e-10) {
tmp = x;
} 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 = a / -b
if (z <= (-1.3d+63)) then
tmp = t_1
else if (z <= (-1.9d-99)) then
tmp = t / b
else if (z <= 1.15d-10) then
tmp = x
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 = a / -b;
double tmp;
if (z <= -1.3e+63) {
tmp = t_1;
} else if (z <= -1.9e-99) {
tmp = t / b;
} else if (z <= 1.15e-10) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / -b tmp = 0 if z <= -1.3e+63: tmp = t_1 elif z <= -1.9e-99: tmp = t / b elif z <= 1.15e-10: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(-b)) tmp = 0.0 if (z <= -1.3e+63) tmp = t_1; elseif (z <= -1.9e-99) tmp = Float64(t / b); elseif (z <= 1.15e-10) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / -b; tmp = 0.0; if (z <= -1.3e+63) tmp = t_1; elseif (z <= -1.9e-99) tmp = t / b; elseif (z <= 1.15e-10) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / (-b)), $MachinePrecision]}, If[LessEqual[z, -1.3e+63], t$95$1, If[LessEqual[z, -1.9e-99], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.15e-10], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{-b}\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-99}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-10}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.3000000000000001e63 or 1.15000000000000004e-10 < z Initial program 41.6%
Taylor expanded in x around inf 35.4%
Taylor expanded in y around 0 36.5%
div-sub38.3%
Simplified38.3%
Taylor expanded in t around 0 33.0%
associate-*r/33.0%
mul-1-neg33.0%
Simplified33.0%
if -1.3000000000000001e63 < z < -1.8999999999999998e-99Initial program 88.8%
Taylor expanded in x around inf 81.8%
Taylor expanded in y around 0 28.7%
div-sub28.9%
Simplified28.9%
Taylor expanded in t around inf 29.1%
if -1.8999999999999998e-99 < z < 1.15000000000000004e-10Initial program 85.0%
Taylor expanded in z around 0 55.6%
Final simplification41.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.1e-20) (not (<= z 1.05e-11))) (/ (- a t) (- y b)) (- x (/ (* z a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.1e-20) || !(z <= 1.05e-11)) {
tmp = (a - t) / (y - b);
} else {
tmp = x - ((z * a) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.1d-20)) .or. (.not. (z <= 1.05d-11))) then
tmp = (a - t) / (y - b)
else
tmp = x - ((z * a) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.1e-20) || !(z <= 1.05e-11)) {
tmp = (a - t) / (y - b);
} else {
tmp = x - ((z * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.1e-20) or not (z <= 1.05e-11): tmp = (a - t) / (y - b) else: tmp = x - ((z * a) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.1e-20) || !(z <= 1.05e-11)) tmp = Float64(Float64(a - t) / Float64(y - b)); else tmp = Float64(x - Float64(Float64(z * a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.1e-20) || ~((z <= 1.05e-11))) tmp = (a - t) / (y - b); else tmp = x - ((z * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.1e-20], N[Not[LessEqual[z, 1.05e-11]], $MachinePrecision]], N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-20} \lor \neg \left(z \leq 1.05 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{a - t}{y - b}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\end{array}
\end{array}
if z < -2.0999999999999999e-20 or 1.0499999999999999e-11 < z Initial program 48.1%
Taylor expanded in z around inf 76.6%
if -2.0999999999999999e-20 < z < 1.0499999999999999e-11Initial program 86.7%
fma-define86.7%
Simplified86.7%
Taylor expanded in x around inf 81.8%
Taylor expanded in z around 0 64.6%
Taylor expanded in x around 0 80.1%
Taylor expanded in t around 0 66.5%
associate-*r/66.5%
neg-mul-166.5%
distribute-lft-neg-in66.5%
*-commutative66.5%
Simplified66.5%
Final simplification72.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.2e-59) (not (<= z 1.7e-16))) (/ (- a t) (- y b)) (+ x (/ (* z t) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.2e-59) || !(z <= 1.7e-16)) {
tmp = (a - t) / (y - b);
} else {
tmp = x + ((z * t) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-6.2d-59)) .or. (.not. (z <= 1.7d-16))) then
tmp = (a - t) / (y - b)
else
tmp = x + ((z * t) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.2e-59) || !(z <= 1.7e-16)) {
tmp = (a - t) / (y - b);
} else {
tmp = x + ((z * t) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.2e-59) or not (z <= 1.7e-16): tmp = (a - t) / (y - b) else: tmp = x + ((z * t) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.2e-59) || !(z <= 1.7e-16)) tmp = Float64(Float64(a - t) / Float64(y - b)); else tmp = Float64(x + Float64(Float64(z * t) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.2e-59) || ~((z <= 1.7e-16))) tmp = (a - t) / (y - b); else tmp = x + ((z * t) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.2e-59], N[Not[LessEqual[z, 1.7e-16]], $MachinePrecision]], N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{-59} \lor \neg \left(z \leq 1.7 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{a - t}{y - b}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot t}{y}\\
\end{array}
\end{array}
if z < -6.19999999999999998e-59 or 1.7e-16 < z Initial program 51.6%
Taylor expanded in z around inf 73.7%
if -6.19999999999999998e-59 < z < 1.7e-16Initial program 85.4%
fma-define85.4%
Simplified85.4%
Taylor expanded in x around inf 81.0%
Taylor expanded in z around 0 66.8%
Taylor expanded in x around 0 82.8%
Taylor expanded in t around inf 67.6%
Final simplification71.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6e+46) (not (<= y 3.2e-48))) (/ 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 <= -6e+46) || !(y <= 3.2e-48)) {
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 <= (-6d+46)) .or. (.not. (y <= 3.2d-48))) 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 <= -6e+46) || !(y <= 3.2e-48)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -6e+46) or not (y <= 3.2e-48): 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 <= -6e+46) || !(y <= 3.2e-48)) 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 <= -6e+46) || ~((y <= 3.2e-48))) 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, -6e+46], N[Not[LessEqual[y, 3.2e-48]], $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 -6 \cdot 10^{+46} \lor \neg \left(y \leq 3.2 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -6.00000000000000047e46 or 3.1999999999999998e-48 < y Initial program 58.3%
Taylor expanded in y around inf 51.7%
mul-1-neg51.7%
unsub-neg51.7%
Simplified51.7%
if -6.00000000000000047e46 < y < 3.1999999999999998e-48Initial program 76.3%
Taylor expanded in y around 0 60.3%
Final simplification55.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.9e-99) (not (<= z 410000000000.0))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.9e-99) || !(z <= 410000000000.0)) {
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 <= (-1.9d-99)) .or. (.not. (z <= 410000000000.0d0))) 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 <= -1.9e-99) || !(z <= 410000000000.0)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.9e-99) or not (z <= 410000000000.0): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.9e-99) || !(z <= 410000000000.0)) 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 <= -1.9e-99) || ~((z <= 410000000000.0))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.9e-99], N[Not[LessEqual[z, 410000000000.0]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-99} \lor \neg \left(z \leq 410000000000\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.8999999999999998e-99 or 4.1e11 < z Initial program 52.1%
Taylor expanded in x around inf 45.5%
Taylor expanded in y around 0 34.6%
div-sub36.1%
Simplified36.1%
Taylor expanded in t around inf 25.2%
if -1.8999999999999998e-99 < z < 4.1e11Initial program 85.4%
Taylor expanded in z around 0 54.1%
Final simplification37.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.9%
Taylor expanded in z around 0 25.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 2024172
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(! :herbie-platform default (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))