
(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y): return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y) return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0))) end
function tmp = code(x, y) tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0)); end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y): return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y) return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0))) end
function tmp = code(x, y) tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0)); end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}
(FPCore (x y) :precision binary64 (* (/ x (+ y (+ x 1.0))) (/ (/ y (+ x y)) (+ x y))))
double code(double x, double y) {
return (x / (y + (x + 1.0))) * ((y / (x + y)) / (x + y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x / (y + (x + 1.0d0))) * ((y / (x + y)) / (x + y))
end function
public static double code(double x, double y) {
return (x / (y + (x + 1.0))) * ((y / (x + y)) / (x + y));
}
def code(x, y): return (x / (y + (x + 1.0))) * ((y / (x + y)) / (x + y))
function code(x, y) return Float64(Float64(x / Float64(y + Float64(x + 1.0))) * Float64(Float64(y / Float64(x + y)) / Float64(x + y))) end
function tmp = code(x, y) tmp = (x / (y + (x + 1.0))) * ((y / (x + y)) / (x + y)); end
code[x_, y_] := N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y + \left(x + 1\right)} \cdot \frac{\frac{y}{x + y}}{x + y}
\end{array}
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (/ y (+ x y)) (+ x (+ y (+ y 1.0))))))
(if (<= x -1.66e-49)
t_0
(if (<= x -3.7e-91)
(* (/ y (* (+ x y) (+ x y))) (/ x y))
(if (<= x -1.7e-143) t_0 (/ (/ x y) (+ x (+ y 1.0))))))))
double code(double x, double y) {
double t_0 = (y / (x + y)) / (x + (y + (y + 1.0)));
double tmp;
if (x <= -1.66e-49) {
tmp = t_0;
} else if (x <= -3.7e-91) {
tmp = (y / ((x + y) * (x + y))) * (x / y);
} else if (x <= -1.7e-143) {
tmp = t_0;
} else {
tmp = (x / y) / (x + (y + 1.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (y / (x + y)) / (x + (y + (y + 1.0d0)))
if (x <= (-1.66d-49)) then
tmp = t_0
else if (x <= (-3.7d-91)) then
tmp = (y / ((x + y) * (x + y))) * (x / y)
else if (x <= (-1.7d-143)) then
tmp = t_0
else
tmp = (x / y) / (x + (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (y / (x + y)) / (x + (y + (y + 1.0)));
double tmp;
if (x <= -1.66e-49) {
tmp = t_0;
} else if (x <= -3.7e-91) {
tmp = (y / ((x + y) * (x + y))) * (x / y);
} else if (x <= -1.7e-143) {
tmp = t_0;
} else {
tmp = (x / y) / (x + (y + 1.0));
}
return tmp;
}
def code(x, y): t_0 = (y / (x + y)) / (x + (y + (y + 1.0))) tmp = 0 if x <= -1.66e-49: tmp = t_0 elif x <= -3.7e-91: tmp = (y / ((x + y) * (x + y))) * (x / y) elif x <= -1.7e-143: tmp = t_0 else: tmp = (x / y) / (x + (y + 1.0)) return tmp
function code(x, y) t_0 = Float64(Float64(y / Float64(x + y)) / Float64(x + Float64(y + Float64(y + 1.0)))) tmp = 0.0 if (x <= -1.66e-49) tmp = t_0; elseif (x <= -3.7e-91) tmp = Float64(Float64(y / Float64(Float64(x + y) * Float64(x + y))) * Float64(x / y)); elseif (x <= -1.7e-143) tmp = t_0; else tmp = Float64(Float64(x / y) / Float64(x + Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) t_0 = (y / (x + y)) / (x + (y + (y + 1.0))); tmp = 0.0; if (x <= -1.66e-49) tmp = t_0; elseif (x <= -3.7e-91) tmp = (y / ((x + y) * (x + y))) * (x / y); elseif (x <= -1.7e-143) tmp = t_0; else tmp = (x / y) / (x + (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.66e-49], t$95$0, If[LessEqual[x, -3.7e-91], N[(N[(y / N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.7e-143], t$95$0, N[(N[(x / y), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{y}{x + y}}{x + \left(y + \left(y + 1\right)\right)}\\
\mathbf{if}\;x \leq -1.66 \cdot 10^{-49}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -3.7 \cdot 10^{-91}:\\
\;\;\;\;\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{y}\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-143}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\
\end{array}
\end{array}
(FPCore (x y)
:precision binary64
(if (<= x -2.15e+104)
(/ (/ y (+ x y)) (+ x (+ y (+ y 1.0))))
(if (<= x -1.55e-143)
(* (/ y (* (+ x y) (+ x y))) (/ x (+ x 1.0)))
(/ (/ x y) (+ x (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (x <= -2.15e+104) {
tmp = (y / (x + y)) / (x + (y + (y + 1.0)));
} else if (x <= -1.55e-143) {
tmp = (y / ((x + y) * (x + y))) * (x / (x + 1.0));
} else {
tmp = (x / y) / (x + (y + 1.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-2.15d+104)) then
tmp = (y / (x + y)) / (x + (y + (y + 1.0d0)))
else if (x <= (-1.55d-143)) then
tmp = (y / ((x + y) * (x + y))) * (x / (x + 1.0d0))
else
tmp = (x / y) / (x + (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -2.15e+104) {
tmp = (y / (x + y)) / (x + (y + (y + 1.0)));
} else if (x <= -1.55e-143) {
tmp = (y / ((x + y) * (x + y))) * (x / (x + 1.0));
} else {
tmp = (x / y) / (x + (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -2.15e+104: tmp = (y / (x + y)) / (x + (y + (y + 1.0))) elif x <= -1.55e-143: tmp = (y / ((x + y) * (x + y))) * (x / (x + 1.0)) else: tmp = (x / y) / (x + (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= -2.15e+104) tmp = Float64(Float64(y / Float64(x + y)) / Float64(x + Float64(y + Float64(y + 1.0)))); elseif (x <= -1.55e-143) tmp = Float64(Float64(y / Float64(Float64(x + y) * Float64(x + y))) * Float64(x / Float64(x + 1.0))); else tmp = Float64(Float64(x / y) / Float64(x + Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -2.15e+104) tmp = (y / (x + y)) / (x + (y + (y + 1.0))); elseif (x <= -1.55e-143) tmp = (y / ((x + y) * (x + y))) * (x / (x + 1.0)); else tmp = (x / y) / (x + (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -2.15e+104], N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.55e-143], N[(N[(y / N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.15 \cdot 10^{+104}:\\
\;\;\;\;\frac{\frac{y}{x + y}}{x + \left(y + \left(y + 1\right)\right)}\\
\mathbf{elif}\;x \leq -1.55 \cdot 10^{-143}:\\
\;\;\;\;\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\
\end{array}
\end{array}
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (* y (+ y 1.0)))) (t_1 (/ y (* x (+ x 1.0)))))
(if (<= x -1e+67)
(/ (/ y x) x)
(if (<= x -2.1e-47)
t_1
(if (<= x -3.2e-91)
t_0
(if (<= x -1.7e-143)
t_1
(if (<= x 2.15e-39) t_0 (* (/ x y) (/ 1.0 y)))))))))
double code(double x, double y) {
double t_0 = x / (y * (y + 1.0));
double t_1 = y / (x * (x + 1.0));
double tmp;
if (x <= -1e+67) {
tmp = (y / x) / x;
} else if (x <= -2.1e-47) {
tmp = t_1;
} else if (x <= -3.2e-91) {
tmp = t_0;
} else if (x <= -1.7e-143) {
tmp = t_1;
} else if (x <= 2.15e-39) {
tmp = t_0;
} else {
tmp = (x / y) * (1.0 / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x / (y * (y + 1.0d0))
t_1 = y / (x * (x + 1.0d0))
if (x <= (-1d+67)) then
tmp = (y / x) / x
else if (x <= (-2.1d-47)) then
tmp = t_1
else if (x <= (-3.2d-91)) then
tmp = t_0
else if (x <= (-1.7d-143)) then
tmp = t_1
else if (x <= 2.15d-39) then
tmp = t_0
else
tmp = (x / y) * (1.0d0 / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (y * (y + 1.0));
double t_1 = y / (x * (x + 1.0));
double tmp;
if (x <= -1e+67) {
tmp = (y / x) / x;
} else if (x <= -2.1e-47) {
tmp = t_1;
} else if (x <= -3.2e-91) {
tmp = t_0;
} else if (x <= -1.7e-143) {
tmp = t_1;
} else if (x <= 2.15e-39) {
tmp = t_0;
} else {
tmp = (x / y) * (1.0 / y);
}
return tmp;
}
def code(x, y): t_0 = x / (y * (y + 1.0)) t_1 = y / (x * (x + 1.0)) tmp = 0 if x <= -1e+67: tmp = (y / x) / x elif x <= -2.1e-47: tmp = t_1 elif x <= -3.2e-91: tmp = t_0 elif x <= -1.7e-143: tmp = t_1 elif x <= 2.15e-39: tmp = t_0 else: tmp = (x / y) * (1.0 / y) return tmp
function code(x, y) t_0 = Float64(x / Float64(y * Float64(y + 1.0))) t_1 = Float64(y / Float64(x * Float64(x + 1.0))) tmp = 0.0 if (x <= -1e+67) tmp = Float64(Float64(y / x) / x); elseif (x <= -2.1e-47) tmp = t_1; elseif (x <= -3.2e-91) tmp = t_0; elseif (x <= -1.7e-143) tmp = t_1; elseif (x <= 2.15e-39) tmp = t_0; else tmp = Float64(Float64(x / y) * Float64(1.0 / y)); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y * (y + 1.0)); t_1 = y / (x * (x + 1.0)); tmp = 0.0; if (x <= -1e+67) tmp = (y / x) / x; elseif (x <= -2.1e-47) tmp = t_1; elseif (x <= -3.2e-91) tmp = t_0; elseif (x <= -1.7e-143) tmp = t_1; elseif (x <= 2.15e-39) tmp = t_0; else tmp = (x / y) * (1.0 / y); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1e+67], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -2.1e-47], t$95$1, If[LessEqual[x, -3.2e-91], t$95$0, If[LessEqual[x, -1.7e-143], t$95$1, If[LessEqual[x, 2.15e-39], t$95$0, N[(N[(x / y), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y \cdot \left(y + 1\right)}\\
t_1 := \frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{if}\;x \leq -1 \cdot 10^{+67}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{-47}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-91}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-143}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.15 \cdot 10^{-39}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{y}\\
\end{array}
\end{array}
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (/ y (+ x y)) (+ x 1.0))))
(if (<= x -1e-47)
t_0
(if (<= x -4.1e-91)
(* (/ y (* (+ x y) (+ x y))) (/ x y))
(if (<= x -1.7e-143) t_0 (/ (/ x y) (+ x (+ y 1.0))))))))
double code(double x, double y) {
double t_0 = (y / (x + y)) / (x + 1.0);
double tmp;
if (x <= -1e-47) {
tmp = t_0;
} else if (x <= -4.1e-91) {
tmp = (y / ((x + y) * (x + y))) * (x / y);
} else if (x <= -1.7e-143) {
tmp = t_0;
} else {
tmp = (x / y) / (x + (y + 1.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (y / (x + y)) / (x + 1.0d0)
if (x <= (-1d-47)) then
tmp = t_0
else if (x <= (-4.1d-91)) then
tmp = (y / ((x + y) * (x + y))) * (x / y)
else if (x <= (-1.7d-143)) then
tmp = t_0
else
tmp = (x / y) / (x + (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (y / (x + y)) / (x + 1.0);
double tmp;
if (x <= -1e-47) {
tmp = t_0;
} else if (x <= -4.1e-91) {
tmp = (y / ((x + y) * (x + y))) * (x / y);
} else if (x <= -1.7e-143) {
tmp = t_0;
} else {
tmp = (x / y) / (x + (y + 1.0));
}
return tmp;
}
def code(x, y): t_0 = (y / (x + y)) / (x + 1.0) tmp = 0 if x <= -1e-47: tmp = t_0 elif x <= -4.1e-91: tmp = (y / ((x + y) * (x + y))) * (x / y) elif x <= -1.7e-143: tmp = t_0 else: tmp = (x / y) / (x + (y + 1.0)) return tmp
function code(x, y) t_0 = Float64(Float64(y / Float64(x + y)) / Float64(x + 1.0)) tmp = 0.0 if (x <= -1e-47) tmp = t_0; elseif (x <= -4.1e-91) tmp = Float64(Float64(y / Float64(Float64(x + y) * Float64(x + y))) * Float64(x / y)); elseif (x <= -1.7e-143) tmp = t_0; else tmp = Float64(Float64(x / y) / Float64(x + Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) t_0 = (y / (x + y)) / (x + 1.0); tmp = 0.0; if (x <= -1e-47) tmp = t_0; elseif (x <= -4.1e-91) tmp = (y / ((x + y) * (x + y))) * (x / y); elseif (x <= -1.7e-143) tmp = t_0; else tmp = (x / y) / (x + (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1e-47], t$95$0, If[LessEqual[x, -4.1e-91], N[(N[(y / N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.7e-143], t$95$0, N[(N[(x / y), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{y}{x + y}}{x + 1}\\
\mathbf{if}\;x \leq -1 \cdot 10^{-47}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -4.1 \cdot 10^{-91}:\\
\;\;\;\;\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{y}\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-143}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\
\end{array}
\end{array}
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (+ x y))))
(if (<= x -2.1e-10)
(/ t_0 (+ x (+ y (+ y 1.0))))
(/ t_0 (* (+ x y) (/ (+ y 1.0) x))))))
double code(double x, double y) {
double t_0 = y / (x + y);
double tmp;
if (x <= -2.1e-10) {
tmp = t_0 / (x + (y + (y + 1.0)));
} else {
tmp = t_0 / ((x + y) * ((y + 1.0) / x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = y / (x + y)
if (x <= (-2.1d-10)) then
tmp = t_0 / (x + (y + (y + 1.0d0)))
else
tmp = t_0 / ((x + y) * ((y + 1.0d0) / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / (x + y);
double tmp;
if (x <= -2.1e-10) {
tmp = t_0 / (x + (y + (y + 1.0)));
} else {
tmp = t_0 / ((x + y) * ((y + 1.0) / x));
}
return tmp;
}
def code(x, y): t_0 = y / (x + y) tmp = 0 if x <= -2.1e-10: tmp = t_0 / (x + (y + (y + 1.0))) else: tmp = t_0 / ((x + y) * ((y + 1.0) / x)) return tmp
function code(x, y) t_0 = Float64(y / Float64(x + y)) tmp = 0.0 if (x <= -2.1e-10) tmp = Float64(t_0 / Float64(x + Float64(y + Float64(y + 1.0)))); else tmp = Float64(t_0 / Float64(Float64(x + y) * Float64(Float64(y + 1.0) / x))); end return tmp end
function tmp_2 = code(x, y) t_0 = y / (x + y); tmp = 0.0; if (x <= -2.1e-10) tmp = t_0 / (x + (y + (y + 1.0))); else tmp = t_0 / ((x + y) * ((y + 1.0) / x)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.1e-10], N[(t$95$0 / N[(x + N[(y + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(N[(x + y), $MachinePrecision] * N[(N[(y + 1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{x + y}\\
\mathbf{if}\;x \leq -2.1 \cdot 10^{-10}:\\
\;\;\;\;\frac{t_0}{x + \left(y + \left(y + 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{\left(x + y\right) \cdot \frac{y + 1}{x}}\\
\end{array}
\end{array}
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (* x (+ x 1.0)))))
(if (<= x -1e+67)
(/ (/ y x) x)
(if (<= x -2.9e-48)
t_0
(if (<= x -3.2e-91)
(/ x (* y (+ y 1.0)))
(if (<= x -1.7e-143) t_0 (/ (/ x (+ y 1.0)) y)))))))
double code(double x, double y) {
double t_0 = y / (x * (x + 1.0));
double tmp;
if (x <= -1e+67) {
tmp = (y / x) / x;
} else if (x <= -2.9e-48) {
tmp = t_0;
} else if (x <= -3.2e-91) {
tmp = x / (y * (y + 1.0));
} else if (x <= -1.7e-143) {
tmp = t_0;
} else {
tmp = (x / (y + 1.0)) / y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = y / (x * (x + 1.0d0))
if (x <= (-1d+67)) then
tmp = (y / x) / x
else if (x <= (-2.9d-48)) then
tmp = t_0
else if (x <= (-3.2d-91)) then
tmp = x / (y * (y + 1.0d0))
else if (x <= (-1.7d-143)) then
tmp = t_0
else
tmp = (x / (y + 1.0d0)) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / (x * (x + 1.0));
double tmp;
if (x <= -1e+67) {
tmp = (y / x) / x;
} else if (x <= -2.9e-48) {
tmp = t_0;
} else if (x <= -3.2e-91) {
tmp = x / (y * (y + 1.0));
} else if (x <= -1.7e-143) {
tmp = t_0;
} else {
tmp = (x / (y + 1.0)) / y;
}
return tmp;
}
def code(x, y): t_0 = y / (x * (x + 1.0)) tmp = 0 if x <= -1e+67: tmp = (y / x) / x elif x <= -2.9e-48: tmp = t_0 elif x <= -3.2e-91: tmp = x / (y * (y + 1.0)) elif x <= -1.7e-143: tmp = t_0 else: tmp = (x / (y + 1.0)) / y return tmp
function code(x, y) t_0 = Float64(y / Float64(x * Float64(x + 1.0))) tmp = 0.0 if (x <= -1e+67) tmp = Float64(Float64(y / x) / x); elseif (x <= -2.9e-48) tmp = t_0; elseif (x <= -3.2e-91) tmp = Float64(x / Float64(y * Float64(y + 1.0))); elseif (x <= -1.7e-143) tmp = t_0; else tmp = Float64(Float64(x / Float64(y + 1.0)) / y); end return tmp end
function tmp_2 = code(x, y) t_0 = y / (x * (x + 1.0)); tmp = 0.0; if (x <= -1e+67) tmp = (y / x) / x; elseif (x <= -2.9e-48) tmp = t_0; elseif (x <= -3.2e-91) tmp = x / (y * (y + 1.0)); elseif (x <= -1.7e-143) tmp = t_0; else tmp = (x / (y + 1.0)) / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1e+67], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -2.9e-48], t$95$0, If[LessEqual[x, -3.2e-91], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.7e-143], t$95$0, N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{if}\;x \leq -1 \cdot 10^{+67}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -2.9 \cdot 10^{-48}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-91}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-143}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y}\\
\end{array}
\end{array}
(FPCore (x y)
:precision binary64
(if (<= x -2.75e-48)
(/ (/ y x) (+ x 1.0))
(if (<= x -3.2e-91)
(/ x (* y (+ y 1.0)))
(if (<= x -1.4e-143) (/ y (* x (+ x 1.0))) (/ (/ x y) (+ x (+ y 1.0)))))))
double code(double x, double y) {
double tmp;
if (x <= -2.75e-48) {
tmp = (y / x) / (x + 1.0);
} else if (x <= -3.2e-91) {
tmp = x / (y * (y + 1.0));
} else if (x <= -1.4e-143) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (x + (y + 1.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-2.75d-48)) then
tmp = (y / x) / (x + 1.0d0)
else if (x <= (-3.2d-91)) then
tmp = x / (y * (y + 1.0d0))
else if (x <= (-1.4d-143)) then
tmp = y / (x * (x + 1.0d0))
else
tmp = (x / y) / (x + (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -2.75e-48) {
tmp = (y / x) / (x + 1.0);
} else if (x <= -3.2e-91) {
tmp = x / (y * (y + 1.0));
} else if (x <= -1.4e-143) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (x + (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -2.75e-48: tmp = (y / x) / (x + 1.0) elif x <= -3.2e-91: tmp = x / (y * (y + 1.0)) elif x <= -1.4e-143: tmp = y / (x * (x + 1.0)) else: tmp = (x / y) / (x + (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= -2.75e-48) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); elseif (x <= -3.2e-91) tmp = Float64(x / Float64(y * Float64(y + 1.0))); elseif (x <= -1.4e-143) tmp = Float64(y / Float64(x * Float64(x + 1.0))); else tmp = Float64(Float64(x / y) / Float64(x + Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -2.75e-48) tmp = (y / x) / (x + 1.0); elseif (x <= -3.2e-91) tmp = x / (y * (y + 1.0)); elseif (x <= -1.4e-143) tmp = y / (x * (x + 1.0)); else tmp = (x / y) / (x + (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -2.75e-48], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.2e-91], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.4e-143], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.75 \cdot 10^{-48}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-91}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{elif}\;x \leq -1.4 \cdot 10^{-143}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\
\end{array}
\end{array}
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (/ y (+ x y)) (+ x 1.0))))
(if (<= x -4.5e-48)
t_0
(if (<= x -3.2e-91)
(/ x (* y (+ y 1.0)))
(if (<= x -1.2e-143) t_0 (/ (/ x y) (+ x (+ y 1.0))))))))
double code(double x, double y) {
double t_0 = (y / (x + y)) / (x + 1.0);
double tmp;
if (x <= -4.5e-48) {
tmp = t_0;
} else if (x <= -3.2e-91) {
tmp = x / (y * (y + 1.0));
} else if (x <= -1.2e-143) {
tmp = t_0;
} else {
tmp = (x / y) / (x + (y + 1.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (y / (x + y)) / (x + 1.0d0)
if (x <= (-4.5d-48)) then
tmp = t_0
else if (x <= (-3.2d-91)) then
tmp = x / (y * (y + 1.0d0))
else if (x <= (-1.2d-143)) then
tmp = t_0
else
tmp = (x / y) / (x + (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (y / (x + y)) / (x + 1.0);
double tmp;
if (x <= -4.5e-48) {
tmp = t_0;
} else if (x <= -3.2e-91) {
tmp = x / (y * (y + 1.0));
} else if (x <= -1.2e-143) {
tmp = t_0;
} else {
tmp = (x / y) / (x + (y + 1.0));
}
return tmp;
}
def code(x, y): t_0 = (y / (x + y)) / (x + 1.0) tmp = 0 if x <= -4.5e-48: tmp = t_0 elif x <= -3.2e-91: tmp = x / (y * (y + 1.0)) elif x <= -1.2e-143: tmp = t_0 else: tmp = (x / y) / (x + (y + 1.0)) return tmp
function code(x, y) t_0 = Float64(Float64(y / Float64(x + y)) / Float64(x + 1.0)) tmp = 0.0 if (x <= -4.5e-48) tmp = t_0; elseif (x <= -3.2e-91) tmp = Float64(x / Float64(y * Float64(y + 1.0))); elseif (x <= -1.2e-143) tmp = t_0; else tmp = Float64(Float64(x / y) / Float64(x + Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) t_0 = (y / (x + y)) / (x + 1.0); tmp = 0.0; if (x <= -4.5e-48) tmp = t_0; elseif (x <= -3.2e-91) tmp = x / (y * (y + 1.0)); elseif (x <= -1.2e-143) tmp = t_0; else tmp = (x / y) / (x + (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e-48], t$95$0, If[LessEqual[x, -3.2e-91], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.2e-143], t$95$0, N[(N[(x / y), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{y}{x + y}}{x + 1}\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{-48}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-91}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{elif}\;x \leq -1.2 \cdot 10^{-143}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\
\end{array}
\end{array}
(FPCore (x y)
:precision binary64
(if (<= x -2.1e-10)
(/ (/ y x) x)
(if (or (<= x -2.8e-180) (not (<= x 9.2e-163)))
(* (/ x y) (/ 1.0 y))
(/ x y))))
double code(double x, double y) {
double tmp;
if (x <= -2.1e-10) {
tmp = (y / x) / x;
} else if ((x <= -2.8e-180) || !(x <= 9.2e-163)) {
tmp = (x / y) * (1.0 / y);
} else {
tmp = x / y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-2.1d-10)) then
tmp = (y / x) / x
else if ((x <= (-2.8d-180)) .or. (.not. (x <= 9.2d-163))) then
tmp = (x / y) * (1.0d0 / y)
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -2.1e-10) {
tmp = (y / x) / x;
} else if ((x <= -2.8e-180) || !(x <= 9.2e-163)) {
tmp = (x / y) * (1.0 / y);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -2.1e-10: tmp = (y / x) / x elif (x <= -2.8e-180) or not (x <= 9.2e-163): tmp = (x / y) * (1.0 / y) else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -2.1e-10) tmp = Float64(Float64(y / x) / x); elseif ((x <= -2.8e-180) || !(x <= 9.2e-163)) tmp = Float64(Float64(x / y) * Float64(1.0 / y)); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -2.1e-10) tmp = (y / x) / x; elseif ((x <= -2.8e-180) || ~((x <= 9.2e-163))) tmp = (x / y) * (1.0 / y); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -2.1e-10], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[Or[LessEqual[x, -2.8e-180], N[Not[LessEqual[x, 9.2e-163]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{-10}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -2.8 \cdot 10^{-180} \lor \neg \left(x \leq 9.2 \cdot 10^{-163}\right):\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
(FPCore (x y)
:precision binary64
(if (<= x -2e-47)
(/ (/ y x) (+ x 1.0))
(if (<= x -3.2e-91)
(/ x (* y (+ y 1.0)))
(if (<= x -1.7e-143) (/ y (* x (+ x 1.0))) (/ (/ x (+ y 1.0)) y)))))
double code(double x, double y) {
double tmp;
if (x <= -2e-47) {
tmp = (y / x) / (x + 1.0);
} else if (x <= -3.2e-91) {
tmp = x / (y * (y + 1.0));
} else if (x <= -1.7e-143) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / (y + 1.0)) / y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-2d-47)) then
tmp = (y / x) / (x + 1.0d0)
else if (x <= (-3.2d-91)) then
tmp = x / (y * (y + 1.0d0))
else if (x <= (-1.7d-143)) then
tmp = y / (x * (x + 1.0d0))
else
tmp = (x / (y + 1.0d0)) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -2e-47) {
tmp = (y / x) / (x + 1.0);
} else if (x <= -3.2e-91) {
tmp = x / (y * (y + 1.0));
} else if (x <= -1.7e-143) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / (y + 1.0)) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -2e-47: tmp = (y / x) / (x + 1.0) elif x <= -3.2e-91: tmp = x / (y * (y + 1.0)) elif x <= -1.7e-143: tmp = y / (x * (x + 1.0)) else: tmp = (x / (y + 1.0)) / y return tmp
function code(x, y) tmp = 0.0 if (x <= -2e-47) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); elseif (x <= -3.2e-91) tmp = Float64(x / Float64(y * Float64(y + 1.0))); elseif (x <= -1.7e-143) tmp = Float64(y / Float64(x * Float64(x + 1.0))); else tmp = Float64(Float64(x / Float64(y + 1.0)) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -2e-47) tmp = (y / x) / (x + 1.0); elseif (x <= -3.2e-91) tmp = x / (y * (y + 1.0)); elseif (x <= -1.7e-143) tmp = y / (x * (x + 1.0)); else tmp = (x / (y + 1.0)) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -2e-47], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.2e-91], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.7e-143], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{-47}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-91}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-143}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y}\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (if (<= x -2.1e-10) (/ (/ y x) x) (if (<= x 2.15e-39) (/ x (* y (+ y 1.0))) (* (/ x y) (/ 1.0 y)))))
double code(double x, double y) {
double tmp;
if (x <= -2.1e-10) {
tmp = (y / x) / x;
} else if (x <= 2.15e-39) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (x / y) * (1.0 / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-2.1d-10)) then
tmp = (y / x) / x
else if (x <= 2.15d-39) then
tmp = x / (y * (y + 1.0d0))
else
tmp = (x / y) * (1.0d0 / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -2.1e-10) {
tmp = (y / x) / x;
} else if (x <= 2.15e-39) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (x / y) * (1.0 / y);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -2.1e-10: tmp = (y / x) / x elif x <= 2.15e-39: tmp = x / (y * (y + 1.0)) else: tmp = (x / y) * (1.0 / y) return tmp
function code(x, y) tmp = 0.0 if (x <= -2.1e-10) tmp = Float64(Float64(y / x) / x); elseif (x <= 2.15e-39) tmp = Float64(x / Float64(y * Float64(y + 1.0))); else tmp = Float64(Float64(x / y) * Float64(1.0 / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -2.1e-10) tmp = (y / x) / x; elseif (x <= 2.15e-39) tmp = x / (y * (y + 1.0)); else tmp = (x / y) * (1.0 / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -2.1e-10], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, 2.15e-39], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{-10}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq 2.15 \cdot 10^{-39}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{y}\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (if (<= x -2.1e-10) (/ (/ y x) x) (/ x y)))
double code(double x, double y) {
double tmp;
if (x <= -2.1e-10) {
tmp = (y / x) / x;
} else {
tmp = x / y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-2.1d-10)) then
tmp = (y / x) / x
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -2.1e-10) {
tmp = (y / x) / x;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -2.1e-10: tmp = (y / x) / x else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -2.1e-10) tmp = Float64(Float64(y / x) / x); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -2.1e-10) tmp = (y / x) / x; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -2.1e-10], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{-10}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (/ 1.0 x))
double code(double x, double y) {
return 1.0 / x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 / x
end function
public static double code(double x, double y) {
return 1.0 / x;
}
def code(x, y): return 1.0 / x
function code(x, y) return Float64(1.0 / x) end
function tmp = code(x, y) tmp = 1.0 / x; end
code[x_, y_] := N[(1.0 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{x}
\end{array}
(FPCore (x y) :precision binary64 (/ x y))
double code(double x, double y) {
return x / y;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x / y
end function
public static double code(double x, double y) {
return x / y;
}
def code(x, y): return x / y
function code(x, y) return Float64(x / y) end
function tmp = code(x, y) tmp = x / y; end
code[x_, y_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y}
\end{array}
(FPCore (x y) :precision binary64 (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x)))))
double code(double x, double y) {
return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x / ((y + 1.0d0) + x)) / (y + x)) / (1.0d0 / (y / (y + x)))
end function
public static double code(double x, double y) {
return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
def code(x, y): return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)))
function code(x, y) return Float64(Float64(Float64(x / Float64(Float64(y + 1.0) + x)) / Float64(y + x)) / Float64(1.0 / Float64(y / Float64(y + x)))) end
function tmp = code(x, y) tmp = ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x))); end
code[x_, y_] := N[(N[(N[(x / N[(N[(y + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}
\end{array}
herbie shell --seed 2024008
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))