
(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 17 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 (- y b)))) (t_2 (/ (- t a) (- b y))))
(if (<= z -1.3e+41)
t_2
(if (<= z 320000.0)
(* x (+ (/ y t_1) (/ (* z (- t a)) (* x t_1))))
(if (<= z 1.46e+141)
(+
t_2
(/ (- (/ (* y x) (- b y)) (* y (/ (- t a) (pow (- b y) 2.0)))) z))
t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (z * (y - b));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.3e+41) {
tmp = t_2;
} else if (z <= 320000.0) {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
} else if (z <= 1.46e+141) {
tmp = t_2 + ((((y * x) / (b - y)) - (y * ((t - a) / pow((b - y), 2.0)))) / z);
} 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 = y - (z * (y - b))
t_2 = (t - a) / (b - y)
if (z <= (-1.3d+41)) then
tmp = t_2
else if (z <= 320000.0d0) then
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)))
else if (z <= 1.46d+141) then
tmp = t_2 + ((((y * x) / (b - y)) - (y * ((t - a) / ((b - y) ** 2.0d0)))) / z)
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 * (y - b));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.3e+41) {
tmp = t_2;
} else if (z <= 320000.0) {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
} else if (z <= 1.46e+141) {
tmp = t_2 + ((((y * x) / (b - y)) - (y * ((t - a) / Math.pow((b - y), 2.0)))) / z);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y - (z * (y - b)) t_2 = (t - a) / (b - y) tmp = 0 if z <= -1.3e+41: tmp = t_2 elif z <= 320000.0: tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))) elif z <= 1.46e+141: tmp = t_2 + ((((y * x) / (b - y)) - (y * ((t - a) / math.pow((b - y), 2.0)))) / z) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y - Float64(z * Float64(y - b))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.3e+41) tmp = t_2; elseif (z <= 320000.0) tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1)))); elseif (z <= 1.46e+141) tmp = Float64(t_2 + Float64(Float64(Float64(Float64(y * x) / Float64(b - y)) - Float64(y * Float64(Float64(t - a) / (Float64(b - y) ^ 2.0)))) / z)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y - (z * (y - b)); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.3e+41) tmp = t_2; elseif (z <= 320000.0) tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))); elseif (z <= 1.46e+141) tmp = t_2 + ((((y * x) / (b - y)) - (y * ((t - a) / ((b - y) ^ 2.0)))) / z); 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[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+41], t$95$2, If[LessEqual[z, 320000.0], 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], If[LessEqual[z, 1.46e+141], N[(t$95$2 + N[(N[(N[(N[(y * x), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(t - a), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - z \cdot \left(y - b\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+41}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 320000:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_1}\right)\\
\mathbf{elif}\;z \leq 1.46 \cdot 10^{+141}:\\
\;\;\;\;t\_2 + \frac{\frac{y \cdot x}{b - y} - y \cdot \frac{t - a}{{\left(b - y\right)}^{2}}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.3e41 or 1.4600000000000001e141 < z Initial program 39.6%
Taylor expanded in z around inf 89.0%
if -1.3e41 < z < 3.2e5Initial program 87.1%
Taylor expanded in x around inf 93.6%
if 3.2e5 < z < 1.4600000000000001e141Initial program 55.8%
Taylor expanded in z around -inf 72.7%
associate--l+72.7%
mul-1-neg72.7%
distribute-lft-out--72.7%
*-commutative72.7%
associate-/l*91.1%
div-sub95.6%
Simplified95.6%
Final simplification92.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- 1.0 (/ b y))) (t_2 (- y (* z (- y b)))))
(if (<= z -1.1e+41)
(/ (- t a) (- b y))
(if (<= z 290000.0)
(* x (+ (/ y t_2) (/ (* z (- t a)) (* x t_2))))
(+
(/ (- a t) (* y t_1))
(/ (+ (/ (- a t) (* y (pow t_1 2.0))) (/ x (+ -1.0 (/ b y)))) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 - (b / y);
double t_2 = y - (z * (y - b));
double tmp;
if (z <= -1.1e+41) {
tmp = (t - a) / (b - y);
} else if (z <= 290000.0) {
tmp = x * ((y / t_2) + ((z * (t - a)) / (x * t_2)));
} else {
tmp = ((a - t) / (y * t_1)) + ((((a - t) / (y * pow(t_1, 2.0))) + (x / (-1.0 + (b / 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) :: t_2
real(8) :: tmp
t_1 = 1.0d0 - (b / y)
t_2 = y - (z * (y - b))
if (z <= (-1.1d+41)) then
tmp = (t - a) / (b - y)
else if (z <= 290000.0d0) then
tmp = x * ((y / t_2) + ((z * (t - a)) / (x * t_2)))
else
tmp = ((a - t) / (y * t_1)) + ((((a - t) / (y * (t_1 ** 2.0d0))) + (x / ((-1.0d0) + (b / 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 = 1.0 - (b / y);
double t_2 = y - (z * (y - b));
double tmp;
if (z <= -1.1e+41) {
tmp = (t - a) / (b - y);
} else if (z <= 290000.0) {
tmp = x * ((y / t_2) + ((z * (t - a)) / (x * t_2)));
} else {
tmp = ((a - t) / (y * t_1)) + ((((a - t) / (y * Math.pow(t_1, 2.0))) + (x / (-1.0 + (b / y)))) / z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 - (b / y) t_2 = y - (z * (y - b)) tmp = 0 if z <= -1.1e+41: tmp = (t - a) / (b - y) elif z <= 290000.0: tmp = x * ((y / t_2) + ((z * (t - a)) / (x * t_2))) else: tmp = ((a - t) / (y * t_1)) + ((((a - t) / (y * math.pow(t_1, 2.0))) + (x / (-1.0 + (b / y)))) / z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 - Float64(b / y)) t_2 = Float64(y - Float64(z * Float64(y - b))) tmp = 0.0 if (z <= -1.1e+41) tmp = Float64(Float64(t - a) / Float64(b - y)); elseif (z <= 290000.0) tmp = Float64(x * Float64(Float64(y / t_2) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_2)))); else tmp = Float64(Float64(Float64(a - t) / Float64(y * t_1)) + Float64(Float64(Float64(Float64(a - t) / Float64(y * (t_1 ^ 2.0))) + Float64(x / Float64(-1.0 + Float64(b / y)))) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 - (b / y); t_2 = y - (z * (y - b)); tmp = 0.0; if (z <= -1.1e+41) tmp = (t - a) / (b - y); elseif (z <= 290000.0) tmp = x * ((y / t_2) + ((z * (t - a)) / (x * t_2))); else tmp = ((a - t) / (y * t_1)) + ((((a - t) / (y * (t_1 ^ 2.0))) + (x / (-1.0 + (b / y)))) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 - N[(b / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+41], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 290000.0], N[(x * N[(N[(y / t$95$2), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a - t), $MachinePrecision] / N[(y * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(a - t), $MachinePrecision] / N[(y * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(-1.0 + N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - \frac{b}{y}\\
t_2 := y - z \cdot \left(y - b\right)\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+41}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{elif}\;z \leq 290000:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_2} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_2}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{a - t}{y \cdot t\_1} + \frac{\frac{a - t}{y \cdot {t\_1}^{2}} + \frac{x}{-1 + \frac{b}{y}}}{z}\\
\end{array}
\end{array}
if z < -1.09999999999999995e41Initial program 39.2%
Taylor expanded in z around inf 87.6%
if -1.09999999999999995e41 < z < 2.9e5Initial program 87.1%
Taylor expanded in x around inf 93.6%
if 2.9e5 < z Initial program 45.6%
Taylor expanded in y around inf 37.6%
+-commutative37.6%
mul-1-neg37.6%
unsub-neg37.6%
*-commutative37.6%
Simplified37.6%
Taylor expanded in z around -inf 89.1%
distribute-lft-out89.1%
mul-1-neg89.1%
sub-neg89.1%
Simplified89.1%
Final simplification91.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- y (* z (- y b)))))
(if (or (<= z -9.6e+41) (not (<= z 5.5e+16)))
(/ (- t a) (- b y))
(* 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 * (y - b));
double tmp;
if ((z <= -9.6e+41) || !(z <= 5.5e+16)) {
tmp = (t - a) / (b - y);
} 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 * (y - b))
if ((z <= (-9.6d+41)) .or. (.not. (z <= 5.5d+16))) then
tmp = (t - a) / (b - y)
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 * (y - b));
double tmp;
if ((z <= -9.6e+41) || !(z <= 5.5e+16)) {
tmp = (t - a) / (b - y);
} 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 * (y - b)) tmp = 0 if (z <= -9.6e+41) or not (z <= 5.5e+16): tmp = (t - a) / (b - y) 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(y - b))) tmp = 0.0 if ((z <= -9.6e+41) || !(z <= 5.5e+16)) tmp = Float64(Float64(t - a) / Float64(b - y)); 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 * (y - b)); tmp = 0.0; if ((z <= -9.6e+41) || ~((z <= 5.5e+16))) tmp = (t - a) / (b - y); 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[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -9.6e+41], N[Not[LessEqual[z, 5.5e+16]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $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(y - b\right)\\
\mathbf{if}\;z \leq -9.6 \cdot 10^{+41} \lor \neg \left(z \leq 5.5 \cdot 10^{+16}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\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 < -9.6000000000000007e41 or 5.5e16 < z Initial program 42.2%
Taylor expanded in z around inf 85.3%
if -9.6000000000000007e41 < z < 5.5e16Initial program 87.2%
Taylor expanded in x around inf 93.6%
Final simplification89.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (/ (* z a) y))) (t_2 (/ (- t a) (- b y))))
(if (<= z -0.0001)
t_2
(if (<= z -3.6e-119)
t_1
(if (<= z -3.3e-160)
(/ (+ (* z (- t a)) (* y x)) (* z b))
(if (<= z 2.2e-96) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - ((z * a) / y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -0.0001) {
tmp = t_2;
} else if (z <= -3.6e-119) {
tmp = t_1;
} else if (z <= -3.3e-160) {
tmp = ((z * (t - a)) + (y * x)) / (z * b);
} else if (z <= 2.2e-96) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x - ((z * a) / y)
t_2 = (t - a) / (b - y)
if (z <= (-0.0001d0)) then
tmp = t_2
else if (z <= (-3.6d-119)) then
tmp = t_1
else if (z <= (-3.3d-160)) then
tmp = ((z * (t - a)) + (y * x)) / (z * b)
else if (z <= 2.2d-96) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - ((z * a) / y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -0.0001) {
tmp = t_2;
} else if (z <= -3.6e-119) {
tmp = t_1;
} else if (z <= -3.3e-160) {
tmp = ((z * (t - a)) + (y * x)) / (z * b);
} else if (z <= 2.2e-96) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x - ((z * a) / y) t_2 = (t - a) / (b - y) tmp = 0 if z <= -0.0001: tmp = t_2 elif z <= -3.6e-119: tmp = t_1 elif z <= -3.3e-160: tmp = ((z * (t - a)) + (y * x)) / (z * b) elif z <= 2.2e-96: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(Float64(z * a) / y)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -0.0001) tmp = t_2; elseif (z <= -3.6e-119) tmp = t_1; elseif (z <= -3.3e-160) tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(z * b)); elseif (z <= 2.2e-96) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x - ((z * a) / y); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -0.0001) tmp = t_2; elseif (z <= -3.6e-119) tmp = t_1; elseif (z <= -3.3e-160) tmp = ((z * (t - a)) + (y * x)) / (z * b); elseif (z <= 2.2e-96) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.0001], t$95$2, If[LessEqual[z, -3.6e-119], t$95$1, If[LessEqual[z, -3.3e-160], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e-96], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{z \cdot a}{y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -0.0001:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-160}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{z \cdot b}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-96}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.00000000000000005e-4 or 2.19999999999999979e-96 < z Initial program 52.5%
Taylor expanded in z around inf 78.2%
if -1.00000000000000005e-4 < z < -3.6e-119 or -3.3e-160 < z < 2.19999999999999979e-96Initial program 85.0%
Taylor expanded in z around 0 60.1%
Taylor expanded in a around inf 73.9%
associate-*r/73.9%
associate-*r*73.9%
mul-1-neg73.9%
Simplified73.9%
if -3.6e-119 < z < -3.3e-160Initial program 99.7%
Taylor expanded in b around inf 97.6%
Final simplification77.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.6e+41) (not (<= z 1.05e+78))) (/ (- t a) (- b y)) (/ (+ (* z (- t a)) (* y x)) (- y (* z (- y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.6e+41) || !(z <= 1.05e+78)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y - (z * (y - 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.6d+41)) .or. (.not. (z <= 1.05d+78))) then
tmp = (t - a) / (b - y)
else
tmp = ((z * (t - a)) + (y * x)) / (y - (z * (y - 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.6e+41) || !(z <= 1.05e+78)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y - (z * (y - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.6e+41) or not (z <= 1.05e+78): tmp = (t - a) / (b - y) else: tmp = ((z * (t - a)) + (y * x)) / (y - (z * (y - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.6e+41) || !(z <= 1.05e+78)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(y - Float64(z * Float64(y - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.6e+41) || ~((z <= 1.05e+78))) tmp = (t - a) / (b - y); else tmp = ((z * (t - a)) + (y * x)) / (y - (z * (y - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.6e+41], N[Not[LessEqual[z, 1.05e+78]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+41} \lor \neg \left(z \leq 1.05 \cdot 10^{+78}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y - z \cdot \left(y - b\right)}\\
\end{array}
\end{array}
if z < -2.6000000000000001e41 or 1.05e78 < z Initial program 38.6%
Taylor expanded in z around inf 87.4%
if -2.6000000000000001e41 < z < 1.05e78Initial program 86.8%
Final simplification87.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -9.5e+40)
t_1
(if (<= z -1.3e-270)
(/ (- (* y x) (* z a)) (- y (* z (- y b))))
(if (<= z 5.7e-95) (- x (/ (* z a) y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -9.5e+40) {
tmp = t_1;
} else if (z <= -1.3e-270) {
tmp = ((y * x) - (z * a)) / (y - (z * (y - b)));
} else if (z <= 5.7e-95) {
tmp = x - ((z * a) / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-9.5d+40)) then
tmp = t_1
else if (z <= (-1.3d-270)) then
tmp = ((y * x) - (z * a)) / (y - (z * (y - b)))
else if (z <= 5.7d-95) then
tmp = x - ((z * a) / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -9.5e+40) {
tmp = t_1;
} else if (z <= -1.3e-270) {
tmp = ((y * x) - (z * a)) / (y - (z * (y - b)));
} else if (z <= 5.7e-95) {
tmp = x - ((z * a) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -9.5e+40: tmp = t_1 elif z <= -1.3e-270: tmp = ((y * x) - (z * a)) / (y - (z * (y - b))) elif z <= 5.7e-95: tmp = x - ((z * a) / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -9.5e+40) tmp = t_1; elseif (z <= -1.3e-270) tmp = Float64(Float64(Float64(y * x) - Float64(z * a)) / Float64(y - Float64(z * Float64(y - b)))); elseif (z <= 5.7e-95) tmp = Float64(x - Float64(Float64(z * a) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -9.5e+40) tmp = t_1; elseif (z <= -1.3e-270) tmp = ((y * x) - (z * a)) / (y - (z * (y - b))); elseif (z <= 5.7e-95) tmp = x - ((z * a) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.5e+40], t$95$1, If[LessEqual[z, -1.3e-270], N[(N[(N[(y * x), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.7e-95], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-270}:\\
\;\;\;\;\frac{y \cdot x - z \cdot a}{y - z \cdot \left(y - b\right)}\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{-95}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.5000000000000003e40 or 5.7e-95 < z Initial program 50.5%
Taylor expanded in z around inf 79.3%
if -9.5000000000000003e40 < z < -1.3000000000000001e-270Initial program 90.9%
Taylor expanded in t around 0 74.7%
+-commutative74.7%
mul-1-neg74.7%
unsub-neg74.7%
*-commutative74.7%
*-commutative74.7%
Simplified74.7%
if -1.3000000000000001e-270 < z < 5.7e-95Initial program 81.9%
Taylor expanded in z around 0 68.3%
Taylor expanded in a around inf 83.2%
associate-*r/83.2%
associate-*r*83.2%
mul-1-neg83.2%
Simplified83.2%
Final simplification79.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.6e+39)
t_1
(if (<= z -3.1e-261)
(/ (+ (* y x) (* z t)) (- y (* z (- y b))))
(if (<= z 1.25e-94) (- x (/ (* z a) y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.6e+39) {
tmp = t_1;
} else if (z <= -3.1e-261) {
tmp = ((y * x) + (z * t)) / (y - (z * (y - b)));
} else if (z <= 1.25e-94) {
tmp = x - ((z * a) / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-2.6d+39)) then
tmp = t_1
else if (z <= (-3.1d-261)) then
tmp = ((y * x) + (z * t)) / (y - (z * (y - b)))
else if (z <= 1.25d-94) then
tmp = x - ((z * a) / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.6e+39) {
tmp = t_1;
} else if (z <= -3.1e-261) {
tmp = ((y * x) + (z * t)) / (y - (z * (y - b)));
} else if (z <= 1.25e-94) {
tmp = x - ((z * a) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.6e+39: tmp = t_1 elif z <= -3.1e-261: tmp = ((y * x) + (z * t)) / (y - (z * (y - b))) elif z <= 1.25e-94: tmp = x - ((z * a) / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.6e+39) tmp = t_1; elseif (z <= -3.1e-261) tmp = Float64(Float64(Float64(y * x) + Float64(z * t)) / Float64(y - Float64(z * Float64(y - b)))); elseif (z <= 1.25e-94) tmp = Float64(x - Float64(Float64(z * a) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.6e+39) tmp = t_1; elseif (z <= -3.1e-261) tmp = ((y * x) + (z * t)) / (y - (z * (y - b))); elseif (z <= 1.25e-94) tmp = x - ((z * a) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+39], t$95$1, If[LessEqual[z, -3.1e-261], N[(N[(N[(y * x), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e-94], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-261}:\\
\;\;\;\;\frac{y \cdot x + z \cdot t}{y - z \cdot \left(y - b\right)}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-94}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.6e39 or 1.2499999999999999e-94 < z Initial program 50.8%
Taylor expanded in z around inf 79.5%
if -2.6e39 < z < -3.0999999999999998e-261Initial program 90.0%
Taylor expanded in t around inf 66.8%
if -3.0999999999999998e-261 < z < 1.2499999999999999e-94Initial program 83.5%
Taylor expanded in z around 0 67.7%
Taylor expanded in a around inf 83.5%
associate-*r/83.5%
associate-*r*83.5%
mul-1-neg83.5%
Simplified83.5%
Final simplification77.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.5e-5) (not (<= z 1.26e-94))) (/ (- t a) (- b y)) (- x (/ (* z a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.5e-5) || !(z <= 1.26e-94)) {
tmp = (t - a) / (b - y);
} 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 <= (-5.5d-5)) .or. (.not. (z <= 1.26d-94))) then
tmp = (t - a) / (b - y)
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 <= -5.5e-5) || !(z <= 1.26e-94)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - ((z * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.5e-5) or not (z <= 1.26e-94): tmp = (t - a) / (b - y) else: tmp = x - ((z * a) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.5e-5) || !(z <= 1.26e-94)) tmp = Float64(Float64(t - a) / Float64(b - y)); 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 <= -5.5e-5) || ~((z <= 1.26e-94))) tmp = (t - a) / (b - y); else tmp = x - ((z * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.5e-5], N[Not[LessEqual[z, 1.26e-94]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-5} \lor \neg \left(z \leq 1.26 \cdot 10^{-94}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\end{array}
\end{array}
if z < -5.5000000000000002e-5 or 1.2600000000000001e-94 < z Initial program 52.5%
Taylor expanded in z around inf 78.2%
if -5.5000000000000002e-5 < z < 1.2600000000000001e-94Initial program 86.2%
Taylor expanded in z around 0 55.4%
Taylor expanded in a around inf 68.2%
associate-*r/68.2%
associate-*r*68.2%
mul-1-neg68.2%
Simplified68.2%
Final simplification73.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -0.000185) (not (<= z 5.7e-95))) (/ (- t a) (- b y)) (- x (* a (/ z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.000185) || !(z <= 5.7e-95)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - (a * (z / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-0.000185d0)) .or. (.not. (z <= 5.7d-95))) then
tmp = (t - a) / (b - y)
else
tmp = x - (a * (z / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.000185) || !(z <= 5.7e-95)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - (a * (z / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -0.000185) or not (z <= 5.7e-95): tmp = (t - a) / (b - y) else: tmp = x - (a * (z / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -0.000185) || !(z <= 5.7e-95)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x - Float64(a * Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -0.000185) || ~((z <= 5.7e-95))) tmp = (t - a) / (b - y); else tmp = x - (a * (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -0.000185], N[Not[LessEqual[z, 5.7e-95]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.000185 \lor \neg \left(z \leq 5.7 \cdot 10^{-95}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{z}{y}\\
\end{array}
\end{array}
if z < -1.85e-4 or 5.7e-95 < z Initial program 52.5%
Taylor expanded in z around inf 78.2%
if -1.85e-4 < z < 5.7e-95Initial program 86.2%
Taylor expanded in z around 0 55.4%
Taylor expanded in a around inf 63.0%
associate-*r/63.0%
mul-1-neg63.0%
Simplified63.0%
Taylor expanded in x around 0 68.2%
mul-1-neg68.2%
associate-/l*66.4%
distribute-lft-neg-in66.4%
cancel-sign-sub-inv66.4%
Simplified66.4%
Final simplification73.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -0.00036) (/ t (- b y)) (if (<= z 1.05e-94) (- x (* a (/ z y))) (/ (- t a) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.00036) {
tmp = t / (b - y);
} else if (z <= 1.05e-94) {
tmp = x - (a * (z / 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 <= (-0.00036d0)) then
tmp = t / (b - y)
else if (z <= 1.05d-94) then
tmp = x - (a * (z / 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 <= -0.00036) {
tmp = t / (b - y);
} else if (z <= 1.05e-94) {
tmp = x - (a * (z / y));
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.00036: tmp = t / (b - y) elif z <= 1.05e-94: tmp = x - (a * (z / y)) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.00036) tmp = Float64(t / Float64(b - y)); elseif (z <= 1.05e-94) tmp = Float64(x - Float64(a * Float64(z / 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 <= -0.00036) tmp = t / (b - y); elseif (z <= 1.05e-94) tmp = x - (a * (z / y)); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.00036], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e-94], N[(x - N[(a * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00036:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-94}:\\
\;\;\;\;x - a \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if z < -3.60000000000000023e-4Initial program 45.3%
Taylor expanded in t around inf 24.2%
*-commutative24.2%
Simplified24.2%
Taylor expanded in z around inf 49.4%
if -3.60000000000000023e-4 < z < 1.05e-94Initial program 86.2%
Taylor expanded in z around 0 55.4%
Taylor expanded in a around inf 63.0%
associate-*r/63.0%
mul-1-neg63.0%
Simplified63.0%
Taylor expanded in x around 0 68.2%
mul-1-neg68.2%
associate-/l*66.4%
distribute-lft-neg-in66.4%
cancel-sign-sub-inv66.4%
Simplified66.4%
if 1.05e-94 < z Initial program 57.4%
Taylor expanded in y around 0 51.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -9.5e-37) (not (<= y 1.05e+19))) (/ 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 <= -9.5e-37) || !(y <= 1.05e+19)) {
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 <= (-9.5d-37)) .or. (.not. (y <= 1.05d+19))) 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 <= -9.5e-37) || !(y <= 1.05e+19)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -9.5e-37) or not (y <= 1.05e+19): 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 <= -9.5e-37) || !(y <= 1.05e+19)) 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 <= -9.5e-37) || ~((y <= 1.05e+19))) 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, -9.5e-37], N[Not[LessEqual[y, 1.05e+19]], $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 -9.5 \cdot 10^{-37} \lor \neg \left(y \leq 1.05 \cdot 10^{+19}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -9.49999999999999927e-37 or 1.05e19 < y Initial program 54.2%
Taylor expanded in y around inf 56.7%
mul-1-neg56.7%
unsub-neg56.7%
Simplified56.7%
if -9.49999999999999927e-37 < y < 1.05e19Initial program 78.7%
Taylor expanded in y around 0 57.4%
Final simplification57.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -7.4e+32) (not (<= z 1.26e-94))) (/ t (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7.4e+32) || !(z <= 1.26e-94)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-7.4d+32)) .or. (.not. (z <= 1.26d-94))) then
tmp = t / (b - y)
else
tmp = x / (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7.4e+32) || !(z <= 1.26e-94)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -7.4e+32) or not (z <= 1.26e-94): tmp = t / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -7.4e+32) || !(z <= 1.26e-94)) tmp = Float64(t / Float64(b - y)); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -7.4e+32) || ~((z <= 1.26e-94))) tmp = t / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -7.4e+32], N[Not[LessEqual[z, 1.26e-94]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.4 \cdot 10^{+32} \lor \neg \left(z \leq 1.26 \cdot 10^{-94}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -7.4e32 or 1.2600000000000001e-94 < z Initial program 51.5%
Taylor expanded in t around inf 24.6%
*-commutative24.6%
Simplified24.6%
Taylor expanded in z around inf 44.1%
if -7.4e32 < z < 1.2600000000000001e-94Initial program 86.6%
Taylor expanded in y around inf 56.8%
mul-1-neg56.8%
unsub-neg56.8%
Simplified56.8%
Final simplification49.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -0.0003) (not (<= z 2.55e-95))) (/ t (- b y)) (+ x (* z x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.0003) || !(z <= 2.55e-95)) {
tmp = t / (b - y);
} else {
tmp = x + (z * 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 <= (-0.0003d0)) .or. (.not. (z <= 2.55d-95))) then
tmp = t / (b - y)
else
tmp = x + (z * 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 <= -0.0003) || !(z <= 2.55e-95)) {
tmp = t / (b - y);
} else {
tmp = x + (z * x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -0.0003) or not (z <= 2.55e-95): tmp = t / (b - y) else: tmp = x + (z * x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -0.0003) || !(z <= 2.55e-95)) tmp = Float64(t / Float64(b - y)); else tmp = Float64(x + Float64(z * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -0.0003) || ~((z <= 2.55e-95))) tmp = t / (b - y); else tmp = x + (z * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -0.0003], N[Not[LessEqual[z, 2.55e-95]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0003 \lor \neg \left(z \leq 2.55 \cdot 10^{-95}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot x\\
\end{array}
\end{array}
if z < -2.99999999999999974e-4 or 2.55e-95 < z Initial program 52.5%
Taylor expanded in t around inf 24.8%
*-commutative24.8%
Simplified24.8%
Taylor expanded in z around inf 43.9%
if -2.99999999999999974e-4 < z < 2.55e-95Initial program 86.2%
Taylor expanded in z around 0 55.4%
Taylor expanded in y around inf 56.1%
*-commutative56.1%
Simplified56.1%
Final simplification49.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z -0.00016) (/ t b) (if (<= z 1.26e-94) (+ x (* z x)) (/ a (- b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.00016) {
tmp = t / b;
} else if (z <= 1.26e-94) {
tmp = x + (z * x);
} 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 (z <= (-0.00016d0)) then
tmp = t / b
else if (z <= 1.26d-94) then
tmp = x + (z * x)
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 (z <= -0.00016) {
tmp = t / b;
} else if (z <= 1.26e-94) {
tmp = x + (z * x);
} else {
tmp = a / -b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.00016: tmp = t / b elif z <= 1.26e-94: tmp = x + (z * x) else: tmp = a / -b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.00016) tmp = Float64(t / b); elseif (z <= 1.26e-94) tmp = Float64(x + Float64(z * x)); else tmp = Float64(a / Float64(-b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.00016) tmp = t / b; elseif (z <= 1.26e-94) tmp = x + (z * x); else tmp = a / -b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.00016], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.26e-94], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], N[(a / (-b)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00016:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1.26 \cdot 10^{-94}:\\
\;\;\;\;x + z \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{-b}\\
\end{array}
\end{array}
if z < -1.60000000000000013e-4Initial program 45.3%
Taylor expanded in t around inf 24.2%
*-commutative24.2%
Simplified24.2%
Taylor expanded in y around 0 31.5%
if -1.60000000000000013e-4 < z < 1.2600000000000001e-94Initial program 86.2%
Taylor expanded in z around 0 55.4%
Taylor expanded in y around inf 56.1%
*-commutative56.1%
Simplified56.1%
if 1.2600000000000001e-94 < z Initial program 57.4%
Taylor expanded in x around inf 51.5%
Taylor expanded in b around inf 43.0%
Taylor expanded in a around inf 29.0%
mul-1-neg29.0%
Simplified29.0%
Final simplification41.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -5.5e-5) (/ t b) (if (<= z 1.02e-94) x (/ a (- b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.5e-5) {
tmp = t / b;
} else if (z <= 1.02e-94) {
tmp = x;
} 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 (z <= (-5.5d-5)) then
tmp = t / b
else if (z <= 1.02d-94) then
tmp = x
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 (z <= -5.5e-5) {
tmp = t / b;
} else if (z <= 1.02e-94) {
tmp = x;
} else {
tmp = a / -b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -5.5e-5: tmp = t / b elif z <= 1.02e-94: tmp = x else: tmp = a / -b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5.5e-5) tmp = Float64(t / b); elseif (z <= 1.02e-94) tmp = x; else tmp = Float64(a / Float64(-b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -5.5e-5) tmp = t / b; elseif (z <= 1.02e-94) tmp = x; else tmp = a / -b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5.5e-5], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.02e-94], x, N[(a / (-b)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-94}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{-b}\\
\end{array}
\end{array}
if z < -5.5000000000000002e-5Initial program 45.3%
Taylor expanded in t around inf 24.2%
*-commutative24.2%
Simplified24.2%
Taylor expanded in y around 0 31.5%
if -5.5000000000000002e-5 < z < 1.02e-94Initial program 86.2%
Taylor expanded in z around 0 55.3%
if 1.02e-94 < z Initial program 57.4%
Taylor expanded in x around inf 51.5%
Taylor expanded in b around inf 43.0%
Taylor expanded in a around inf 29.0%
mul-1-neg29.0%
Simplified29.0%
Final simplification40.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -7.5e-5) (not (<= z 1.06e-94))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7.5e-5) || !(z <= 1.06e-94)) {
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 <= (-7.5d-5)) .or. (.not. (z <= 1.06d-94))) 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 <= -7.5e-5) || !(z <= 1.06e-94)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -7.5e-5) or not (z <= 1.06e-94): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -7.5e-5) || !(z <= 1.06e-94)) 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 <= -7.5e-5) || ~((z <= 1.06e-94))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -7.5e-5], N[Not[LessEqual[z, 1.06e-94]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-5} \lor \neg \left(z \leq 1.06 \cdot 10^{-94}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -7.49999999999999934e-5 or 1.06e-94 < z Initial program 52.5%
Taylor expanded in t around inf 24.8%
*-commutative24.8%
Simplified24.8%
Taylor expanded in y around 0 29.8%
if -7.49999999999999934e-5 < z < 1.06e-94Initial program 86.2%
Taylor expanded in z around 0 55.3%
Final simplification40.7%
(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.0%
Taylor expanded in z around 0 27.2%
(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 2024128
(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)))))