
(FPCore (x y z t) :precision binary64 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
def code(x, y, z, t): return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
def code(x, y, z, t): return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x)) (t_2 (/ x (+ x 1.0))))
(if (<= z -1.6e+157)
(+ t_2 (/ y (* (+ x 1.0) t)))
(if (<= z 9e+95)
(/ (- (/ (* z y) t_1) (- (/ 1.0 (/ t_1 x)) x)) (+ x 1.0))
(+ t_2 (/ (- (/ y (+ x 1.0)) (/ x (* z (+ x 1.0)))) t))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = x / (x + 1.0);
double tmp;
if (z <= -1.6e+157) {
tmp = t_2 + (y / ((x + 1.0) * t));
} else if (z <= 9e+95) {
tmp = (((z * y) / t_1) - ((1.0 / (t_1 / x)) - x)) / (x + 1.0);
} else {
tmp = t_2 + (((y / (x + 1.0)) - (x / (z * (x + 1.0)))) / t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z * t) - x
t_2 = x / (x + 1.0d0)
if (z <= (-1.6d+157)) then
tmp = t_2 + (y / ((x + 1.0d0) * t))
else if (z <= 9d+95) then
tmp = (((z * y) / t_1) - ((1.0d0 / (t_1 / x)) - x)) / (x + 1.0d0)
else
tmp = t_2 + (((y / (x + 1.0d0)) - (x / (z * (x + 1.0d0)))) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = x / (x + 1.0);
double tmp;
if (z <= -1.6e+157) {
tmp = t_2 + (y / ((x + 1.0) * t));
} else if (z <= 9e+95) {
tmp = (((z * y) / t_1) - ((1.0 / (t_1 / x)) - x)) / (x + 1.0);
} else {
tmp = t_2 + (((y / (x + 1.0)) - (x / (z * (x + 1.0)))) / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * t) - x t_2 = x / (x + 1.0) tmp = 0 if z <= -1.6e+157: tmp = t_2 + (y / ((x + 1.0) * t)) elif z <= 9e+95: tmp = (((z * y) / t_1) - ((1.0 / (t_1 / x)) - x)) / (x + 1.0) else: tmp = t_2 + (((y / (x + 1.0)) - (x / (z * (x + 1.0)))) / t) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) t_2 = Float64(x / Float64(x + 1.0)) tmp = 0.0 if (z <= -1.6e+157) tmp = Float64(t_2 + Float64(y / Float64(Float64(x + 1.0) * t))); elseif (z <= 9e+95) tmp = Float64(Float64(Float64(Float64(z * y) / t_1) - Float64(Float64(1.0 / Float64(t_1 / x)) - x)) / Float64(x + 1.0)); else tmp = Float64(t_2 + Float64(Float64(Float64(y / Float64(x + 1.0)) - Float64(x / Float64(z * Float64(x + 1.0)))) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * t) - x; t_2 = x / (x + 1.0); tmp = 0.0; if (z <= -1.6e+157) tmp = t_2 + (y / ((x + 1.0) * t)); elseif (z <= 9e+95) tmp = (((z * y) / t_1) - ((1.0 / (t_1 / x)) - x)) / (x + 1.0); else tmp = t_2 + (((y / (x + 1.0)) - (x / (z * (x + 1.0)))) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+157], N[(t$95$2 + N[(y / N[(N[(x + 1.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e+95], N[(N[(N[(N[(z * y), $MachinePrecision] / t$95$1), $MachinePrecision] - N[(N[(1.0 / N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + N[(N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] - N[(x / N[(z * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
t_2 := \frac{x}{x + 1}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+157}:\\
\;\;\;\;t_2 + \frac{y}{\left(x + 1\right) \cdot t}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+95}:\\
\;\;\;\;\frac{\frac{z \cdot y}{t_1} - \left(\frac{1}{\frac{t_1}{x}} - x\right)}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;t_2 + \frac{\frac{y}{x + 1} - \frac{x}{z \cdot \left(x + 1\right)}}{t}\\
\end{array}
\end{array}
if z < -1.6e157Initial program 70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in y around inf 70.6%
Taylor expanded in t around inf 87.9%
+-commutative87.9%
+-commutative87.9%
Simplified87.9%
if -1.6e157 < z < 9.00000000000000033e95Initial program 98.7%
*-commutative98.7%
Simplified98.7%
+-commutative98.7%
div-sub98.7%
associate-+l-98.7%
Applied egg-rr98.7%
clear-num98.7%
inv-pow98.7%
Applied egg-rr98.7%
unpow-198.7%
Simplified98.7%
if 9.00000000000000033e95 < z Initial program 68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in t around -inf 96.1%
Final simplification96.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x)))
(if (<= z -3.9e+157)
(+ (/ x (+ x 1.0)) (/ y (* (+ x 1.0) t)))
(if (<= z 5.4e+149)
(/ (- (/ (* z y) t_1) (- (/ 1.0 (/ t_1 x)) x)) (+ x 1.0))
(/ (+ x (/ y t)) (+ x 1.0))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double tmp;
if (z <= -3.9e+157) {
tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t));
} else if (z <= 5.4e+149) {
tmp = (((z * y) / t_1) - ((1.0 / (t_1 / x)) - x)) / (x + 1.0);
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (z * t) - x
if (z <= (-3.9d+157)) then
tmp = (x / (x + 1.0d0)) + (y / ((x + 1.0d0) * t))
else if (z <= 5.4d+149) then
tmp = (((z * y) / t_1) - ((1.0d0 / (t_1 / x)) - x)) / (x + 1.0d0)
else
tmp = (x + (y / t)) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double tmp;
if (z <= -3.9e+157) {
tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t));
} else if (z <= 5.4e+149) {
tmp = (((z * y) / t_1) - ((1.0 / (t_1 / x)) - x)) / (x + 1.0);
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * t) - x tmp = 0 if z <= -3.9e+157: tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t)) elif z <= 5.4e+149: tmp = (((z * y) / t_1) - ((1.0 / (t_1 / x)) - x)) / (x + 1.0) else: tmp = (x + (y / t)) / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) tmp = 0.0 if (z <= -3.9e+157) tmp = Float64(Float64(x / Float64(x + 1.0)) + Float64(y / Float64(Float64(x + 1.0) * t))); elseif (z <= 5.4e+149) tmp = Float64(Float64(Float64(Float64(z * y) / t_1) - Float64(Float64(1.0 / Float64(t_1 / x)) - x)) / Float64(x + 1.0)); else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * t) - x; tmp = 0.0; if (z <= -3.9e+157) tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t)); elseif (z <= 5.4e+149) tmp = (((z * y) / t_1) - ((1.0 / (t_1 / x)) - x)) / (x + 1.0); else tmp = (x + (y / t)) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[z, -3.9e+157], N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(x + 1.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e+149], N[(N[(N[(N[(z * y), $MachinePrecision] / t$95$1), $MachinePrecision] - N[(N[(1.0 / N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
\mathbf{if}\;z \leq -3.9 \cdot 10^{+157}:\\
\;\;\;\;\frac{x}{x + 1} + \frac{y}{\left(x + 1\right) \cdot t}\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+149}:\\
\;\;\;\;\frac{\frac{z \cdot y}{t_1} - \left(\frac{1}{\frac{t_1}{x}} - x\right)}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
if z < -3.89999999999999971e157Initial program 70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in y around inf 70.6%
Taylor expanded in t around inf 87.9%
+-commutative87.9%
+-commutative87.9%
Simplified87.9%
if -3.89999999999999971e157 < z < 5.4000000000000002e149Initial program 97.8%
*-commutative97.8%
Simplified97.8%
+-commutative97.8%
div-sub97.8%
associate-+l-97.8%
Applied egg-rr97.8%
clear-num97.8%
inv-pow97.8%
Applied egg-rr97.8%
unpow-197.8%
Simplified97.8%
if 5.4000000000000002e149 < z Initial program 59.9%
*-commutative59.9%
Simplified59.9%
Taylor expanded in z around inf 99.9%
Final simplification96.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x)))
(if (<= z -1.65e+157)
(+ (/ x (+ x 1.0)) (/ y (* (+ x 1.0) t)))
(if (<= z 2.9e+150)
(/ (- (/ (* z y) t_1) (- (/ x t_1) x)) (+ x 1.0))
(/ (+ x (/ y t)) (+ x 1.0))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double tmp;
if (z <= -1.65e+157) {
tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t));
} else if (z <= 2.9e+150) {
tmp = (((z * y) / t_1) - ((x / t_1) - x)) / (x + 1.0);
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (z * t) - x
if (z <= (-1.65d+157)) then
tmp = (x / (x + 1.0d0)) + (y / ((x + 1.0d0) * t))
else if (z <= 2.9d+150) then
tmp = (((z * y) / t_1) - ((x / t_1) - x)) / (x + 1.0d0)
else
tmp = (x + (y / t)) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double tmp;
if (z <= -1.65e+157) {
tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t));
} else if (z <= 2.9e+150) {
tmp = (((z * y) / t_1) - ((x / t_1) - x)) / (x + 1.0);
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * t) - x tmp = 0 if z <= -1.65e+157: tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t)) elif z <= 2.9e+150: tmp = (((z * y) / t_1) - ((x / t_1) - x)) / (x + 1.0) else: tmp = (x + (y / t)) / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) tmp = 0.0 if (z <= -1.65e+157) tmp = Float64(Float64(x / Float64(x + 1.0)) + Float64(y / Float64(Float64(x + 1.0) * t))); elseif (z <= 2.9e+150) tmp = Float64(Float64(Float64(Float64(z * y) / t_1) - Float64(Float64(x / t_1) - x)) / Float64(x + 1.0)); else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * t) - x; tmp = 0.0; if (z <= -1.65e+157) tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t)); elseif (z <= 2.9e+150) tmp = (((z * y) / t_1) - ((x / t_1) - x)) / (x + 1.0); else tmp = (x + (y / t)) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[z, -1.65e+157], N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(x + 1.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+150], N[(N[(N[(N[(z * y), $MachinePrecision] / t$95$1), $MachinePrecision] - N[(N[(x / t$95$1), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+157}:\\
\;\;\;\;\frac{x}{x + 1} + \frac{y}{\left(x + 1\right) \cdot t}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+150}:\\
\;\;\;\;\frac{\frac{z \cdot y}{t_1} - \left(\frac{x}{t_1} - x\right)}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
if z < -1.6500000000000001e157Initial program 70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in y around inf 70.6%
Taylor expanded in t around inf 87.9%
+-commutative87.9%
+-commutative87.9%
Simplified87.9%
if -1.6500000000000001e157 < z < 2.90000000000000011e150Initial program 97.8%
*-commutative97.8%
Simplified97.8%
+-commutative97.8%
div-sub97.8%
associate-+l-97.8%
Applied egg-rr97.8%
if 2.90000000000000011e150 < z Initial program 59.9%
*-commutative59.9%
Simplified59.9%
Taylor expanded in z around inf 99.9%
Final simplification96.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* z y) (- (* z t) x))) (+ x 1.0))))
(if (<= z -1.6e+157)
(+ (/ x (+ x 1.0)) (/ y (* (+ x 1.0) t)))
(if (<= z -3.6e-211)
t_1
(if (<= z 2.7e-232)
(- 1.0 (/ y (/ x z)))
(if (<= z 2.1e+89) t_1 (/ (+ x (/ y t)) (+ x 1.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x + ((z * y) / ((z * t) - x))) / (x + 1.0);
double tmp;
if (z <= -1.6e+157) {
tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t));
} else if (z <= -3.6e-211) {
tmp = t_1;
} else if (z <= 2.7e-232) {
tmp = 1.0 - (y / (x / z));
} else if (z <= 2.1e+89) {
tmp = t_1;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x + ((z * y) / ((z * t) - x))) / (x + 1.0d0)
if (z <= (-1.6d+157)) then
tmp = (x / (x + 1.0d0)) + (y / ((x + 1.0d0) * t))
else if (z <= (-3.6d-211)) then
tmp = t_1
else if (z <= 2.7d-232) then
tmp = 1.0d0 - (y / (x / z))
else if (z <= 2.1d+89) then
tmp = t_1
else
tmp = (x + (y / t)) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x + ((z * y) / ((z * t) - x))) / (x + 1.0);
double tmp;
if (z <= -1.6e+157) {
tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t));
} else if (z <= -3.6e-211) {
tmp = t_1;
} else if (z <= 2.7e-232) {
tmp = 1.0 - (y / (x / z));
} else if (z <= 2.1e+89) {
tmp = t_1;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x + ((z * y) / ((z * t) - x))) / (x + 1.0) tmp = 0 if z <= -1.6e+157: tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t)) elif z <= -3.6e-211: tmp = t_1 elif z <= 2.7e-232: tmp = 1.0 - (y / (x / z)) elif z <= 2.1e+89: tmp = t_1 else: tmp = (x + (y / t)) / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x + Float64(Float64(z * y) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) tmp = 0.0 if (z <= -1.6e+157) tmp = Float64(Float64(x / Float64(x + 1.0)) + Float64(y / Float64(Float64(x + 1.0) * t))); elseif (z <= -3.6e-211) tmp = t_1; elseif (z <= 2.7e-232) tmp = Float64(1.0 - Float64(y / Float64(x / z))); elseif (z <= 2.1e+89) tmp = t_1; else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x + ((z * y) / ((z * t) - x))) / (x + 1.0); tmp = 0.0; if (z <= -1.6e+157) tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t)); elseif (z <= -3.6e-211) tmp = t_1; elseif (z <= 2.7e-232) tmp = 1.0 - (y / (x / z)); elseif (z <= 2.1e+89) tmp = t_1; else tmp = (x + (y / t)) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(z * y), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+157], N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(x + 1.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.6e-211], t$95$1, If[LessEqual[z, 2.7e-232], N[(1.0 - N[(y / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+89], t$95$1, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{z \cdot y}{z \cdot t - x}}{x + 1}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+157}:\\
\;\;\;\;\frac{x}{x + 1} + \frac{y}{\left(x + 1\right) \cdot t}\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-211}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-232}:\\
\;\;\;\;1 - \frac{y}{\frac{x}{z}}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+89}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
if z < -1.6e157Initial program 70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in y around inf 70.6%
Taylor expanded in t around inf 87.9%
+-commutative87.9%
+-commutative87.9%
Simplified87.9%
if -1.6e157 < z < -3.5999999999999999e-211 or 2.6999999999999999e-232 < z < 2.09999999999999986e89Initial program 98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in y around inf 90.1%
if -3.5999999999999999e-211 < z < 2.6999999999999999e-232Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around 0 91.8%
Taylor expanded in x around 0 91.9%
mul-1-neg91.9%
sub-neg91.9%
Simplified91.9%
Taylor expanded in t around 0 94.6%
mul-1-neg94.6%
associate-/l*94.6%
Simplified94.6%
if 2.09999999999999986e89 < z Initial program 68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in z around inf 94.2%
Final simplification91.3%
(FPCore (x y z t)
:precision binary64
(if (<= z -2.1e+157)
(+ (/ x (+ x 1.0)) (/ y (* (+ x 1.0) t)))
(if (<= z 5.2e+149)
(/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))
(/ (+ x (/ y t)) (+ x 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.1e+157) {
tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t));
} else if (z <= 5.2e+149) {
tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-2.1d+157)) then
tmp = (x / (x + 1.0d0)) + (y / ((x + 1.0d0) * t))
else if (z <= 5.2d+149) then
tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0d0)
else
tmp = (x + (y / t)) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.1e+157) {
tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t));
} else if (z <= 5.2e+149) {
tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.1e+157: tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t)) elif z <= 5.2e+149: tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0) else: tmp = (x + (y / t)) / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.1e+157) tmp = Float64(Float64(x / Float64(x + 1.0)) + Float64(y / Float64(Float64(x + 1.0) * t))); elseif (z <= 5.2e+149) tmp = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)); else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.1e+157) tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t)); elseif (z <= 5.2e+149) tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0); else tmp = (x + (y / t)) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.1e+157], N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(x + 1.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+149], N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+157}:\\
\;\;\;\;\frac{x}{x + 1} + \frac{y}{\left(x + 1\right) \cdot t}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+149}:\\
\;\;\;\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
if z < -2.1e157Initial program 70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in y around inf 70.6%
Taylor expanded in t around inf 87.9%
+-commutative87.9%
+-commutative87.9%
Simplified87.9%
if -2.1e157 < z < 5.19999999999999957e149Initial program 97.8%
if 5.19999999999999957e149 < z Initial program 59.9%
*-commutative59.9%
Simplified59.9%
Taylor expanded in z around inf 99.9%
Final simplification96.8%
(FPCore (x y z t)
:precision binary64
(if (<= x -29500000000.0)
1.0
(if (<= x 56.0)
(/ (+ x (- (/ y t) (/ (/ x t) z))) (+ x 1.0))
(- 1.0 (/ (/ z (+ x 1.0)) (/ x y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -29500000000.0) {
tmp = 1.0;
} else if (x <= 56.0) {
tmp = (x + ((y / t) - ((x / t) / z))) / (x + 1.0);
} else {
tmp = 1.0 - ((z / (x + 1.0)) / (x / y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-29500000000.0d0)) then
tmp = 1.0d0
else if (x <= 56.0d0) then
tmp = (x + ((y / t) - ((x / t) / z))) / (x + 1.0d0)
else
tmp = 1.0d0 - ((z / (x + 1.0d0)) / (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -29500000000.0) {
tmp = 1.0;
} else if (x <= 56.0) {
tmp = (x + ((y / t) - ((x / t) / z))) / (x + 1.0);
} else {
tmp = 1.0 - ((z / (x + 1.0)) / (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -29500000000.0: tmp = 1.0 elif x <= 56.0: tmp = (x + ((y / t) - ((x / t) / z))) / (x + 1.0) else: tmp = 1.0 - ((z / (x + 1.0)) / (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -29500000000.0) tmp = 1.0; elseif (x <= 56.0) tmp = Float64(Float64(x + Float64(Float64(y / t) - Float64(Float64(x / t) / z))) / Float64(x + 1.0)); else tmp = Float64(1.0 - Float64(Float64(z / Float64(x + 1.0)) / Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -29500000000.0) tmp = 1.0; elseif (x <= 56.0) tmp = (x + ((y / t) - ((x / t) / z))) / (x + 1.0); else tmp = 1.0 - ((z / (x + 1.0)) / (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -29500000000.0], 1.0, If[LessEqual[x, 56.0], N[(N[(x + N[(N[(y / t), $MachinePrecision] - N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(z / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -29500000000:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 56:\\
\;\;\;\;\frac{x + \left(\frac{y}{t} - \frac{\frac{x}{t}}{z}\right)}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{z}{x + 1}}{\frac{x}{y}}\\
\end{array}
\end{array}
if x < -2.95e10Initial program 88.2%
*-commutative88.2%
Simplified88.2%
+-commutative88.2%
div-sub88.2%
associate-+l-88.2%
Applied egg-rr88.2%
Taylor expanded in z around 0 95.6%
if -2.95e10 < x < 56Initial program 90.1%
*-commutative90.1%
Simplified90.1%
Taylor expanded in t around inf 78.2%
associate--l+78.2%
associate-/r*78.1%
Simplified78.1%
if 56 < x Initial program 88.5%
*-commutative88.5%
Simplified88.5%
Taylor expanded in z around 0 87.4%
Taylor expanded in y around inf 92.1%
Taylor expanded in z around 0 85.2%
mul-1-neg85.2%
distribute-lft-in85.2%
*-rgt-identity85.2%
unpow285.2%
*-commutative85.2%
associate-*r/92.1%
sub-neg92.1%
associate-*r/85.2%
*-commutative85.2%
*-rgt-identity85.2%
unpow285.2%
distribute-lft-in85.2%
times-frac92.1%
+-commutative92.1%
Simplified92.1%
*-commutative92.1%
clear-num92.1%
un-div-inv92.1%
Applied egg-rr92.1%
Final simplification85.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (+ x 1.0))))
(if (<= x -2.5e-62)
t_1
(if (<= x -2.5e-128)
(/ y t)
(if (<= x -3.5e-162)
(- x (/ x (* z t)))
(if (<= x 1.5e-104)
(/ y t)
(if (<= x 6.2e-38) (- 1.0 (* y (/ z x))) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (x + 1.0);
double tmp;
if (x <= -2.5e-62) {
tmp = t_1;
} else if (x <= -2.5e-128) {
tmp = y / t;
} else if (x <= -3.5e-162) {
tmp = x - (x / (z * t));
} else if (x <= 1.5e-104) {
tmp = y / t;
} else if (x <= 6.2e-38) {
tmp = 1.0 - (y * (z / x));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + 1.0d0)
if (x <= (-2.5d-62)) then
tmp = t_1
else if (x <= (-2.5d-128)) then
tmp = y / t
else if (x <= (-3.5d-162)) then
tmp = x - (x / (z * t))
else if (x <= 1.5d-104) then
tmp = y / t
else if (x <= 6.2d-38) then
tmp = 1.0d0 - (y * (z / x))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (x + 1.0);
double tmp;
if (x <= -2.5e-62) {
tmp = t_1;
} else if (x <= -2.5e-128) {
tmp = y / t;
} else if (x <= -3.5e-162) {
tmp = x - (x / (z * t));
} else if (x <= 1.5e-104) {
tmp = y / t;
} else if (x <= 6.2e-38) {
tmp = 1.0 - (y * (z / x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (x + 1.0) tmp = 0 if x <= -2.5e-62: tmp = t_1 elif x <= -2.5e-128: tmp = y / t elif x <= -3.5e-162: tmp = x - (x / (z * t)) elif x <= 1.5e-104: tmp = y / t elif x <= 6.2e-38: tmp = 1.0 - (y * (z / x)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(x + 1.0)) tmp = 0.0 if (x <= -2.5e-62) tmp = t_1; elseif (x <= -2.5e-128) tmp = Float64(y / t); elseif (x <= -3.5e-162) tmp = Float64(x - Float64(x / Float64(z * t))); elseif (x <= 1.5e-104) tmp = Float64(y / t); elseif (x <= 6.2e-38) tmp = Float64(1.0 - Float64(y * Float64(z / x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (x + 1.0); tmp = 0.0; if (x <= -2.5e-62) tmp = t_1; elseif (x <= -2.5e-128) tmp = y / t; elseif (x <= -3.5e-162) tmp = x - (x / (z * t)); elseif (x <= 1.5e-104) tmp = y / t; elseif (x <= 6.2e-38) tmp = 1.0 - (y * (z / x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5e-62], t$95$1, If[LessEqual[x, -2.5e-128], N[(y / t), $MachinePrecision], If[LessEqual[x, -3.5e-162], N[(x - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.5e-104], N[(y / t), $MachinePrecision], If[LessEqual[x, 6.2e-38], N[(1.0 - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + 1}\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{-62}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-128}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-162}:\\
\;\;\;\;x - \frac{x}{z \cdot t}\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{-104}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{-38}:\\
\;\;\;\;1 - y \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -2.5000000000000001e-62 or 6.19999999999999966e-38 < x Initial program 88.9%
*-commutative88.9%
Simplified88.9%
Taylor expanded in t around inf 86.0%
+-commutative86.0%
Simplified86.0%
if -2.5000000000000001e-62 < x < -2.5000000000000001e-128 or -3.4999999999999999e-162 < x < 1.5000000000000001e-104Initial program 88.0%
*-commutative88.0%
Simplified88.0%
+-commutative88.0%
div-sub88.1%
associate-+l-88.1%
Applied egg-rr88.1%
clear-num88.1%
inv-pow88.1%
Applied egg-rr88.1%
unpow-188.1%
Simplified88.1%
Taylor expanded in x around 0 67.0%
if -2.5000000000000001e-128 < x < -3.4999999999999999e-162Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 87.8%
Taylor expanded in t around inf 76.0%
mul-1-neg76.0%
unsub-neg76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in x around 0 75.8%
distribute-rgt-out--75.8%
*-lft-identity75.8%
*-commutative75.8%
associate-*l/76.0%
*-lft-identity76.0%
*-commutative76.0%
Simplified76.0%
if 1.5000000000000001e-104 < x < 6.19999999999999966e-38Initial program 93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in z around 0 51.6%
Taylor expanded in y around inf 52.6%
Taylor expanded in z around 0 58.5%
mul-1-neg58.5%
distribute-lft-in58.5%
*-rgt-identity58.5%
unpow258.5%
*-commutative58.5%
associate-*r/52.6%
sub-neg52.6%
associate-*r/58.5%
*-commutative58.5%
*-rgt-identity58.5%
unpow258.5%
distribute-lft-in58.5%
times-frac52.6%
+-commutative52.6%
Simplified52.6%
Taylor expanded in x around 0 58.5%
associate-*r/58.5%
Simplified58.5%
Final simplification77.9%
(FPCore (x y z t)
:precision binary64
(if (<= x -1.75e-62)
(/ x (+ x 1.0))
(if (<= x -2.1e-130)
(/ y t)
(if (<= x -1.3e-161)
(- x (/ x (* z t)))
(if (<= x 1.4e-104)
(/ y t)
(if (<= x 1.35e-16)
(- 1.0 (* y (/ z x)))
(/ 1.0 (/ (+ x 1.0) x))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.75e-62) {
tmp = x / (x + 1.0);
} else if (x <= -2.1e-130) {
tmp = y / t;
} else if (x <= -1.3e-161) {
tmp = x - (x / (z * t));
} else if (x <= 1.4e-104) {
tmp = y / t;
} else if (x <= 1.35e-16) {
tmp = 1.0 - (y * (z / x));
} else {
tmp = 1.0 / ((x + 1.0) / x);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-1.75d-62)) then
tmp = x / (x + 1.0d0)
else if (x <= (-2.1d-130)) then
tmp = y / t
else if (x <= (-1.3d-161)) then
tmp = x - (x / (z * t))
else if (x <= 1.4d-104) then
tmp = y / t
else if (x <= 1.35d-16) then
tmp = 1.0d0 - (y * (z / x))
else
tmp = 1.0d0 / ((x + 1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.75e-62) {
tmp = x / (x + 1.0);
} else if (x <= -2.1e-130) {
tmp = y / t;
} else if (x <= -1.3e-161) {
tmp = x - (x / (z * t));
} else if (x <= 1.4e-104) {
tmp = y / t;
} else if (x <= 1.35e-16) {
tmp = 1.0 - (y * (z / x));
} else {
tmp = 1.0 / ((x + 1.0) / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.75e-62: tmp = x / (x + 1.0) elif x <= -2.1e-130: tmp = y / t elif x <= -1.3e-161: tmp = x - (x / (z * t)) elif x <= 1.4e-104: tmp = y / t elif x <= 1.35e-16: tmp = 1.0 - (y * (z / x)) else: tmp = 1.0 / ((x + 1.0) / x) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.75e-62) tmp = Float64(x / Float64(x + 1.0)); elseif (x <= -2.1e-130) tmp = Float64(y / t); elseif (x <= -1.3e-161) tmp = Float64(x - Float64(x / Float64(z * t))); elseif (x <= 1.4e-104) tmp = Float64(y / t); elseif (x <= 1.35e-16) tmp = Float64(1.0 - Float64(y * Float64(z / x))); else tmp = Float64(1.0 / Float64(Float64(x + 1.0) / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.75e-62) tmp = x / (x + 1.0); elseif (x <= -2.1e-130) tmp = y / t; elseif (x <= -1.3e-161) tmp = x - (x / (z * t)); elseif (x <= 1.4e-104) tmp = y / t; elseif (x <= 1.35e-16) tmp = 1.0 - (y * (z / x)); else tmp = 1.0 / ((x + 1.0) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.75e-62], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.1e-130], N[(y / t), $MachinePrecision], If[LessEqual[x, -1.3e-161], N[(x - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.4e-104], N[(y / t), $MachinePrecision], If[LessEqual[x, 1.35e-16], N[(1.0 - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(x + 1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{-62}:\\
\;\;\;\;\frac{x}{x + 1}\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{-130}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq -1.3 \cdot 10^{-161}:\\
\;\;\;\;x - \frac{x}{z \cdot t}\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-104}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{-16}:\\
\;\;\;\;1 - y \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{x + 1}{x}}\\
\end{array}
\end{array}
if x < -1.7500000000000001e-62Initial program 88.6%
*-commutative88.6%
Simplified88.6%
Taylor expanded in t around inf 84.1%
+-commutative84.1%
Simplified84.1%
if -1.7500000000000001e-62 < x < -2.10000000000000002e-130 or -1.29999999999999998e-161 < x < 1.4e-104Initial program 88.0%
*-commutative88.0%
Simplified88.0%
+-commutative88.0%
div-sub88.1%
associate-+l-88.1%
Applied egg-rr88.1%
clear-num88.1%
inv-pow88.1%
Applied egg-rr88.1%
unpow-188.1%
Simplified88.1%
Taylor expanded in x around 0 67.0%
if -2.10000000000000002e-130 < x < -1.29999999999999998e-161Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 87.8%
Taylor expanded in t around inf 76.0%
mul-1-neg76.0%
unsub-neg76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in x around 0 75.8%
distribute-rgt-out--75.8%
*-lft-identity75.8%
*-commutative75.8%
associate-*l/76.0%
*-lft-identity76.0%
*-commutative76.0%
Simplified76.0%
if 1.4e-104 < x < 1.35e-16Initial program 93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in z around 0 51.6%
Taylor expanded in y around inf 52.6%
Taylor expanded in z around 0 58.5%
mul-1-neg58.5%
distribute-lft-in58.5%
*-rgt-identity58.5%
unpow258.5%
*-commutative58.5%
associate-*r/52.6%
sub-neg52.6%
associate-*r/58.5%
*-commutative58.5%
*-rgt-identity58.5%
unpow258.5%
distribute-lft-in58.5%
times-frac52.6%
+-commutative52.6%
Simplified52.6%
Taylor expanded in x around 0 58.5%
associate-*r/58.5%
Simplified58.5%
if 1.35e-16 < x Initial program 89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in t around inf 88.5%
+-commutative88.5%
Simplified88.5%
clear-num88.5%
inv-pow88.5%
Applied egg-rr88.5%
unpow-188.5%
Simplified88.5%
Final simplification77.9%
(FPCore (x y z t)
:precision binary64
(if (<= t -6.8e-103)
(/ (+ x (/ y t)) (+ x 1.0))
(if (<= t 4.3e-63)
(- 1.0 (/ (/ z (+ x 1.0)) (/ x y)))
(+ (/ x (+ x 1.0)) (/ y (* (+ x 1.0) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -6.8e-103) {
tmp = (x + (y / t)) / (x + 1.0);
} else if (t <= 4.3e-63) {
tmp = 1.0 - ((z / (x + 1.0)) / (x / y));
} else {
tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-6.8d-103)) then
tmp = (x + (y / t)) / (x + 1.0d0)
else if (t <= 4.3d-63) then
tmp = 1.0d0 - ((z / (x + 1.0d0)) / (x / y))
else
tmp = (x / (x + 1.0d0)) + (y / ((x + 1.0d0) * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -6.8e-103) {
tmp = (x + (y / t)) / (x + 1.0);
} else if (t <= 4.3e-63) {
tmp = 1.0 - ((z / (x + 1.0)) / (x / y));
} else {
tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -6.8e-103: tmp = (x + (y / t)) / (x + 1.0) elif t <= 4.3e-63: tmp = 1.0 - ((z / (x + 1.0)) / (x / y)) else: tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -6.8e-103) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); elseif (t <= 4.3e-63) tmp = Float64(1.0 - Float64(Float64(z / Float64(x + 1.0)) / Float64(x / y))); else tmp = Float64(Float64(x / Float64(x + 1.0)) + Float64(y / Float64(Float64(x + 1.0) * t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -6.8e-103) tmp = (x + (y / t)) / (x + 1.0); elseif (t <= 4.3e-63) tmp = 1.0 - ((z / (x + 1.0)) / (x / y)); else tmp = (x / (x + 1.0)) + (y / ((x + 1.0) * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -6.8e-103], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e-63], N[(1.0 - N[(N[(z / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(x + 1.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{-103}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-63}:\\
\;\;\;\;1 - \frac{\frac{z}{x + 1}}{\frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1} + \frac{y}{\left(x + 1\right) \cdot t}\\
\end{array}
\end{array}
if t < -6.80000000000000006e-103Initial program 89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in z around inf 85.5%
if -6.80000000000000006e-103 < t < 4.2999999999999999e-63Initial program 93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in z around 0 79.7%
Taylor expanded in y around inf 79.7%
Taylor expanded in z around 0 75.0%
mul-1-neg75.0%
distribute-lft-in75.0%
*-rgt-identity75.0%
unpow275.0%
*-commutative75.0%
associate-*r/79.7%
sub-neg79.7%
associate-*r/75.0%
*-commutative75.0%
*-rgt-identity75.0%
unpow275.0%
distribute-lft-in75.0%
times-frac80.8%
+-commutative80.8%
Simplified80.8%
*-commutative80.8%
clear-num80.7%
un-div-inv80.8%
Applied egg-rr80.8%
if 4.2999999999999999e-63 < t Initial program 85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in y around inf 78.4%
Taylor expanded in t around inf 85.3%
+-commutative85.3%
+-commutative85.3%
Simplified85.3%
Final simplification83.9%
(FPCore (x y z t) :precision binary64 (if (or (<= t -6.2e-103) (not (<= t 4e-64))) (/ (+ x (/ y t)) (+ x 1.0)) (- 1.0 (* (/ z (+ x 1.0)) (/ y x)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -6.2e-103) || !(t <= 4e-64)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - ((z / (x + 1.0)) * (y / x));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-6.2d-103)) .or. (.not. (t <= 4d-64))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = 1.0d0 - ((z / (x + 1.0d0)) * (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -6.2e-103) || !(t <= 4e-64)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - ((z / (x + 1.0)) * (y / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -6.2e-103) or not (t <= 4e-64): tmp = (x + (y / t)) / (x + 1.0) else: tmp = 1.0 - ((z / (x + 1.0)) * (y / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -6.2e-103) || !(t <= 4e-64)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(1.0 - Float64(Float64(z / Float64(x + 1.0)) * Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -6.2e-103) || ~((t <= 4e-64))) tmp = (x + (y / t)) / (x + 1.0); else tmp = 1.0 - ((z / (x + 1.0)) * (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -6.2e-103], N[Not[LessEqual[t, 4e-64]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(z / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{-103} \lor \neg \left(t \leq 4 \cdot 10^{-64}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{z}{x + 1} \cdot \frac{y}{x}\\
\end{array}
\end{array}
if t < -6.2000000000000003e-103 or 3.99999999999999986e-64 < t Initial program 87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in z around inf 85.4%
if -6.2000000000000003e-103 < t < 3.99999999999999986e-64Initial program 93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in z around 0 79.7%
Taylor expanded in y around inf 79.7%
Taylor expanded in z around 0 75.0%
mul-1-neg75.0%
distribute-lft-in75.0%
*-rgt-identity75.0%
unpow275.0%
*-commutative75.0%
associate-*r/79.7%
sub-neg79.7%
associate-*r/75.0%
*-commutative75.0%
*-rgt-identity75.0%
unpow275.0%
distribute-lft-in75.0%
times-frac80.8%
+-commutative80.8%
Simplified80.8%
Final simplification83.9%
(FPCore (x y z t) :precision binary64 (if (or (<= t -3.5e-103) (not (<= t 7.4e-62))) (/ (+ x (/ y t)) (+ x 1.0)) (- 1.0 (/ (/ z (+ x 1.0)) (/ x y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.5e-103) || !(t <= 7.4e-62)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - ((z / (x + 1.0)) / (x / y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-3.5d-103)) .or. (.not. (t <= 7.4d-62))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = 1.0d0 - ((z / (x + 1.0d0)) / (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.5e-103) || !(t <= 7.4e-62)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - ((z / (x + 1.0)) / (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -3.5e-103) or not (t <= 7.4e-62): tmp = (x + (y / t)) / (x + 1.0) else: tmp = 1.0 - ((z / (x + 1.0)) / (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -3.5e-103) || !(t <= 7.4e-62)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(1.0 - Float64(Float64(z / Float64(x + 1.0)) / Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -3.5e-103) || ~((t <= 7.4e-62))) tmp = (x + (y / t)) / (x + 1.0); else tmp = 1.0 - ((z / (x + 1.0)) / (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -3.5e-103], N[Not[LessEqual[t, 7.4e-62]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(z / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{-103} \lor \neg \left(t \leq 7.4 \cdot 10^{-62}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{z}{x + 1}}{\frac{x}{y}}\\
\end{array}
\end{array}
if t < -3.50000000000000016e-103 or 7.3999999999999996e-62 < t Initial program 87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in z around inf 85.4%
if -3.50000000000000016e-103 < t < 7.3999999999999996e-62Initial program 93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in z around 0 79.7%
Taylor expanded in y around inf 79.7%
Taylor expanded in z around 0 75.0%
mul-1-neg75.0%
distribute-lft-in75.0%
*-rgt-identity75.0%
unpow275.0%
*-commutative75.0%
associate-*r/79.7%
sub-neg79.7%
associate-*r/75.0%
*-commutative75.0%
*-rgt-identity75.0%
unpow275.0%
distribute-lft-in75.0%
times-frac80.8%
+-commutative80.8%
Simplified80.8%
*-commutative80.8%
clear-num80.7%
un-div-inv80.8%
Applied egg-rr80.8%
Final simplification83.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (+ x 1.0))))
(if (<= x -2.9e-62)
t_1
(if (<= x 1.4e-104)
(/ y t)
(if (<= x 3.9e-15) (- 1.0 (* y (/ z x))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x / (x + 1.0);
double tmp;
if (x <= -2.9e-62) {
tmp = t_1;
} else if (x <= 1.4e-104) {
tmp = y / t;
} else if (x <= 3.9e-15) {
tmp = 1.0 - (y * (z / x));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + 1.0d0)
if (x <= (-2.9d-62)) then
tmp = t_1
else if (x <= 1.4d-104) then
tmp = y / t
else if (x <= 3.9d-15) then
tmp = 1.0d0 - (y * (z / x))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (x + 1.0);
double tmp;
if (x <= -2.9e-62) {
tmp = t_1;
} else if (x <= 1.4e-104) {
tmp = y / t;
} else if (x <= 3.9e-15) {
tmp = 1.0 - (y * (z / x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (x + 1.0) tmp = 0 if x <= -2.9e-62: tmp = t_1 elif x <= 1.4e-104: tmp = y / t elif x <= 3.9e-15: tmp = 1.0 - (y * (z / x)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(x + 1.0)) tmp = 0.0 if (x <= -2.9e-62) tmp = t_1; elseif (x <= 1.4e-104) tmp = Float64(y / t); elseif (x <= 3.9e-15) tmp = Float64(1.0 - Float64(y * Float64(z / x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (x + 1.0); tmp = 0.0; if (x <= -2.9e-62) tmp = t_1; elseif (x <= 1.4e-104) tmp = y / t; elseif (x <= 3.9e-15) tmp = 1.0 - (y * (z / x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.9e-62], t$95$1, If[LessEqual[x, 1.4e-104], N[(y / t), $MachinePrecision], If[LessEqual[x, 3.9e-15], N[(1.0 - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + 1}\\
\mathbf{if}\;x \leq -2.9 \cdot 10^{-62}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-104}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{-15}:\\
\;\;\;\;1 - y \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -2.89999999999999986e-62 or 3.90000000000000026e-15 < x Initial program 88.9%
*-commutative88.9%
Simplified88.9%
Taylor expanded in t around inf 86.0%
+-commutative86.0%
Simplified86.0%
if -2.89999999999999986e-62 < x < 1.4e-104Initial program 89.1%
*-commutative89.1%
Simplified89.1%
+-commutative89.1%
div-sub89.1%
associate-+l-89.1%
Applied egg-rr89.1%
clear-num89.2%
inv-pow89.2%
Applied egg-rr89.2%
unpow-189.2%
Simplified89.2%
Taylor expanded in x around 0 61.6%
if 1.4e-104 < x < 3.90000000000000026e-15Initial program 93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in z around 0 51.6%
Taylor expanded in y around inf 52.6%
Taylor expanded in z around 0 58.5%
mul-1-neg58.5%
distribute-lft-in58.5%
*-rgt-identity58.5%
unpow258.5%
*-commutative58.5%
associate-*r/52.6%
sub-neg52.6%
associate-*r/58.5%
*-commutative58.5%
*-rgt-identity58.5%
unpow258.5%
distribute-lft-in58.5%
times-frac52.6%
+-commutative52.6%
Simplified52.6%
Taylor expanded in x around 0 58.5%
associate-*r/58.5%
Simplified58.5%
Final simplification75.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.7e-172) (not (<= z 2.1e-155))) (/ (+ x (/ y t)) (+ x 1.0)) (- 1.0 (/ y (/ x z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.7e-172) || !(z <= 2.1e-155)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - (y / (x / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-3.7d-172)) .or. (.not. (z <= 2.1d-155))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = 1.0d0 - (y / (x / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.7e-172) || !(z <= 2.1e-155)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - (y / (x / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.7e-172) or not (z <= 2.1e-155): tmp = (x + (y / t)) / (x + 1.0) else: tmp = 1.0 - (y / (x / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.7e-172) || !(z <= 2.1e-155)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(1.0 - Float64(y / Float64(x / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3.7e-172) || ~((z <= 2.1e-155))) tmp = (x + (y / t)) / (x + 1.0); else tmp = 1.0 - (y / (x / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.7e-172], N[Not[LessEqual[z, 2.1e-155]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{-172} \lor \neg \left(z \leq 2.1 \cdot 10^{-155}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{\frac{x}{z}}\\
\end{array}
\end{array}
if z < -3.70000000000000001e-172 or 2.1000000000000002e-155 < z Initial program 86.3%
*-commutative86.3%
Simplified86.3%
Taylor expanded in z around inf 80.2%
if -3.70000000000000001e-172 < z < 2.1000000000000002e-155Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 82.4%
Taylor expanded in x around 0 82.5%
mul-1-neg82.5%
sub-neg82.5%
Simplified82.5%
Taylor expanded in t around 0 86.1%
mul-1-neg86.1%
associate-/l*86.1%
Simplified86.1%
Final simplification81.5%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.6e-62) (not (<= x 8e-41))) (/ x (+ x 1.0)) (/ y t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.6e-62) || !(x <= 8e-41)) {
tmp = x / (x + 1.0);
} else {
tmp = y / t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-2.6d-62)) .or. (.not. (x <= 8d-41))) then
tmp = x / (x + 1.0d0)
else
tmp = y / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.6e-62) || !(x <= 8e-41)) {
tmp = x / (x + 1.0);
} else {
tmp = y / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2.6e-62) or not (x <= 8e-41): tmp = x / (x + 1.0) else: tmp = y / t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -2.6e-62) || !(x <= 8e-41)) tmp = Float64(x / Float64(x + 1.0)); else tmp = Float64(y / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -2.6e-62) || ~((x <= 8e-41))) tmp = x / (x + 1.0); else tmp = y / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.6e-62], N[Not[LessEqual[x, 8e-41]], $MachinePrecision]], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(y / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{-62} \lor \neg \left(x \leq 8 \cdot 10^{-41}\right):\\
\;\;\;\;\frac{x}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t}\\
\end{array}
\end{array}
if x < -2.5999999999999999e-62 or 8.00000000000000005e-41 < x Initial program 88.9%
*-commutative88.9%
Simplified88.9%
Taylor expanded in t around inf 85.4%
+-commutative85.4%
Simplified85.4%
if -2.5999999999999999e-62 < x < 8.00000000000000005e-41Initial program 89.7%
*-commutative89.7%
Simplified89.7%
+-commutative89.7%
div-sub89.7%
associate-+l-89.7%
Applied egg-rr89.7%
clear-num89.8%
inv-pow89.8%
Applied egg-rr89.8%
unpow-189.8%
Simplified89.8%
Taylor expanded in x around 0 56.3%
Final simplification73.5%
(FPCore (x y z t) :precision binary64 (if (<= x -0.1) 1.0 (if (<= x 1.5e-104) (/ y t) 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.1) {
tmp = 1.0;
} else if (x <= 1.5e-104) {
tmp = y / t;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-0.1d0)) then
tmp = 1.0d0
else if (x <= 1.5d-104) then
tmp = y / t
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.1) {
tmp = 1.0;
} else if (x <= 1.5e-104) {
tmp = y / t;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -0.1: tmp = 1.0 elif x <= 1.5e-104: tmp = y / t else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -0.1) tmp = 1.0; elseif (x <= 1.5e-104) tmp = Float64(y / t); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -0.1) tmp = 1.0; elseif (x <= 1.5e-104) tmp = y / t; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -0.1], 1.0, If[LessEqual[x, 1.5e-104], N[(y / t), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.1:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{-104}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -0.10000000000000001 or 1.5000000000000001e-104 < x Initial program 89.5%
*-commutative89.5%
Simplified89.5%
+-commutative89.5%
div-sub89.5%
associate-+l-89.5%
Applied egg-rr89.5%
Taylor expanded in z around 0 83.6%
if -0.10000000000000001 < x < 1.5000000000000001e-104Initial program 88.9%
*-commutative88.9%
Simplified88.9%
+-commutative88.9%
div-sub88.9%
associate-+l-88.9%
Applied egg-rr88.9%
clear-num89.0%
inv-pow89.0%
Applied egg-rr89.0%
unpow-189.0%
Simplified89.0%
Taylor expanded in x around 0 54.9%
Final simplification71.7%
(FPCore (x y z t) :precision binary64 (if (<= x -0.092) 1.0 (if (<= x 8.5e-80) x 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.092) {
tmp = 1.0;
} else if (x <= 8.5e-80) {
tmp = x;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-0.092d0)) then
tmp = 1.0d0
else if (x <= 8.5d-80) then
tmp = x
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.092) {
tmp = 1.0;
} else if (x <= 8.5e-80) {
tmp = x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -0.092: tmp = 1.0 elif x <= 8.5e-80: tmp = x else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -0.092) tmp = 1.0; elseif (x <= 8.5e-80) tmp = x; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -0.092) tmp = 1.0; elseif (x <= 8.5e-80) tmp = x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -0.092], 1.0, If[LessEqual[x, 8.5e-80], x, 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.092:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-80}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -0.091999999999999998 or 8.49999999999999939e-80 < x Initial program 89.4%
*-commutative89.4%
Simplified89.4%
+-commutative89.4%
div-sub89.4%
associate-+l-89.4%
Applied egg-rr89.4%
Taylor expanded in z around 0 84.6%
if -0.091999999999999998 < x < 8.49999999999999939e-80Initial program 89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in t around inf 24.8%
+-commutative24.8%
Simplified24.8%
Taylor expanded in x around 0 23.6%
Final simplification58.9%
(FPCore (x y z t) :precision binary64 1.0)
double code(double x, double y, double z, double t) {
return 1.0;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = 1.0d0
end function
public static double code(double x, double y, double z, double t) {
return 1.0;
}
def code(x, y, z, t): return 1.0
function code(x, y, z, t) return 1.0 end
function tmp = code(x, y, z, t) tmp = 1.0; end
code[x_, y_, z_, t_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 89.3%
*-commutative89.3%
Simplified89.3%
+-commutative89.3%
div-sub89.3%
associate-+l-89.3%
Applied egg-rr89.3%
Taylor expanded in z around 0 53.6%
Final simplification53.6%
(FPCore (x y z t) :precision binary64 (/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0);
}
def code(x, y, z, t): return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(y / Float64(t - Float64(x / z))) - Float64(x / Float64(Float64(t * z) - x)))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1}
\end{array}
herbie shell --seed 2023334
(FPCore (x y z t)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A"
:precision binary64
:herbie-target
(/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0))
(/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))