
(FPCore (x y) :precision binary64 (* (* 3.0 (sqrt x)) (- (+ y (/ 1.0 (* x 9.0))) 1.0)))
double code(double x, double y) {
return (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (3.0d0 * sqrt(x)) * ((y + (1.0d0 / (x * 9.0d0))) - 1.0d0)
end function
public static double code(double x, double y) {
return (3.0 * Math.sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
def code(x, y): return (3.0 * math.sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0)
function code(x, y) return Float64(Float64(3.0 * sqrt(x)) * Float64(Float64(y + Float64(1.0 / Float64(x * 9.0))) - 1.0)) end
function tmp = code(x, y) tmp = (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0); end
code[x_, y_] := N[(N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[(N[(y + N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (* (* 3.0 (sqrt x)) (- (+ y (/ 1.0 (* x 9.0))) 1.0)))
double code(double x, double y) {
return (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (3.0d0 * sqrt(x)) * ((y + (1.0d0 / (x * 9.0d0))) - 1.0d0)
end function
public static double code(double x, double y) {
return (3.0 * Math.sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
def code(x, y): return (3.0 * math.sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0)
function code(x, y) return Float64(Float64(3.0 * sqrt(x)) * Float64(Float64(y + Float64(1.0 / Float64(x * 9.0))) - 1.0)) end
function tmp = code(x, y) tmp = (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0); end
code[x_, y_] := N[(N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[(N[(y + N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)
\end{array}
(FPCore (x y) :precision binary64 (* (sqrt (* x 9.0)) (+ (+ y (/ 1.0 (* x 9.0))) -1.0)))
double code(double x, double y) {
return sqrt((x * 9.0)) * ((y + (1.0 / (x * 9.0))) + -1.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt((x * 9.0d0)) * ((y + (1.0d0 / (x * 9.0d0))) + (-1.0d0))
end function
public static double code(double x, double y) {
return Math.sqrt((x * 9.0)) * ((y + (1.0 / (x * 9.0))) + -1.0);
}
def code(x, y): return math.sqrt((x * 9.0)) * ((y + (1.0 / (x * 9.0))) + -1.0)
function code(x, y) return Float64(sqrt(Float64(x * 9.0)) * Float64(Float64(y + Float64(1.0 / Float64(x * 9.0))) + -1.0)) end
function tmp = code(x, y) tmp = sqrt((x * 9.0)) * ((y + (1.0 / (x * 9.0))) + -1.0); end
code[x_, y_] := N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(N[(y + N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x \cdot 9} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) + -1\right)
\end{array}
(FPCore (x y) :precision binary64 (if (<= x 4e-46) (sqrt (+ (* 2.0 (+ y -1.0)) (* 0.1111111111111111 (/ 1.0 x)))) (* (sqrt (* x 9.0)) (+ y -1.0))))
double code(double x, double y) {
double tmp;
if (x <= 4e-46) {
tmp = sqrt(((2.0 * (y + -1.0)) + (0.1111111111111111 * (1.0 / x))));
} else {
tmp = sqrt((x * 9.0)) * (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 <= 4d-46) then
tmp = sqrt(((2.0d0 * (y + (-1.0d0))) + (0.1111111111111111d0 * (1.0d0 / x))))
else
tmp = sqrt((x * 9.0d0)) * (y + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 4e-46) {
tmp = Math.sqrt(((2.0 * (y + -1.0)) + (0.1111111111111111 * (1.0 / x))));
} else {
tmp = Math.sqrt((x * 9.0)) * (y + -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 4e-46: tmp = math.sqrt(((2.0 * (y + -1.0)) + (0.1111111111111111 * (1.0 / x)))) else: tmp = math.sqrt((x * 9.0)) * (y + -1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= 4e-46) tmp = sqrt(Float64(Float64(2.0 * Float64(y + -1.0)) + Float64(0.1111111111111111 * Float64(1.0 / x)))); else tmp = Float64(sqrt(Float64(x * 9.0)) * Float64(y + -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 4e-46) tmp = sqrt(((2.0 * (y + -1.0)) + (0.1111111111111111 * (1.0 / x)))); else tmp = sqrt((x * 9.0)) * (y + -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 4e-46], N[Sqrt[N[(N[(2.0 * N[(y + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.1111111111111111 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4 \cdot 10^{-46}:\\
\;\;\;\;\sqrt{2 \cdot \left(y + -1\right) + 0.1111111111111111 \cdot \frac{1}{x}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (if (<= x 1.1e-46) (* (sqrt x) (- (* (/ 1.0 x) 0.3333333333333333) 3.0)) (* (sqrt (* x 9.0)) (+ y -1.0))))
double code(double x, double y) {
double tmp;
if (x <= 1.1e-46) {
tmp = sqrt(x) * (((1.0 / x) * 0.3333333333333333) - 3.0);
} else {
tmp = sqrt((x * 9.0)) * (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 <= 1.1d-46) then
tmp = sqrt(x) * (((1.0d0 / x) * 0.3333333333333333d0) - 3.0d0)
else
tmp = sqrt((x * 9.0d0)) * (y + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.1e-46) {
tmp = Math.sqrt(x) * (((1.0 / x) * 0.3333333333333333) - 3.0);
} else {
tmp = Math.sqrt((x * 9.0)) * (y + -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.1e-46: tmp = math.sqrt(x) * (((1.0 / x) * 0.3333333333333333) - 3.0) else: tmp = math.sqrt((x * 9.0)) * (y + -1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= 1.1e-46) tmp = Float64(sqrt(x) * Float64(Float64(Float64(1.0 / x) * 0.3333333333333333) - 3.0)); else tmp = Float64(sqrt(Float64(x * 9.0)) * Float64(y + -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.1e-46) tmp = sqrt(x) * (((1.0 / x) * 0.3333333333333333) - 3.0); else tmp = sqrt((x * 9.0)) * (y + -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.1e-46], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(N[(1.0 / x), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.1 \cdot 10^{-46}:\\
\;\;\;\;\sqrt{x} \cdot \left(\frac{1}{x} \cdot 0.3333333333333333 - 3\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (if (<= x 8.5e-46) (* (sqrt x) (- (/ 1.0 (* x 3.0)) 3.0)) (* (sqrt (* x 9.0)) (+ y -1.0))))
double code(double x, double y) {
double tmp;
if (x <= 8.5e-46) {
tmp = sqrt(x) * ((1.0 / (x * 3.0)) - 3.0);
} else {
tmp = sqrt((x * 9.0)) * (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 <= 8.5d-46) then
tmp = sqrt(x) * ((1.0d0 / (x * 3.0d0)) - 3.0d0)
else
tmp = sqrt((x * 9.0d0)) * (y + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 8.5e-46) {
tmp = Math.sqrt(x) * ((1.0 / (x * 3.0)) - 3.0);
} else {
tmp = Math.sqrt((x * 9.0)) * (y + -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 8.5e-46: tmp = math.sqrt(x) * ((1.0 / (x * 3.0)) - 3.0) else: tmp = math.sqrt((x * 9.0)) * (y + -1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= 8.5e-46) tmp = Float64(sqrt(x) * Float64(Float64(1.0 / Float64(x * 3.0)) - 3.0)); else tmp = Float64(sqrt(Float64(x * 9.0)) * Float64(y + -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 8.5e-46) tmp = sqrt(x) * ((1.0 / (x * 3.0)) - 3.0); else tmp = sqrt((x * 9.0)) * (y + -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 8.5e-46], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(1.0 / N[(x * 3.0), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.5 \cdot 10^{-46}:\\
\;\;\;\;\sqrt{x} \cdot \left(\frac{1}{x \cdot 3} - 3\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (* 3.0 (* (sqrt x) (+ y (+ (/ 0.1111111111111111 x) -1.0)))))
double code(double x, double y) {
return 3.0 * (sqrt(x) * (y + ((0.1111111111111111 / x) + -1.0)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 3.0d0 * (sqrt(x) * (y + ((0.1111111111111111d0 / x) + (-1.0d0))))
end function
public static double code(double x, double y) {
return 3.0 * (Math.sqrt(x) * (y + ((0.1111111111111111 / x) + -1.0)));
}
def code(x, y): return 3.0 * (math.sqrt(x) * (y + ((0.1111111111111111 / x) + -1.0)))
function code(x, y) return Float64(3.0 * Float64(sqrt(x) * Float64(y + Float64(Float64(0.1111111111111111 / x) + -1.0)))) end
function tmp = code(x, y) tmp = 3.0 * (sqrt(x) * (y + ((0.1111111111111111 / x) + -1.0))); end
code[x_, y_] := N[(3.0 * N[(N[Sqrt[x], $MachinePrecision] * N[(y + N[(N[(0.1111111111111111 / x), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
3 \cdot \left(\sqrt{x} \cdot \left(y + \left(\frac{0.1111111111111111}{x} + -1\right)\right)\right)
\end{array}
(FPCore (x y) :precision binary64 (* (sqrt x) (+ -3.0 (* 3.0 (+ y (/ 0.1111111111111111 x))))))
double code(double x, double y) {
return sqrt(x) * (-3.0 + (3.0 * (y + (0.1111111111111111 / x))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt(x) * ((-3.0d0) + (3.0d0 * (y + (0.1111111111111111d0 / x))))
end function
public static double code(double x, double y) {
return Math.sqrt(x) * (-3.0 + (3.0 * (y + (0.1111111111111111 / x))));
}
def code(x, y): return math.sqrt(x) * (-3.0 + (3.0 * (y + (0.1111111111111111 / x))))
function code(x, y) return Float64(sqrt(x) * Float64(-3.0 + Float64(3.0 * Float64(y + Float64(0.1111111111111111 / x))))) end
function tmp = code(x, y) tmp = sqrt(x) * (-3.0 + (3.0 * (y + (0.1111111111111111 / x)))); end
code[x_, y_] := N[(N[Sqrt[x], $MachinePrecision] * N[(-3.0 + N[(3.0 * N[(y + N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x} \cdot \left(-3 + 3 \cdot \left(y + \frac{0.1111111111111111}{x}\right)\right)
\end{array}
(FPCore (x y) :precision binary64 (* (sqrt (* x 9.0)) (+ (/ 0.1111111111111111 x) (+ y -1.0))))
double code(double x, double y) {
return sqrt((x * 9.0)) * ((0.1111111111111111 / x) + (y + -1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt((x * 9.0d0)) * ((0.1111111111111111d0 / x) + (y + (-1.0d0)))
end function
public static double code(double x, double y) {
return Math.sqrt((x * 9.0)) * ((0.1111111111111111 / x) + (y + -1.0));
}
def code(x, y): return math.sqrt((x * 9.0)) * ((0.1111111111111111 / x) + (y + -1.0))
function code(x, y) return Float64(sqrt(Float64(x * 9.0)) * Float64(Float64(0.1111111111111111 / x) + Float64(y + -1.0))) end
function tmp = code(x, y) tmp = sqrt((x * 9.0)) * ((0.1111111111111111 / x) + (y + -1.0)); end
code[x_, y_] := N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(N[(0.1111111111111111 / x), $MachinePrecision] + N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x \cdot 9} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)
\end{array}
(FPCore (x y) :precision binary64 (if (or (<= y -90000.0) (not (<= y 1.0))) (* 3.0 (* y (sqrt x))) (* (sqrt x) -3.0)))
double code(double x, double y) {
double tmp;
if ((y <= -90000.0) || !(y <= 1.0)) {
tmp = 3.0 * (y * sqrt(x));
} else {
tmp = 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 <= (-90000.0d0)) .or. (.not. (y <= 1.0d0))) then
tmp = 3.0d0 * (y * sqrt(x))
else
tmp = sqrt(x) * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -90000.0) || !(y <= 1.0)) {
tmp = 3.0 * (y * Math.sqrt(x));
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -90000.0) or not (y <= 1.0): tmp = 3.0 * (y * math.sqrt(x)) else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) tmp = 0.0 if ((y <= -90000.0) || !(y <= 1.0)) tmp = Float64(3.0 * Float64(y * sqrt(x))); else tmp = Float64(sqrt(x) * -3.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -90000.0) || ~((y <= 1.0))) tmp = 3.0 * (y * sqrt(x)); else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -90000.0], N[Not[LessEqual[y, 1.0]], $MachinePrecision]], N[(3.0 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -90000 \lor \neg \left(y \leq 1\right):\\
\;\;\;\;3 \cdot \left(y \cdot \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (if (or (<= y -90000.0) (not (<= y 1.0))) (* (sqrt (* x 9.0)) y) (* (sqrt x) -3.0)))
double code(double x, double y) {
double tmp;
if ((y <= -90000.0) || !(y <= 1.0)) {
tmp = sqrt((x * 9.0)) * y;
} else {
tmp = 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 <= (-90000.0d0)) .or. (.not. (y <= 1.0d0))) then
tmp = sqrt((x * 9.0d0)) * y
else
tmp = sqrt(x) * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -90000.0) || !(y <= 1.0)) {
tmp = Math.sqrt((x * 9.0)) * y;
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -90000.0) or not (y <= 1.0): tmp = math.sqrt((x * 9.0)) * y else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) tmp = 0.0 if ((y <= -90000.0) || !(y <= 1.0)) tmp = Float64(sqrt(Float64(x * 9.0)) * y); else tmp = Float64(sqrt(x) * -3.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -90000.0) || ~((y <= 1.0))) tmp = sqrt((x * 9.0)) * y; else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -90000.0], N[Not[LessEqual[y, 1.0]], $MachinePrecision]], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -90000 \lor \neg \left(y \leq 1\right):\\
\;\;\;\;\sqrt{x \cdot 9} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (if (<= y -90000.0) (* (sqrt x) (* y 3.0)) (if (<= y 1.0) (* (sqrt x) -3.0) (* (sqrt (* x 9.0)) y))))
double code(double x, double y) {
double tmp;
if (y <= -90000.0) {
tmp = sqrt(x) * (y * 3.0);
} else if (y <= 1.0) {
tmp = sqrt(x) * -3.0;
} else {
tmp = sqrt((x * 9.0)) * y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-90000.0d0)) then
tmp = sqrt(x) * (y * 3.0d0)
else if (y <= 1.0d0) then
tmp = sqrt(x) * (-3.0d0)
else
tmp = sqrt((x * 9.0d0)) * y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -90000.0) {
tmp = Math.sqrt(x) * (y * 3.0);
} else if (y <= 1.0) {
tmp = Math.sqrt(x) * -3.0;
} else {
tmp = Math.sqrt((x * 9.0)) * y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -90000.0: tmp = math.sqrt(x) * (y * 3.0) elif y <= 1.0: tmp = math.sqrt(x) * -3.0 else: tmp = math.sqrt((x * 9.0)) * y return tmp
function code(x, y) tmp = 0.0 if (y <= -90000.0) tmp = Float64(sqrt(x) * Float64(y * 3.0)); elseif (y <= 1.0) tmp = Float64(sqrt(x) * -3.0); else tmp = Float64(sqrt(Float64(x * 9.0)) * y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -90000.0) tmp = sqrt(x) * (y * 3.0); elseif (y <= 1.0) tmp = sqrt(x) * -3.0; else tmp = sqrt((x * 9.0)) * y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -90000.0], N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.0], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -90000:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot y\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (if (<= x 9e-46) (* 3.0 (* (/ 0.1111111111111111 x) (sqrt x))) (* 3.0 (* (sqrt x) (+ y -1.0)))))
double code(double x, double y) {
double tmp;
if (x <= 9e-46) {
tmp = 3.0 * ((0.1111111111111111 / x) * sqrt(x));
} else {
tmp = 3.0 * (sqrt(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 <= 9d-46) then
tmp = 3.0d0 * ((0.1111111111111111d0 / x) * sqrt(x))
else
tmp = 3.0d0 * (sqrt(x) * (y + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 9e-46) {
tmp = 3.0 * ((0.1111111111111111 / x) * Math.sqrt(x));
} else {
tmp = 3.0 * (Math.sqrt(x) * (y + -1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 9e-46: tmp = 3.0 * ((0.1111111111111111 / x) * math.sqrt(x)) else: tmp = 3.0 * (math.sqrt(x) * (y + -1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= 9e-46) tmp = Float64(3.0 * Float64(Float64(0.1111111111111111 / x) * sqrt(x))); else tmp = Float64(3.0 * Float64(sqrt(x) * Float64(y + -1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 9e-46) tmp = 3.0 * ((0.1111111111111111 / x) * sqrt(x)); else tmp = 3.0 * (sqrt(x) * (y + -1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 9e-46], N[(3.0 * N[(N[(0.1111111111111111 / x), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(3.0 * N[(N[Sqrt[x], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 9 \cdot 10^{-46}:\\
\;\;\;\;3 \cdot \left(\frac{0.1111111111111111}{x} \cdot \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(y + -1\right)\right)\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (if (<= x 8.6e-46) (* 3.0 (* (/ 0.1111111111111111 x) (sqrt x))) (* (sqrt x) (- (* y 3.0) 3.0))))
double code(double x, double y) {
double tmp;
if (x <= 8.6e-46) {
tmp = 3.0 * ((0.1111111111111111 / x) * sqrt(x));
} else {
tmp = sqrt(x) * ((y * 3.0) - 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 <= 8.6d-46) then
tmp = 3.0d0 * ((0.1111111111111111d0 / x) * sqrt(x))
else
tmp = sqrt(x) * ((y * 3.0d0) - 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 8.6e-46) {
tmp = 3.0 * ((0.1111111111111111 / x) * Math.sqrt(x));
} else {
tmp = Math.sqrt(x) * ((y * 3.0) - 3.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 8.6e-46: tmp = 3.0 * ((0.1111111111111111 / x) * math.sqrt(x)) else: tmp = math.sqrt(x) * ((y * 3.0) - 3.0) return tmp
function code(x, y) tmp = 0.0 if (x <= 8.6e-46) tmp = Float64(3.0 * Float64(Float64(0.1111111111111111 / x) * sqrt(x))); else tmp = Float64(sqrt(x) * Float64(Float64(y * 3.0) - 3.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 8.6e-46) tmp = 3.0 * ((0.1111111111111111 / x) * sqrt(x)); else tmp = sqrt(x) * ((y * 3.0) - 3.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 8.6e-46], N[(3.0 * N[(N[(0.1111111111111111 / x), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(y * 3.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.6 \cdot 10^{-46}:\\
\;\;\;\;3 \cdot \left(\frac{0.1111111111111111}{x} \cdot \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3 - 3\right)\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (if (<= x 9.5e-46) (* 3.0 (* (/ 0.1111111111111111 x) (sqrt x))) (* (sqrt (* x 9.0)) (+ y -1.0))))
double code(double x, double y) {
double tmp;
if (x <= 9.5e-46) {
tmp = 3.0 * ((0.1111111111111111 / x) * sqrt(x));
} else {
tmp = sqrt((x * 9.0)) * (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 <= 9.5d-46) then
tmp = 3.0d0 * ((0.1111111111111111d0 / x) * sqrt(x))
else
tmp = sqrt((x * 9.0d0)) * (y + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 9.5e-46) {
tmp = 3.0 * ((0.1111111111111111 / x) * Math.sqrt(x));
} else {
tmp = Math.sqrt((x * 9.0)) * (y + -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 9.5e-46: tmp = 3.0 * ((0.1111111111111111 / x) * math.sqrt(x)) else: tmp = math.sqrt((x * 9.0)) * (y + -1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= 9.5e-46) tmp = Float64(3.0 * Float64(Float64(0.1111111111111111 / x) * sqrt(x))); else tmp = Float64(sqrt(Float64(x * 9.0)) * Float64(y + -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 9.5e-46) tmp = 3.0 * ((0.1111111111111111 / x) * sqrt(x)); else tmp = sqrt((x * 9.0)) * (y + -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 9.5e-46], N[(3.0 * N[(N[(0.1111111111111111 / x), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 9.5 \cdot 10^{-46}:\\
\;\;\;\;3 \cdot \left(\frac{0.1111111111111111}{x} \cdot \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (* 3.0 (* (sqrt x) (+ y -1.0))))
double code(double x, double y) {
return 3.0 * (sqrt(x) * (y + -1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 3.0d0 * (sqrt(x) * (y + (-1.0d0)))
end function
public static double code(double x, double y) {
return 3.0 * (Math.sqrt(x) * (y + -1.0));
}
def code(x, y): return 3.0 * (math.sqrt(x) * (y + -1.0))
function code(x, y) return Float64(3.0 * Float64(sqrt(x) * Float64(y + -1.0))) end
function tmp = code(x, y) tmp = 3.0 * (sqrt(x) * (y + -1.0)); end
code[x_, y_] := N[(3.0 * N[(N[Sqrt[x], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
3 \cdot \left(\sqrt{x} \cdot \left(y + -1\right)\right)
\end{array}
(FPCore (x y) :precision binary64 (sqrt (* y 2.0)))
double code(double x, double y) {
return sqrt((y * 2.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt((y * 2.0d0))
end function
public static double code(double x, double y) {
return Math.sqrt((y * 2.0));
}
def code(x, y): return math.sqrt((y * 2.0))
function code(x, y) return sqrt(Float64(y * 2.0)) end
function tmp = code(x, y) tmp = sqrt((y * 2.0)); end
code[x_, y_] := N[Sqrt[N[(y * 2.0), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{y \cdot 2}
\end{array}
(FPCore (x y) :precision binary64 (* (sqrt x) -3.0))
double code(double x, double y) {
return sqrt(x) * -3.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt(x) * (-3.0d0)
end function
public static double code(double x, double y) {
return Math.sqrt(x) * -3.0;
}
def code(x, y): return math.sqrt(x) * -3.0
function code(x, y) return Float64(sqrt(x) * -3.0) end
function tmp = code(x, y) tmp = sqrt(x) * -3.0; end
code[x_, y_] := N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x} \cdot -3
\end{array}
(FPCore (x y) :precision binary64 (* 3.0 (+ (* y (sqrt x)) (* (- (/ 1.0 (* x 9.0)) 1.0) (sqrt x)))))
double code(double x, double y) {
return 3.0 * ((y * sqrt(x)) + (((1.0 / (x * 9.0)) - 1.0) * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 3.0d0 * ((y * sqrt(x)) + (((1.0d0 / (x * 9.0d0)) - 1.0d0) * sqrt(x)))
end function
public static double code(double x, double y) {
return 3.0 * ((y * Math.sqrt(x)) + (((1.0 / (x * 9.0)) - 1.0) * Math.sqrt(x)));
}
def code(x, y): return 3.0 * ((y * math.sqrt(x)) + (((1.0 / (x * 9.0)) - 1.0) * math.sqrt(x)))
function code(x, y) return Float64(3.0 * Float64(Float64(y * sqrt(x)) + Float64(Float64(Float64(1.0 / Float64(x * 9.0)) - 1.0) * sqrt(x)))) end
function tmp = code(x, y) tmp = 3.0 * ((y * sqrt(x)) + (((1.0 / (x * 9.0)) - 1.0) * sqrt(x))); end
code[x_, y_] := N[(3.0 * N[(N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
3 \cdot \left(y \cdot \sqrt{x} + \left(\frac{1}{x \cdot 9} - 1\right) \cdot \sqrt{x}\right)
\end{array}
herbie shell --seed 2023343
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, B"
:precision binary64
:herbie-target
(* 3.0 (+ (* y (sqrt x)) (* (- (/ 1.0 (* x 9.0)) 1.0) (sqrt x))))
(* (* 3.0 (sqrt x)) (- (+ y (/ 1.0 (* x 9.0))) 1.0)))