
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (1.0d0 / (x * 9.0d0))) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(1.0 / Float64(x * 9.0))) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (1.0d0 / (x * 9.0d0))) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(1.0 / Float64(x * 9.0))) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (1.0d0 / (x * 9.0d0))) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(1.0 / Float64(x * 9.0))) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
Initial program 99.8%
(FPCore (x y)
:precision binary64
(if (<= y -1.45e+23)
(- 1.0 (/ y (* 3.0 (sqrt x))))
(if (<= y 1.5e+60)
(+ (/ -1.0 (* x 9.0)) 1.0)
(- 1.0 (/ (/ y (sqrt x)) 3.0)))))
double code(double x, double y) {
double tmp;
if (y <= -1.45e+23) {
tmp = 1.0 - (y / (3.0 * sqrt(x)));
} else if (y <= 1.5e+60) {
tmp = (-1.0 / (x * 9.0)) + 1.0;
} else {
tmp = 1.0 - ((y / sqrt(x)) / 3.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.45d+23)) then
tmp = 1.0d0 - (y / (3.0d0 * sqrt(x)))
else if (y <= 1.5d+60) then
tmp = ((-1.0d0) / (x * 9.0d0)) + 1.0d0
else
tmp = 1.0d0 - ((y / sqrt(x)) / 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.45e+23) {
tmp = 1.0 - (y / (3.0 * Math.sqrt(x)));
} else if (y <= 1.5e+60) {
tmp = (-1.0 / (x * 9.0)) + 1.0;
} else {
tmp = 1.0 - ((y / Math.sqrt(x)) / 3.0);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.45e+23: tmp = 1.0 - (y / (3.0 * math.sqrt(x))) elif y <= 1.5e+60: tmp = (-1.0 / (x * 9.0)) + 1.0 else: tmp = 1.0 - ((y / math.sqrt(x)) / 3.0) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.45e+23) tmp = Float64(1.0 - Float64(y / Float64(3.0 * sqrt(x)))); elseif (y <= 1.5e+60) tmp = Float64(Float64(-1.0 / Float64(x * 9.0)) + 1.0); else tmp = Float64(1.0 - Float64(Float64(y / sqrt(x)) / 3.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.45e+23) tmp = 1.0 - (y / (3.0 * sqrt(x))); elseif (y <= 1.5e+60) tmp = (-1.0 / (x * 9.0)) + 1.0; else tmp = 1.0 - ((y / sqrt(x)) / 3.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.45e+23], N[(1.0 - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+60], N[(N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(1.0 - N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+23}:\\
\;\;\;\;1 - \frac{y}{3 \cdot \sqrt{x}}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+60}:\\
\;\;\;\;\frac{-1}{x \cdot 9} + 1\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{y}{\sqrt{x}}}{3}\\
\end{array}
\end{array}
if y < -1.45000000000000006e23Initial program 99.6%
Taylor expanded in x around inf 0
Simplified0
if -1.45000000000000006e23 < y < 1.4999999999999999e60Initial program 99.8%
Simplified0
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
if 1.4999999999999999e60 < y Initial program 99.7%
Taylor expanded in x around inf 0
Simplified0
Applied egg-rr0
(FPCore (x y)
:precision binary64
(let* ((t_0 (- 1.0 (/ y (* 3.0 (sqrt x))))))
(if (<= y -1.35e+23)
t_0
(if (<= y 3.8e+60) (+ (/ -1.0 (* x 9.0)) 1.0) t_0))))
double code(double x, double y) {
double t_0 = 1.0 - (y / (3.0 * sqrt(x)));
double tmp;
if (y <= -1.35e+23) {
tmp = t_0;
} else if (y <= 3.8e+60) {
tmp = (-1.0 / (x * 9.0)) + 1.0;
} else {
tmp = t_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 = 1.0d0 - (y / (3.0d0 * sqrt(x)))
if (y <= (-1.35d+23)) then
tmp = t_0
else if (y <= 3.8d+60) then
tmp = ((-1.0d0) / (x * 9.0d0)) + 1.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 - (y / (3.0 * Math.sqrt(x)));
double tmp;
if (y <= -1.35e+23) {
tmp = t_0;
} else if (y <= 3.8e+60) {
tmp = (-1.0 / (x * 9.0)) + 1.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = 1.0 - (y / (3.0 * math.sqrt(x))) tmp = 0 if y <= -1.35e+23: tmp = t_0 elif y <= 3.8e+60: tmp = (-1.0 / (x * 9.0)) + 1.0 else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(1.0 - Float64(y / Float64(3.0 * sqrt(x)))) tmp = 0.0 if (y <= -1.35e+23) tmp = t_0; elseif (y <= 3.8e+60) tmp = Float64(Float64(-1.0 / Float64(x * 9.0)) + 1.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 - (y / (3.0 * sqrt(x))); tmp = 0.0; if (y <= -1.35e+23) tmp = t_0; elseif (y <= 3.8e+60) tmp = (-1.0 / (x * 9.0)) + 1.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.35e+23], t$95$0, If[LessEqual[y, 3.8e+60], N[(N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - \frac{y}{3 \cdot \sqrt{x}}\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+23}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+60}:\\
\;\;\;\;\frac{-1}{x \cdot 9} + 1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -1.3499999999999999e23 or 3.80000000000000009e60 < y Initial program 99.6%
Taylor expanded in x around inf 0
Simplified0
if -1.3499999999999999e23 < y < 3.80000000000000009e60Initial program 99.8%
Simplified0
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
(FPCore (x y)
:precision binary64
(if (<= y -1.45e+23)
(+ 1.0 (/ (* y -0.3333333333333333) (sqrt x)))
(if (<= y 1.52e+60)
(+ (/ -1.0 (* x 9.0)) 1.0)
(+ 1.0 (/ (/ y -3.0) (sqrt x))))))
double code(double x, double y) {
double tmp;
if (y <= -1.45e+23) {
tmp = 1.0 + ((y * -0.3333333333333333) / sqrt(x));
} else if (y <= 1.52e+60) {
tmp = (-1.0 / (x * 9.0)) + 1.0;
} else {
tmp = 1.0 + ((y / -3.0) / sqrt(x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.45d+23)) then
tmp = 1.0d0 + ((y * (-0.3333333333333333d0)) / sqrt(x))
else if (y <= 1.52d+60) then
tmp = ((-1.0d0) / (x * 9.0d0)) + 1.0d0
else
tmp = 1.0d0 + ((y / (-3.0d0)) / sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.45e+23) {
tmp = 1.0 + ((y * -0.3333333333333333) / Math.sqrt(x));
} else if (y <= 1.52e+60) {
tmp = (-1.0 / (x * 9.0)) + 1.0;
} else {
tmp = 1.0 + ((y / -3.0) / Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.45e+23: tmp = 1.0 + ((y * -0.3333333333333333) / math.sqrt(x)) elif y <= 1.52e+60: tmp = (-1.0 / (x * 9.0)) + 1.0 else: tmp = 1.0 + ((y / -3.0) / math.sqrt(x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.45e+23) tmp = Float64(1.0 + Float64(Float64(y * -0.3333333333333333) / sqrt(x))); elseif (y <= 1.52e+60) tmp = Float64(Float64(-1.0 / Float64(x * 9.0)) + 1.0); else tmp = Float64(1.0 + Float64(Float64(y / -3.0) / sqrt(x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.45e+23) tmp = 1.0 + ((y * -0.3333333333333333) / sqrt(x)); elseif (y <= 1.52e+60) tmp = (-1.0 / (x * 9.0)) + 1.0; else tmp = 1.0 + ((y / -3.0) / sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.45e+23], N[(1.0 + N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.52e+60], N[(N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(1.0 + N[(N[(y / -3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+23}:\\
\;\;\;\;1 + \frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 1.52 \cdot 10^{+60}:\\
\;\;\;\;\frac{-1}{x \cdot 9} + 1\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{y}{-3}}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -1.45000000000000006e23Initial program 99.6%
Simplified0
Taylor expanded in x around inf 0
Simplified0
Applied egg-rr0
if -1.45000000000000006e23 < y < 1.52e60Initial program 99.8%
Simplified0
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
if 1.52e60 < y Initial program 99.7%
Simplified0
Taylor expanded in x around inf 0
Simplified0
Applied egg-rr0
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 1.0 (/ (* y -0.3333333333333333) (sqrt x)))))
(if (<= y -6.6e+22)
t_0
(if (<= y 1.15e+60) (+ (/ -1.0 (* x 9.0)) 1.0) t_0))))
double code(double x, double y) {
double t_0 = 1.0 + ((y * -0.3333333333333333) / sqrt(x));
double tmp;
if (y <= -6.6e+22) {
tmp = t_0;
} else if (y <= 1.15e+60) {
tmp = (-1.0 / (x * 9.0)) + 1.0;
} else {
tmp = t_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 = 1.0d0 + ((y * (-0.3333333333333333d0)) / sqrt(x))
if (y <= (-6.6d+22)) then
tmp = t_0
else if (y <= 1.15d+60) then
tmp = ((-1.0d0) / (x * 9.0d0)) + 1.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + ((y * -0.3333333333333333) / Math.sqrt(x));
double tmp;
if (y <= -6.6e+22) {
tmp = t_0;
} else if (y <= 1.15e+60) {
tmp = (-1.0 / (x * 9.0)) + 1.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = 1.0 + ((y * -0.3333333333333333) / math.sqrt(x)) tmp = 0 if y <= -6.6e+22: tmp = t_0 elif y <= 1.15e+60: tmp = (-1.0 / (x * 9.0)) + 1.0 else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(Float64(y * -0.3333333333333333) / sqrt(x))) tmp = 0.0 if (y <= -6.6e+22) tmp = t_0; elseif (y <= 1.15e+60) tmp = Float64(Float64(-1.0 / Float64(x * 9.0)) + 1.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + ((y * -0.3333333333333333) / sqrt(x)); tmp = 0.0; if (y <= -6.6e+22) tmp = t_0; elseif (y <= 1.15e+60) tmp = (-1.0 / (x * 9.0)) + 1.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.6e+22], t$95$0, If[LessEqual[y, 1.15e+60], N[(N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\mathbf{if}\;y \leq -6.6 \cdot 10^{+22}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+60}:\\
\;\;\;\;\frac{-1}{x \cdot 9} + 1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -6.5999999999999996e22 or 1.15000000000000008e60 < y Initial program 99.6%
Simplified0
Taylor expanded in x around inf 0
Simplified0
Applied egg-rr0
if -6.5999999999999996e22 < y < 1.15000000000000008e60Initial program 99.8%
Simplified0
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sqrt (/ 1.0 x)) (* -0.3333333333333333 y))))
(if (<= y -6.2e+49)
t_0
(if (<= y 4.2e+98) (+ (/ -1.0 (* x 9.0)) 1.0) t_0))))
double code(double x, double y) {
double t_0 = sqrt((1.0 / x)) * (-0.3333333333333333 * y);
double tmp;
if (y <= -6.2e+49) {
tmp = t_0;
} else if (y <= 4.2e+98) {
tmp = (-1.0 / (x * 9.0)) + 1.0;
} else {
tmp = t_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 = sqrt((1.0d0 / x)) * ((-0.3333333333333333d0) * y)
if (y <= (-6.2d+49)) then
tmp = t_0
else if (y <= 4.2d+98) then
tmp = ((-1.0d0) / (x * 9.0d0)) + 1.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt((1.0 / x)) * (-0.3333333333333333 * y);
double tmp;
if (y <= -6.2e+49) {
tmp = t_0;
} else if (y <= 4.2e+98) {
tmp = (-1.0 / (x * 9.0)) + 1.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = math.sqrt((1.0 / x)) * (-0.3333333333333333 * y) tmp = 0 if y <= -6.2e+49: tmp = t_0 elif y <= 4.2e+98: tmp = (-1.0 / (x * 9.0)) + 1.0 else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(sqrt(Float64(1.0 / x)) * Float64(-0.3333333333333333 * y)) tmp = 0.0 if (y <= -6.2e+49) tmp = t_0; elseif (y <= 4.2e+98) tmp = Float64(Float64(-1.0 / Float64(x * 9.0)) + 1.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt((1.0 / x)) * (-0.3333333333333333 * y); tmp = 0.0; if (y <= -6.2e+49) tmp = t_0; elseif (y <= 4.2e+98) tmp = (-1.0 / (x * 9.0)) + 1.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] * N[(-0.3333333333333333 * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e+49], t$95$0, If[LessEqual[y, 4.2e+98], N[(N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{x}} \cdot \left(-0.3333333333333333 \cdot y\right)\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+49}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+98}:\\
\;\;\;\;\frac{-1}{x \cdot 9} + 1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -6.19999999999999985e49 or 4.20000000000000008e98 < y Initial program 99.6%
Simplified0
Taylor expanded in y around inf 0
Simplified0
if -6.19999999999999985e49 < y < 4.20000000000000008e98Initial program 99.8%
Simplified0
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
(FPCore (x y) :precision binary64 (if (<= x 6.4) (- (/ -0.1111111111111111 x) (/ y (* 3.0 (sqrt x)))) (- 1.0 (/ (/ y (sqrt x)) 3.0))))
double code(double x, double y) {
double tmp;
if (x <= 6.4) {
tmp = (-0.1111111111111111 / x) - (y / (3.0 * sqrt(x)));
} else {
tmp = 1.0 - ((y / sqrt(x)) / 3.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 6.4d0) then
tmp = ((-0.1111111111111111d0) / x) - (y / (3.0d0 * sqrt(x)))
else
tmp = 1.0d0 - ((y / sqrt(x)) / 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 6.4) {
tmp = (-0.1111111111111111 / x) - (y / (3.0 * Math.sqrt(x)));
} else {
tmp = 1.0 - ((y / Math.sqrt(x)) / 3.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 6.4: tmp = (-0.1111111111111111 / x) - (y / (3.0 * math.sqrt(x))) else: tmp = 1.0 - ((y / math.sqrt(x)) / 3.0) return tmp
function code(x, y) tmp = 0.0 if (x <= 6.4) tmp = Float64(Float64(-0.1111111111111111 / x) - Float64(y / Float64(3.0 * sqrt(x)))); else tmp = Float64(1.0 - Float64(Float64(y / sqrt(x)) / 3.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 6.4) tmp = (-0.1111111111111111 / x) - (y / (3.0 * sqrt(x))); else tmp = 1.0 - ((y / sqrt(x)) / 3.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 6.4], N[(N[(-0.1111111111111111 / x), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 6.4:\\
\;\;\;\;\frac{-0.1111111111111111}{x} - \frac{y}{3 \cdot \sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{y}{\sqrt{x}}}{3}\\
\end{array}
\end{array}
if x < 6.4000000000000004Initial program 99.6%
Taylor expanded in x around 0 0
Simplified0
if 6.4000000000000004 < x Initial program 99.9%
Taylor expanded in x around inf 0
Simplified0
Applied egg-rr0
(FPCore (x y) :precision binary64 (+ (/ -0.1111111111111111 x) (+ 1.0 (/ y (* (sqrt x) -3.0)))))
double code(double x, double y) {
return (-0.1111111111111111 / x) + (1.0 + (y / (sqrt(x) * -3.0)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((-0.1111111111111111d0) / x) + (1.0d0 + (y / (sqrt(x) * (-3.0d0))))
end function
public static double code(double x, double y) {
return (-0.1111111111111111 / x) + (1.0 + (y / (Math.sqrt(x) * -3.0)));
}
def code(x, y): return (-0.1111111111111111 / x) + (1.0 + (y / (math.sqrt(x) * -3.0)))
function code(x, y) return Float64(Float64(-0.1111111111111111 / x) + Float64(1.0 + Float64(y / Float64(sqrt(x) * -3.0)))) end
function tmp = code(x, y) tmp = (-0.1111111111111111 / x) + (1.0 + (y / (sqrt(x) * -3.0))); end
code[x_, y_] := N[(N[(-0.1111111111111111 / x), $MachinePrecision] + N[(1.0 + N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-0.1111111111111111}{x} + \left(1 + \frac{y}{\sqrt{x} \cdot -3}\right)
\end{array}
Initial program 99.8%
Simplified0
(FPCore (x y)
:precision binary64
(if (<= y 1.56e+135)
(+ (/ -1.0 (* x 9.0)) 1.0)
(*
(/ (/ (/ -0.0013717421124828531 x) (* x x)) (/ 0.012345679012345678 x))
x)))
double code(double x, double y) {
double tmp;
if (y <= 1.56e+135) {
tmp = (-1.0 / (x * 9.0)) + 1.0;
} else {
tmp = (((-0.0013717421124828531 / x) / (x * x)) / (0.012345679012345678 / x)) * x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.56d+135) then
tmp = ((-1.0d0) / (x * 9.0d0)) + 1.0d0
else
tmp = ((((-0.0013717421124828531d0) / x) / (x * x)) / (0.012345679012345678d0 / x)) * x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.56e+135) {
tmp = (-1.0 / (x * 9.0)) + 1.0;
} else {
tmp = (((-0.0013717421124828531 / x) / (x * x)) / (0.012345679012345678 / x)) * x;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.56e+135: tmp = (-1.0 / (x * 9.0)) + 1.0 else: tmp = (((-0.0013717421124828531 / x) / (x * x)) / (0.012345679012345678 / x)) * x return tmp
function code(x, y) tmp = 0.0 if (y <= 1.56e+135) tmp = Float64(Float64(-1.0 / Float64(x * 9.0)) + 1.0); else tmp = Float64(Float64(Float64(Float64(-0.0013717421124828531 / x) / Float64(x * x)) / Float64(0.012345679012345678 / x)) * x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.56e+135) tmp = (-1.0 / (x * 9.0)) + 1.0; else tmp = (((-0.0013717421124828531 / x) / (x * x)) / (0.012345679012345678 / x)) * x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.56e+135], N[(N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(N[(N[(N[(-0.0013717421124828531 / x), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision] / N[(0.012345679012345678 / x), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.56 \cdot 10^{+135}:\\
\;\;\;\;\frac{-1}{x \cdot 9} + 1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{-0.0013717421124828531}{x}}{x \cdot x}}{\frac{0.012345679012345678}{x}} \cdot x\\
\end{array}
\end{array}
if y < 1.55999999999999993e135Initial program 99.8%
Simplified0
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
if 1.55999999999999993e135 < y Initial program 99.6%
Simplified0
Taylor expanded in y around 0 0
Simplified0
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
(FPCore (x y) :precision binary64 (if (<= y 1.06e+137) (+ (/ -1.0 (* x 9.0)) 1.0) (/ (/ (/ 0.012345679012345678 x) x) (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if (y <= 1.06e+137) {
tmp = (-1.0 / (x * 9.0)) + 1.0;
} else {
tmp = ((0.012345679012345678 / x) / x) / (-0.1111111111111111 / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.06d+137) then
tmp = ((-1.0d0) / (x * 9.0d0)) + 1.0d0
else
tmp = ((0.012345679012345678d0 / x) / x) / ((-0.1111111111111111d0) / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.06e+137) {
tmp = (-1.0 / (x * 9.0)) + 1.0;
} else {
tmp = ((0.012345679012345678 / x) / x) / (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.06e+137: tmp = (-1.0 / (x * 9.0)) + 1.0 else: tmp = ((0.012345679012345678 / x) / x) / (-0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if (y <= 1.06e+137) tmp = Float64(Float64(-1.0 / Float64(x * 9.0)) + 1.0); else tmp = Float64(Float64(Float64(0.012345679012345678 / x) / x) / Float64(-0.1111111111111111 / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.06e+137) tmp = (-1.0 / (x * 9.0)) + 1.0; else tmp = ((0.012345679012345678 / x) / x) / (-0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.06e+137], N[(N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(N[(N[(0.012345679012345678 / x), $MachinePrecision] / x), $MachinePrecision] / N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.06 \cdot 10^{+137}:\\
\;\;\;\;\frac{-1}{x \cdot 9} + 1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{0.012345679012345678}{x}}{x}}{\frac{-0.1111111111111111}{x}}\\
\end{array}
\end{array}
if y < 1.06000000000000006e137Initial program 99.8%
Simplified0
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
if 1.06000000000000006e137 < y Initial program 99.6%
Simplified0
Taylor expanded in y around 0 0
Simplified0
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
(FPCore (x y) :precision binary64 (if (<= x 0.11) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 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 <= 0.11d0) then
tmp = (-0.1111111111111111d0) / x
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.11: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.11) tmp = Float64(-0.1111111111111111 / x); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.11) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.11], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.11:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 0.110000000000000001Initial program 99.6%
Simplified0
Taylor expanded in y around 0 0
Simplified0
Taylor expanded in x around 0 0
Simplified0
if 0.110000000000000001 < x Initial program 99.9%
Simplified0
Taylor expanded in y around 0 0
Simplified0
Taylor expanded in x around inf 0
Simplified0
(FPCore (x y) :precision binary64 (+ (/ -1.0 (* x 9.0)) 1.0))
double code(double x, double y) {
return (-1.0 / (x * 9.0)) + 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((-1.0d0) / (x * 9.0d0)) + 1.0d0
end function
public static double code(double x, double y) {
return (-1.0 / (x * 9.0)) + 1.0;
}
def code(x, y): return (-1.0 / (x * 9.0)) + 1.0
function code(x, y) return Float64(Float64(-1.0 / Float64(x * 9.0)) + 1.0) end
function tmp = code(x, y) tmp = (-1.0 / (x * 9.0)) + 1.0; end
code[x_, y_] := N[(N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{x \cdot 9} + 1
\end{array}
Initial program 99.8%
Simplified0
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
(FPCore (x y) :precision binary64 (+ (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
return (-0.1111111111111111 / x) + 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((-0.1111111111111111d0) / x) + 1.0d0
end function
public static double code(double x, double y) {
return (-0.1111111111111111 / x) + 1.0;
}
def code(x, y): return (-0.1111111111111111 / x) + 1.0
function code(x, y) return Float64(Float64(-0.1111111111111111 / x) + 1.0) end
function tmp = code(x, y) tmp = (-0.1111111111111111 / x) + 1.0; end
code[x_, y_] := N[(N[(-0.1111111111111111 / x), $MachinePrecision] + 1.0), $MachinePrecision]
\begin{array}{l}
\\
\frac{-0.1111111111111111}{x} + 1
\end{array}
Initial program 99.8%
Simplified0
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 99.8%
Simplified0
Taylor expanded in y around 0 0
Simplified0
Taylor expanded in x around inf 0
Simplified0
(FPCore (x y) :precision binary64 (- (- 1.0 (/ (/ 1.0 x) 9.0)) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - ((1.0d0 / x) / 9.0d0)) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(Float64(1.0 / x) / 9.0)) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(N[(1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{\frac{1}{x}}{9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
herbie shell --seed 2024110
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D"
:precision binary64
:alt
(- (- 1.0 (/ (/ 1.0 x) 9.0)) (/ y (* 3.0 (sqrt x))))
(- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))