
(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 12 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 (- (* y z) x)) (t_2 (/ (+ x (/ t_1 (- (* z t) x))) (+ x 1.0))))
(if (<= t_2 -1e+73)
(/ (/ y (+ x 1.0)) (- t (/ x z)))
(if (<= t_2 5e+262)
(/ (+ x (/ 1.0 (- (/ t (/ t_1 z)) (/ x t_1)))) (+ x 1.0))
(/ (+ x (/ y t)) (+ x 1.0))))))
double code(double x, double y, double z, double t) {
double t_1 = (y * z) - x;
double t_2 = (x + (t_1 / ((z * t) - x))) / (x + 1.0);
double tmp;
if (t_2 <= -1e+73) {
tmp = (y / (x + 1.0)) / (t - (x / z));
} else if (t_2 <= 5e+262) {
tmp = (x + (1.0 / ((t / (t_1 / z)) - (x / t_1)))) / (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) :: t_2
real(8) :: tmp
t_1 = (y * z) - x
t_2 = (x + (t_1 / ((z * t) - x))) / (x + 1.0d0)
if (t_2 <= (-1d+73)) then
tmp = (y / (x + 1.0d0)) / (t - (x / z))
else if (t_2 <= 5d+262) then
tmp = (x + (1.0d0 / ((t / (t_1 / z)) - (x / t_1)))) / (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 = (y * z) - x;
double t_2 = (x + (t_1 / ((z * t) - x))) / (x + 1.0);
double tmp;
if (t_2 <= -1e+73) {
tmp = (y / (x + 1.0)) / (t - (x / z));
} else if (t_2 <= 5e+262) {
tmp = (x + (1.0 / ((t / (t_1 / z)) - (x / t_1)))) / (x + 1.0);
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y * z) - x t_2 = (x + (t_1 / ((z * t) - x))) / (x + 1.0) tmp = 0 if t_2 <= -1e+73: tmp = (y / (x + 1.0)) / (t - (x / z)) elif t_2 <= 5e+262: tmp = (x + (1.0 / ((t / (t_1 / z)) - (x / t_1)))) / (x + 1.0) else: tmp = (x + (y / t)) / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y * z) - x) t_2 = Float64(Float64(x + Float64(t_1 / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= -1e+73) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(t - Float64(x / z))); elseif (t_2 <= 5e+262) tmp = Float64(Float64(x + Float64(1.0 / Float64(Float64(t / Float64(t_1 / z)) - Float64(x / t_1)))) / 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 = (y * z) - x; t_2 = (x + (t_1 / ((z * t) - x))) / (x + 1.0); tmp = 0.0; if (t_2 <= -1e+73) tmp = (y / (x + 1.0)) / (t - (x / z)); elseif (t_2 <= 5e+262) tmp = (x + (1.0 / ((t / (t_1 / z)) - (x / t_1)))) / (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[(y * z), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(t$95$1 / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+73], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+262], N[(N[(x + N[(1.0 / N[(N[(t / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision] - N[(x / t$95$1), $MachinePrecision]), $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}
t_1 := y \cdot z - x\\
t_2 := \frac{x + \frac{t_1}{z \cdot t - x}}{x + 1}\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{+73}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{t - \frac{x}{z}}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;\frac{x + \frac{1}{\frac{t}{\frac{t_1}{z}} - \frac{x}{t_1}}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < -9.99999999999999983e72Initial program 69.0%
*-commutative69.0%
Simplified69.0%
clear-num68.9%
inv-pow68.9%
fma-neg68.9%
Applied egg-rr68.9%
unpow-168.9%
*-commutative68.9%
fma-neg68.9%
*-commutative68.9%
Simplified68.9%
div-inv68.9%
fma-neg68.9%
Applied egg-rr68.9%
Taylor expanded in t around 0 61.7%
+-commutative61.7%
mul-1-neg61.7%
unsub-neg61.7%
associate-/l*61.7%
Simplified61.7%
Taylor expanded in y around inf 89.2%
associate-/r*89.3%
+-commutative89.3%
Simplified89.3%
if -9.99999999999999983e72 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < 5.00000000000000008e262Initial program 99.3%
*-commutative99.3%
Simplified99.3%
clear-num99.3%
inv-pow99.3%
fma-neg99.3%
Applied egg-rr99.3%
unpow-199.3%
*-commutative99.3%
fma-neg99.3%
*-commutative99.3%
Simplified99.3%
div-inv99.2%
fma-neg99.2%
Applied egg-rr99.2%
Taylor expanded in t around 0 99.3%
+-commutative99.3%
mul-1-neg99.3%
unsub-neg99.3%
associate-/l*99.8%
Simplified99.8%
if 5.00000000000000008e262 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) Initial program 31.3%
*-commutative31.3%
Simplified31.3%
Taylor expanded in z around inf 96.4%
Final simplification98.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (+ x (/ (- (* y z) x) (- (* z t) x))) (+ x 1.0))))
(if (<= t_1 -1e+83)
(/ (/ y (+ x 1.0)) (- t (/ x z)))
(if (<= t_1 5e+262) t_1 (/ (+ x (/ y t)) (+ x 1.0))))))
double code(double x, double y, double z, double t) {
double t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
double tmp;
if (t_1 <= -1e+83) {
tmp = (y / (x + 1.0)) / (t - (x / z));
} else if (t_1 <= 5e+262) {
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 + (((y * z) - x) / ((z * t) - x))) / (x + 1.0d0)
if (t_1 <= (-1d+83)) then
tmp = (y / (x + 1.0d0)) / (t - (x / z))
else if (t_1 <= 5d+262) 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 + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
double tmp;
if (t_1 <= -1e+83) {
tmp = (y / (x + 1.0)) / (t - (x / z));
} else if (t_1 <= 5e+262) {
tmp = t_1;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0) tmp = 0 if t_1 <= -1e+83: tmp = (y / (x + 1.0)) / (t - (x / z)) elif t_1 <= 5e+262: 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(Float64(y * z) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_1 <= -1e+83) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(t - Float64(x / z))); elseif (t_1 <= 5e+262) 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 + (((y * z) - x) / ((z * t) - x))) / (x + 1.0); tmp = 0.0; if (t_1 <= -1e+83) tmp = (y / (x + 1.0)) / (t - (x / z)); elseif (t_1 <= 5e+262) 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[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+83], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+262], 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{y \cdot z - x}{z \cdot t - x}}{x + 1}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+83}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{t - \frac{x}{z}}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < -1.00000000000000003e83Initial program 67.8%
*-commutative67.8%
Simplified67.8%
clear-num67.8%
inv-pow67.8%
fma-neg67.8%
Applied egg-rr67.8%
unpow-167.8%
*-commutative67.8%
fma-neg67.8%
*-commutative67.8%
Simplified67.8%
div-inv67.7%
fma-neg67.7%
Applied egg-rr67.7%
Taylor expanded in t around 0 60.3%
+-commutative60.3%
mul-1-neg60.3%
unsub-neg60.3%
associate-/l*60.4%
Simplified60.4%
Taylor expanded in y around inf 88.8%
associate-/r*88.9%
+-commutative88.9%
Simplified88.9%
if -1.00000000000000003e83 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < 5.00000000000000008e262Initial program 99.3%
if 5.00000000000000008e262 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) Initial program 31.3%
*-commutative31.3%
Simplified31.3%
Taylor expanded in z around inf 96.4%
Final simplification97.9%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.6e-110) (not (<= t 2.25e-104))) (/ (+ x (/ y t)) (+ x 1.0)) (- 1.0 (* (/ y x) (/ z (+ x 1.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.6e-110) || !(t <= 2.25e-104)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - ((y / x) * (z / (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 ((t <= (-2.6d-110)) .or. (.not. (t <= 2.25d-104))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = 1.0d0 - ((y / x) * (z / (x + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.6e-110) || !(t <= 2.25e-104)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - ((y / x) * (z / (x + 1.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.6e-110) or not (t <= 2.25e-104): tmp = (x + (y / t)) / (x + 1.0) else: tmp = 1.0 - ((y / x) * (z / (x + 1.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.6e-110) || !(t <= 2.25e-104)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(1.0 - Float64(Float64(y / x) * Float64(z / Float64(x + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.6e-110) || ~((t <= 2.25e-104))) tmp = (x + (y / t)) / (x + 1.0); else tmp = 1.0 - ((y / x) * (z / (x + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.6e-110], N[Not[LessEqual[t, 2.25e-104]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(y / x), $MachinePrecision] * N[(z / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{-110} \lor \neg \left(t \leq 2.25 \cdot 10^{-104}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{x} \cdot \frac{z}{x + 1}\\
\end{array}
\end{array}
if t < -2.5999999999999999e-110 or 2.2499999999999999e-104 < t Initial program 82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in z around inf 86.4%
if -2.5999999999999999e-110 < t < 2.2499999999999999e-104Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 80.8%
associate-+r+80.8%
mul-1-neg80.8%
unsub-neg80.8%
+-commutative80.8%
associate-/l*80.7%
+-commutative80.7%
Simplified80.7%
Taylor expanded in y around 0 80.8%
mul-1-neg80.8%
sub-neg80.8%
times-frac76.5%
+-commutative76.5%
Simplified76.5%
Final simplification83.1%
(FPCore (x y z t) :precision binary64 (if (or (<= t -3.5e-111) (not (<= t 2.65e-108))) (/ (+ x (/ y t)) (+ x 1.0)) (- 1.0 (/ (/ y (/ x z)) (+ x 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.5e-111) || !(t <= 2.65e-108)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - ((y / (x / z)) / (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 ((t <= (-3.5d-111)) .or. (.not. (t <= 2.65d-108))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = 1.0d0 - ((y / (x / z)) / (x + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.5e-111) || !(t <= 2.65e-108)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - ((y / (x / z)) / (x + 1.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -3.5e-111) or not (t <= 2.65e-108): tmp = (x + (y / t)) / (x + 1.0) else: tmp = 1.0 - ((y / (x / z)) / (x + 1.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -3.5e-111) || !(t <= 2.65e-108)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(1.0 - Float64(Float64(y / Float64(x / z)) / Float64(x + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -3.5e-111) || ~((t <= 2.65e-108))) tmp = (x + (y / t)) / (x + 1.0); else tmp = 1.0 - ((y / (x / z)) / (x + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -3.5e-111], N[Not[LessEqual[t, 2.65e-108]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(y / N[(x / z), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{-111} \lor \neg \left(t \leq 2.65 \cdot 10^{-108}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{y}{\frac{x}{z}}}{x + 1}\\
\end{array}
\end{array}
if t < -3.5e-111 or 2.64999999999999994e-108 < t Initial program 82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in z around inf 86.4%
if -3.5e-111 < t < 2.64999999999999994e-108Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 80.8%
associate-+r+80.8%
mul-1-neg80.8%
unsub-neg80.8%
+-commutative80.8%
associate-/l*80.7%
+-commutative80.7%
Simplified80.7%
div-sub80.7%
pow180.7%
pow180.7%
pow-div80.7%
metadata-eval80.7%
metadata-eval80.7%
Applied egg-rr80.7%
Final simplification84.5%
(FPCore (x y z t) :precision binary64 (if (or (<= t -5.2e-108) (not (<= t 5.2e-107))) (/ (+ x (/ y t)) (+ x 1.0)) (- 1.0 (/ (/ (* y z) x) (+ x 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -5.2e-108) || !(t <= 5.2e-107)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - (((y * z) / x) / (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 ((t <= (-5.2d-108)) .or. (.not. (t <= 5.2d-107))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = 1.0d0 - (((y * z) / x) / (x + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -5.2e-108) || !(t <= 5.2e-107)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - (((y * z) / x) / (x + 1.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -5.2e-108) or not (t <= 5.2e-107): tmp = (x + (y / t)) / (x + 1.0) else: tmp = 1.0 - (((y * z) / x) / (x + 1.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -5.2e-108) || !(t <= 5.2e-107)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(1.0 - Float64(Float64(Float64(y * z) / x) / Float64(x + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -5.2e-108) || ~((t <= 5.2e-107))) tmp = (x + (y / t)) / (x + 1.0); else tmp = 1.0 - (((y * z) / x) / (x + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -5.2e-108], N[Not[LessEqual[t, 5.2e-107]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{-108} \lor \neg \left(t \leq 5.2 \cdot 10^{-107}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{y \cdot z}{x}}{x + 1}\\
\end{array}
\end{array}
if t < -5.19999999999999968e-108 or 5.2000000000000001e-107 < t Initial program 82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in z around inf 86.4%
if -5.19999999999999968e-108 < t < 5.2000000000000001e-107Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 80.8%
associate-+r+80.8%
mul-1-neg80.8%
unsub-neg80.8%
+-commutative80.8%
associate-/l*80.7%
+-commutative80.7%
Simplified80.7%
div-sub80.7%
pow180.7%
pow180.7%
pow-div80.7%
metadata-eval80.7%
metadata-eval80.7%
Applied egg-rr80.7%
Taylor expanded in y around 0 80.8%
Final simplification84.5%
(FPCore (x y z t) :precision binary64 (if (or (<= t -5.4e-111) (not (<= t 4.8e-106))) (/ (+ x (/ y t)) (+ x 1.0)) (- 1.0 (/ (* y z) x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -5.4e-111) || !(t <= 4.8e-106)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - ((y * z) / 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 <= (-5.4d-111)) .or. (.not. (t <= 4.8d-106))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = 1.0d0 - ((y * z) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -5.4e-111) || !(t <= 4.8e-106)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - ((y * z) / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -5.4e-111) or not (t <= 4.8e-106): tmp = (x + (y / t)) / (x + 1.0) else: tmp = 1.0 - ((y * z) / x) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -5.4e-111) || !(t <= 4.8e-106)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(1.0 - Float64(Float64(y * z) / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -5.4e-111) || ~((t <= 4.8e-106))) tmp = (x + (y / t)) / (x + 1.0); else tmp = 1.0 - ((y * z) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -5.4e-111], N[Not[LessEqual[t, 4.8e-106]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.4 \cdot 10^{-111} \lor \neg \left(t \leq 4.8 \cdot 10^{-106}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y \cdot z}{x}\\
\end{array}
\end{array}
if t < -5.39999999999999977e-111 or 4.7999999999999995e-106 < t Initial program 82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in z around inf 86.4%
if -5.39999999999999977e-111 < t < 4.7999999999999995e-106Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 80.8%
associate-+r+80.8%
mul-1-neg80.8%
unsub-neg80.8%
+-commutative80.8%
associate-/l*80.7%
+-commutative80.7%
Simplified80.7%
div-sub80.7%
pow180.7%
pow180.7%
pow-div80.7%
metadata-eval80.7%
metadata-eval80.7%
Applied egg-rr80.7%
Taylor expanded in x around 0 71.9%
Final simplification81.6%
(FPCore (x y z t) :precision binary64 (if (<= x -2.9e-75) 1.0 (if (<= x 1.45e-75) (/ y t) (/ 1.0 (/ (+ x 1.0) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.9e-75) {
tmp = 1.0;
} else if (x <= 1.45e-75) {
tmp = y / t;
} 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 <= (-2.9d-75)) then
tmp = 1.0d0
else if (x <= 1.45d-75) then
tmp = y / t
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 <= -2.9e-75) {
tmp = 1.0;
} else if (x <= 1.45e-75) {
tmp = y / t;
} else {
tmp = 1.0 / ((x + 1.0) / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -2.9e-75: tmp = 1.0 elif x <= 1.45e-75: tmp = y / t else: tmp = 1.0 / ((x + 1.0) / x) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -2.9e-75) tmp = 1.0; elseif (x <= 1.45e-75) tmp = Float64(y / t); 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 <= -2.9e-75) tmp = 1.0; elseif (x <= 1.45e-75) tmp = y / t; else tmp = 1.0 / ((x + 1.0) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.9e-75], 1.0, If[LessEqual[x, 1.45e-75], N[(y / t), $MachinePrecision], N[(1.0 / N[(N[(x + 1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{-75}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-75}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{x + 1}{x}}\\
\end{array}
\end{array}
if x < -2.9000000000000002e-75Initial program 89.1%
*-commutative89.1%
Simplified89.1%
clear-num89.1%
inv-pow89.1%
fma-neg89.1%
Applied egg-rr89.1%
unpow-189.1%
*-commutative89.1%
fma-neg89.1%
*-commutative89.1%
Simplified89.1%
div-inv89.0%
fma-neg89.0%
Applied egg-rr89.0%
Taylor expanded in t around 0 87.7%
+-commutative87.7%
mul-1-neg87.7%
unsub-neg87.7%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in x around inf 78.3%
if -2.9000000000000002e-75 < x < 1.4500000000000001e-75Initial program 89.3%
*-commutative89.3%
Simplified89.3%
clear-num89.2%
inv-pow89.2%
fma-neg89.2%
Applied egg-rr89.2%
unpow-189.2%
*-commutative89.2%
fma-neg89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in x around 0 56.9%
if 1.4500000000000001e-75 < x Initial program 86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in t around inf 80.2%
+-commutative80.2%
Simplified80.2%
clear-num80.2%
inv-pow80.2%
Applied egg-rr80.2%
unpow-180.2%
Simplified80.2%
Final simplification71.0%
(FPCore (x y z t) :precision binary64 (if (<= x -3e-75) (- 1.0 (* (/ y x) (/ z x))) (if (<= x 8.8e-75) (/ y t) (/ 1.0 (/ (+ x 1.0) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3e-75) {
tmp = 1.0 - ((y / x) * (z / x));
} else if (x <= 8.8e-75) {
tmp = y / t;
} 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 <= (-3d-75)) then
tmp = 1.0d0 - ((y / x) * (z / x))
else if (x <= 8.8d-75) then
tmp = y / t
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 <= -3e-75) {
tmp = 1.0 - ((y / x) * (z / x));
} else if (x <= 8.8e-75) {
tmp = y / t;
} else {
tmp = 1.0 / ((x + 1.0) / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3e-75: tmp = 1.0 - ((y / x) * (z / x)) elif x <= 8.8e-75: tmp = y / t else: tmp = 1.0 / ((x + 1.0) / x) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3e-75) tmp = Float64(1.0 - Float64(Float64(y / x) * Float64(z / x))); elseif (x <= 8.8e-75) tmp = Float64(y / t); 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 <= -3e-75) tmp = 1.0 - ((y / x) * (z / x)); elseif (x <= 8.8e-75) tmp = y / t; else tmp = 1.0 / ((x + 1.0) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3e-75], N[(1.0 - N[(N[(y / x), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.8e-75], N[(y / t), $MachinePrecision], N[(1.0 / N[(N[(x + 1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{-75}:\\
\;\;\;\;1 - \frac{y}{x} \cdot \frac{z}{x}\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{-75}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{x + 1}{x}}\\
\end{array}
\end{array}
if x < -2.9999999999999999e-75Initial program 89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in t around 0 79.2%
associate-+r+79.2%
mul-1-neg79.2%
unsub-neg79.2%
+-commutative79.2%
associate-/l*81.5%
+-commutative81.5%
Simplified81.5%
Taylor expanded in y around 0 79.2%
mul-1-neg79.2%
sub-neg79.2%
times-frac81.5%
+-commutative81.5%
Simplified81.5%
Taylor expanded in x around inf 78.8%
if -2.9999999999999999e-75 < x < 8.80000000000000022e-75Initial program 89.3%
*-commutative89.3%
Simplified89.3%
clear-num89.2%
inv-pow89.2%
fma-neg89.2%
Applied egg-rr89.2%
unpow-189.2%
*-commutative89.2%
fma-neg89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in x around 0 56.9%
if 8.80000000000000022e-75 < x Initial program 86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in t around inf 80.2%
+-commutative80.2%
Simplified80.2%
clear-num80.2%
inv-pow80.2%
Applied egg-rr80.2%
unpow-180.2%
Simplified80.2%
Final simplification71.2%
(FPCore (x y z t) :precision binary64 (if (<= x -4.3e-76) 1.0 (if (<= x 2.6e-72) (/ y t) (/ x (+ x 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.3e-76) {
tmp = 1.0;
} else if (x <= 2.6e-72) {
tmp = y / t;
} else {
tmp = x / (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 (x <= (-4.3d-76)) then
tmp = 1.0d0
else if (x <= 2.6d-72) then
tmp = y / t
else
tmp = x / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.3e-76) {
tmp = 1.0;
} else if (x <= 2.6e-72) {
tmp = y / t;
} else {
tmp = x / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4.3e-76: tmp = 1.0 elif x <= 2.6e-72: tmp = y / t else: tmp = x / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4.3e-76) tmp = 1.0; elseif (x <= 2.6e-72) tmp = Float64(y / t); else tmp = Float64(x / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -4.3e-76) tmp = 1.0; elseif (x <= 2.6e-72) tmp = y / t; else tmp = x / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4.3e-76], 1.0, If[LessEqual[x, 2.6e-72], N[(y / t), $MachinePrecision], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.3 \cdot 10^{-76}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{-72}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1}\\
\end{array}
\end{array}
if x < -4.2999999999999999e-76Initial program 89.1%
*-commutative89.1%
Simplified89.1%
clear-num89.1%
inv-pow89.1%
fma-neg89.1%
Applied egg-rr89.1%
unpow-189.1%
*-commutative89.1%
fma-neg89.1%
*-commutative89.1%
Simplified89.1%
div-inv89.0%
fma-neg89.0%
Applied egg-rr89.0%
Taylor expanded in t around 0 87.7%
+-commutative87.7%
mul-1-neg87.7%
unsub-neg87.7%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in x around inf 78.3%
if -4.2999999999999999e-76 < x < 2.59999999999999996e-72Initial program 89.3%
*-commutative89.3%
Simplified89.3%
clear-num89.2%
inv-pow89.2%
fma-neg89.2%
Applied egg-rr89.2%
unpow-189.2%
*-commutative89.2%
fma-neg89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in x around 0 56.9%
if 2.59999999999999996e-72 < x Initial program 86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in t around inf 80.2%
+-commutative80.2%
Simplified80.2%
Final simplification71.0%
(FPCore (x y z t) :precision binary64 (if (<= x -8.4e-75) 1.0 (if (<= x 2.7e-70) (/ y t) 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -8.4e-75) {
tmp = 1.0;
} else if (x <= 2.7e-70) {
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 <= (-8.4d-75)) then
tmp = 1.0d0
else if (x <= 2.7d-70) 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 <= -8.4e-75) {
tmp = 1.0;
} else if (x <= 2.7e-70) {
tmp = y / t;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -8.4e-75: tmp = 1.0 elif x <= 2.7e-70: tmp = y / t else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -8.4e-75) tmp = 1.0; elseif (x <= 2.7e-70) 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 <= -8.4e-75) tmp = 1.0; elseif (x <= 2.7e-70) tmp = y / t; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -8.4e-75], 1.0, If[LessEqual[x, 2.7e-70], N[(y / t), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.4 \cdot 10^{-75}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{-70}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -8.4000000000000004e-75 or 2.7000000000000001e-70 < x Initial program 87.7%
*-commutative87.7%
Simplified87.7%
clear-num87.7%
inv-pow87.7%
fma-neg87.7%
Applied egg-rr87.7%
unpow-187.7%
*-commutative87.7%
fma-neg87.7%
*-commutative87.7%
Simplified87.7%
div-inv87.7%
fma-neg87.7%
Applied egg-rr87.7%
Taylor expanded in t around 0 87.1%
+-commutative87.1%
mul-1-neg87.1%
unsub-neg87.1%
associate-/l*87.2%
Simplified87.2%
Taylor expanded in x around inf 78.9%
if -8.4000000000000004e-75 < x < 2.7000000000000001e-70Initial program 89.3%
*-commutative89.3%
Simplified89.3%
clear-num89.2%
inv-pow89.2%
fma-neg89.2%
Applied egg-rr89.2%
unpow-189.2%
*-commutative89.2%
fma-neg89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in x around 0 56.9%
Final simplification70.8%
(FPCore (x y z t) :precision binary64 (if (<= x -3.2e-6) 1.0 (if (<= x 1.8e-36) x 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.2e-6) {
tmp = 1.0;
} else if (x <= 1.8e-36) {
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 <= (-3.2d-6)) then
tmp = 1.0d0
else if (x <= 1.8d-36) 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 <= -3.2e-6) {
tmp = 1.0;
} else if (x <= 1.8e-36) {
tmp = x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.2e-6: tmp = 1.0 elif x <= 1.8e-36: tmp = x else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.2e-6) tmp = 1.0; elseif (x <= 1.8e-36) tmp = x; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.2e-6) tmp = 1.0; elseif (x <= 1.8e-36) tmp = x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.2e-6], 1.0, If[LessEqual[x, 1.8e-36], x, 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{-6}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-36}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -3.1999999999999999e-6 or 1.80000000000000016e-36 < x Initial program 87.0%
*-commutative87.0%
Simplified87.0%
clear-num87.0%
inv-pow87.0%
fma-neg87.0%
Applied egg-rr87.0%
unpow-187.0%
*-commutative87.0%
fma-neg87.0%
*-commutative87.0%
Simplified87.0%
div-inv87.0%
fma-neg87.0%
Applied egg-rr87.0%
Taylor expanded in t around 0 87.0%
+-commutative87.0%
mul-1-neg87.0%
unsub-neg87.0%
associate-/l*87.1%
Simplified87.1%
Taylor expanded in x around inf 85.1%
if -3.1999999999999999e-6 < x < 1.80000000000000016e-36Initial program 90.0%
*-commutative90.0%
Simplified90.0%
Taylor expanded in t around inf 23.8%
+-commutative23.8%
Simplified23.8%
Taylor expanded in x around 0 23.0%
Final simplification57.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 88.3%
*-commutative88.3%
Simplified88.3%
clear-num88.3%
inv-pow88.3%
fma-neg88.3%
Applied egg-rr88.3%
unpow-188.3%
*-commutative88.3%
fma-neg88.3%
*-commutative88.3%
Simplified88.3%
div-inv88.2%
fma-neg88.2%
Applied egg-rr88.2%
Taylor expanded in t around 0 87.5%
+-commutative87.5%
mul-1-neg87.5%
unsub-neg87.5%
associate-/l*88.0%
Simplified88.0%
Taylor expanded in x around inf 52.7%
Final simplification52.7%
(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 2024018
(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)))