
(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 15 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) (fma 3.0 y (+ -3.0 (pow (* x 3.0) -1.0)))))
double code(double x, double y) {
return sqrt(x) * fma(3.0, y, (-3.0 + pow((x * 3.0), -1.0)));
}
function code(x, y) return Float64(sqrt(x) * fma(3.0, y, Float64(-3.0 + (Float64(x * 3.0) ^ -1.0)))) end
code[x_, y_] := N[(N[Sqrt[x], $MachinePrecision] * N[(3.0 * y + N[(-3.0 + N[Power[N[(x * 3.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + {\left(x \cdot 3\right)}^{-1}\right)
\end{array}
(FPCore (x y) :precision binary64 (+ (* (sqrt x) (+ -3.0 (/ 0.3333333333333333 x))) (* (sqrt x) (* 3.0 y))))
double code(double x, double y) {
return (sqrt(x) * (-3.0 + (0.3333333333333333 / x))) + (sqrt(x) * (3.0 * y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (sqrt(x) * ((-3.0d0) + (0.3333333333333333d0 / x))) + (sqrt(x) * (3.0d0 * y))
end function
public static double code(double x, double y) {
return (Math.sqrt(x) * (-3.0 + (0.3333333333333333 / x))) + (Math.sqrt(x) * (3.0 * y));
}
def code(x, y): return (math.sqrt(x) * (-3.0 + (0.3333333333333333 / x))) + (math.sqrt(x) * (3.0 * y))
function code(x, y) return Float64(Float64(sqrt(x) * Float64(-3.0 + Float64(0.3333333333333333 / x))) + Float64(sqrt(x) * Float64(3.0 * y))) end
function tmp = code(x, y) tmp = (sqrt(x) * (-3.0 + (0.3333333333333333 / x))) + (sqrt(x) * (3.0 * y)); end
code[x_, y_] := N[(N[(N[Sqrt[x], $MachinePrecision] * N[(-3.0 + N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[x], $MachinePrecision] * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x} \cdot \left(-3 + \frac{0.3333333333333333}{x}\right) + \sqrt{x} \cdot \left(3 \cdot y\right)
\end{array}
(FPCore (x y) :precision binary64 (* (sqrt x) (fma 3.0 y (+ -3.0 (/ 0.3333333333333333 x)))))
double code(double x, double y) {
return sqrt(x) * fma(3.0, y, (-3.0 + (0.3333333333333333 / x)));
}
function code(x, y) return Float64(sqrt(x) * fma(3.0, y, Float64(-3.0 + Float64(0.3333333333333333 / x)))) end
code[x_, y_] := N[(N[Sqrt[x], $MachinePrecision] * N[(3.0 * y + N[(-3.0 + N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{0.3333333333333333}{x}\right)
\end{array}
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 0.3333333333333333 (sqrt (/ 1.0 x)))))
(if (<= x 4e-105)
t_0
(if (<= x 1.55e-93)
(* y (* (sqrt x) 3.0))
(if (<= x 1.15e-34)
t_0
(if (<= x 2.2)
(* 3.0 (* (sqrt x) y))
(if (or (<= x 3.9e+81) (not (<= x 2.8e+217)))
(* (sqrt x) -3.0)
(* (sqrt x) (* 3.0 y)))))))))
double code(double x, double y) {
double t_0 = 0.3333333333333333 * sqrt((1.0 / x));
double tmp;
if (x <= 4e-105) {
tmp = t_0;
} else if (x <= 1.55e-93) {
tmp = y * (sqrt(x) * 3.0);
} else if (x <= 1.15e-34) {
tmp = t_0;
} else if (x <= 2.2) {
tmp = 3.0 * (sqrt(x) * y);
} else if ((x <= 3.9e+81) || !(x <= 2.8e+217)) {
tmp = sqrt(x) * -3.0;
} else {
tmp = sqrt(x) * (3.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 = 0.3333333333333333d0 * sqrt((1.0d0 / x))
if (x <= 4d-105) then
tmp = t_0
else if (x <= 1.55d-93) then
tmp = y * (sqrt(x) * 3.0d0)
else if (x <= 1.15d-34) then
tmp = t_0
else if (x <= 2.2d0) then
tmp = 3.0d0 * (sqrt(x) * y)
else if ((x <= 3.9d+81) .or. (.not. (x <= 2.8d+217))) then
tmp = sqrt(x) * (-3.0d0)
else
tmp = sqrt(x) * (3.0d0 * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.3333333333333333 * Math.sqrt((1.0 / x));
double tmp;
if (x <= 4e-105) {
tmp = t_0;
} else if (x <= 1.55e-93) {
tmp = y * (Math.sqrt(x) * 3.0);
} else if (x <= 1.15e-34) {
tmp = t_0;
} else if (x <= 2.2) {
tmp = 3.0 * (Math.sqrt(x) * y);
} else if ((x <= 3.9e+81) || !(x <= 2.8e+217)) {
tmp = Math.sqrt(x) * -3.0;
} else {
tmp = Math.sqrt(x) * (3.0 * y);
}
return tmp;
}
def code(x, y): t_0 = 0.3333333333333333 * math.sqrt((1.0 / x)) tmp = 0 if x <= 4e-105: tmp = t_0 elif x <= 1.55e-93: tmp = y * (math.sqrt(x) * 3.0) elif x <= 1.15e-34: tmp = t_0 elif x <= 2.2: tmp = 3.0 * (math.sqrt(x) * y) elif (x <= 3.9e+81) or not (x <= 2.8e+217): tmp = math.sqrt(x) * -3.0 else: tmp = math.sqrt(x) * (3.0 * y) return tmp
function code(x, y) t_0 = Float64(0.3333333333333333 * sqrt(Float64(1.0 / x))) tmp = 0.0 if (x <= 4e-105) tmp = t_0; elseif (x <= 1.55e-93) tmp = Float64(y * Float64(sqrt(x) * 3.0)); elseif (x <= 1.15e-34) tmp = t_0; elseif (x <= 2.2) tmp = Float64(3.0 * Float64(sqrt(x) * y)); elseif ((x <= 3.9e+81) || !(x <= 2.8e+217)) tmp = Float64(sqrt(x) * -3.0); else tmp = Float64(sqrt(x) * Float64(3.0 * y)); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.3333333333333333 * sqrt((1.0 / x)); tmp = 0.0; if (x <= 4e-105) tmp = t_0; elseif (x <= 1.55e-93) tmp = y * (sqrt(x) * 3.0); elseif (x <= 1.15e-34) tmp = t_0; elseif (x <= 2.2) tmp = 3.0 * (sqrt(x) * y); elseif ((x <= 3.9e+81) || ~((x <= 2.8e+217))) tmp = sqrt(x) * -3.0; else tmp = sqrt(x) * (3.0 * y); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.3333333333333333 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 4e-105], t$95$0, If[LessEqual[x, 1.55e-93], N[(y * N[(N[Sqrt[x], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e-34], t$95$0, If[LessEqual[x, 2.2], N[(3.0 * N[(N[Sqrt[x], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 3.9e+81], N[Not[LessEqual[x, 2.8e+217]], $MachinePrecision]], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.3333333333333333 \cdot \sqrt{\frac{1}{x}}\\
\mathbf{if}\;x \leq 4 \cdot 10^{-105}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{-93}:\\
\;\;\;\;y \cdot \left(\sqrt{x} \cdot 3\right)\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-34}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.2:\\
\;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+81} \lor \neg \left(x \leq 2.8 \cdot 10^{+217}\right):\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(3 \cdot y\right)\\
\end{array}
\end{array}
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 0.3333333333333333 (sqrt (/ 1.0 x)))))
(if (<= x 3.9e-103)
t_0
(if (<= x 1.55e-93)
(* y (* (sqrt x) 3.0))
(if (<= x 1.22e-34) t_0 (* 3.0 (* (sqrt x) (+ y -1.0))))))))
double code(double x, double y) {
double t_0 = 0.3333333333333333 * sqrt((1.0 / x));
double tmp;
if (x <= 3.9e-103) {
tmp = t_0;
} else if (x <= 1.55e-93) {
tmp = y * (sqrt(x) * 3.0);
} else if (x <= 1.22e-34) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = 0.3333333333333333d0 * sqrt((1.0d0 / x))
if (x <= 3.9d-103) then
tmp = t_0
else if (x <= 1.55d-93) then
tmp = y * (sqrt(x) * 3.0d0)
else if (x <= 1.22d-34) then
tmp = t_0
else
tmp = 3.0d0 * (sqrt(x) * (y + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.3333333333333333 * Math.sqrt((1.0 / x));
double tmp;
if (x <= 3.9e-103) {
tmp = t_0;
} else if (x <= 1.55e-93) {
tmp = y * (Math.sqrt(x) * 3.0);
} else if (x <= 1.22e-34) {
tmp = t_0;
} else {
tmp = 3.0 * (Math.sqrt(x) * (y + -1.0));
}
return tmp;
}
def code(x, y): t_0 = 0.3333333333333333 * math.sqrt((1.0 / x)) tmp = 0 if x <= 3.9e-103: tmp = t_0 elif x <= 1.55e-93: tmp = y * (math.sqrt(x) * 3.0) elif x <= 1.22e-34: tmp = t_0 else: tmp = 3.0 * (math.sqrt(x) * (y + -1.0)) return tmp
function code(x, y) t_0 = Float64(0.3333333333333333 * sqrt(Float64(1.0 / x))) tmp = 0.0 if (x <= 3.9e-103) tmp = t_0; elseif (x <= 1.55e-93) tmp = Float64(y * Float64(sqrt(x) * 3.0)); elseif (x <= 1.22e-34) tmp = t_0; else tmp = Float64(3.0 * Float64(sqrt(x) * Float64(y + -1.0))); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.3333333333333333 * sqrt((1.0 / x)); tmp = 0.0; if (x <= 3.9e-103) tmp = t_0; elseif (x <= 1.55e-93) tmp = y * (sqrt(x) * 3.0); elseif (x <= 1.22e-34) tmp = t_0; else tmp = 3.0 * (sqrt(x) * (y + -1.0)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.3333333333333333 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 3.9e-103], t$95$0, If[LessEqual[x, 1.55e-93], N[(y * N[(N[Sqrt[x], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.22e-34], t$95$0, N[(3.0 * N[(N[Sqrt[x], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.3333333333333333 \cdot \sqrt{\frac{1}{x}}\\
\mathbf{if}\;x \leq 3.9 \cdot 10^{-103}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{-93}:\\
\;\;\;\;y \cdot \left(\sqrt{x} \cdot 3\right)\\
\mathbf{elif}\;x \leq 1.22 \cdot 10^{-34}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(y + -1\right)\right)\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (if (<= x 0.11) (* 3.0 (* (sqrt x) (+ y (/ 0.1111111111111111 x)))) (* 3.0 (* (sqrt x) (+ y -1.0)))))
double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = 3.0 * (sqrt(x) * (y + (0.1111111111111111 / 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 <= 0.11d0) then
tmp = 3.0d0 * (sqrt(x) * (y + (0.1111111111111111d0 / 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 <= 0.11) {
tmp = 3.0 * (Math.sqrt(x) * (y + (0.1111111111111111 / x)));
} else {
tmp = 3.0 * (Math.sqrt(x) * (y + -1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.11: tmp = 3.0 * (math.sqrt(x) * (y + (0.1111111111111111 / x))) else: tmp = 3.0 * (math.sqrt(x) * (y + -1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.11) tmp = Float64(3.0 * Float64(sqrt(x) * Float64(y + Float64(0.1111111111111111 / 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 <= 0.11) tmp = 3.0 * (sqrt(x) * (y + (0.1111111111111111 / x))); else tmp = 3.0 * (sqrt(x) * (y + -1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.11], N[(3.0 * N[(N[Sqrt[x], $MachinePrecision] * N[(y + N[(0.1111111111111111 / x), $MachinePrecision]), $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 0.11:\\
\;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(y + \frac{0.1111111111111111}{x}\right)\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 1.2) (* (+ y (/ 0.1111111111111111 x)) (sqrt (* x 9.0))) (* 3.0 (* (sqrt x) (+ y -1.0)))))
double code(double x, double y) {
double tmp;
if (x <= 1.2) {
tmp = (y + (0.1111111111111111 / x)) * sqrt((x * 9.0));
} 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 <= 1.2d0) then
tmp = (y + (0.1111111111111111d0 / x)) * sqrt((x * 9.0d0))
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 <= 1.2) {
tmp = (y + (0.1111111111111111 / x)) * Math.sqrt((x * 9.0));
} else {
tmp = 3.0 * (Math.sqrt(x) * (y + -1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.2: tmp = (y + (0.1111111111111111 / x)) * math.sqrt((x * 9.0)) else: tmp = 3.0 * (math.sqrt(x) * (y + -1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= 1.2) tmp = Float64(Float64(y + Float64(0.1111111111111111 / x)) * sqrt(Float64(x * 9.0))); 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 <= 1.2) tmp = (y + (0.1111111111111111 / x)) * sqrt((x * 9.0)); else tmp = 3.0 * (sqrt(x) * (y + -1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.2], N[(N[(y + N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(x * 9.0), $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 1.2:\\
\;\;\;\;\left(y + \frac{0.1111111111111111}{x}\right) \cdot \sqrt{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(y + -1\right)\right)\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (* 3.0 (* (sqrt x) (+ y (+ -1.0 (/ 0.1111111111111111 x))))))
double code(double x, double y) {
return 3.0 * (sqrt(x) * (y + (-1.0 + (0.1111111111111111 / x))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 3.0d0 * (sqrt(x) * (y + ((-1.0d0) + (0.1111111111111111d0 / x))))
end function
public static double code(double x, double y) {
return 3.0 * (Math.sqrt(x) * (y + (-1.0 + (0.1111111111111111 / x))));
}
def code(x, y): return 3.0 * (math.sqrt(x) * (y + (-1.0 + (0.1111111111111111 / x))))
function code(x, y) return Float64(3.0 * Float64(sqrt(x) * Float64(y + Float64(-1.0 + Float64(0.1111111111111111 / x))))) end
function tmp = code(x, y) tmp = 3.0 * (sqrt(x) * (y + (-1.0 + (0.1111111111111111 / x)))); end
code[x_, y_] := N[(3.0 * N[(N[Sqrt[x], $MachinePrecision] * N[(y + N[(-1.0 + N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
3 \cdot \left(\sqrt{x} \cdot \left(y + \left(-1 + \frac{0.1111111111111111}{x}\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 (* (+ y (+ -1.0 (/ 0.1111111111111111 x))) (* (sqrt x) 3.0)))
double code(double x, double y) {
return (y + (-1.0 + (0.1111111111111111 / x))) * (sqrt(x) * 3.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (y + ((-1.0d0) + (0.1111111111111111d0 / x))) * (sqrt(x) * 3.0d0)
end function
public static double code(double x, double y) {
return (y + (-1.0 + (0.1111111111111111 / x))) * (Math.sqrt(x) * 3.0);
}
def code(x, y): return (y + (-1.0 + (0.1111111111111111 / x))) * (math.sqrt(x) * 3.0)
function code(x, y) return Float64(Float64(y + Float64(-1.0 + Float64(0.1111111111111111 / x))) * Float64(sqrt(x) * 3.0)) end
function tmp = code(x, y) tmp = (y + (-1.0 + (0.1111111111111111 / x))) * (sqrt(x) * 3.0); end
code[x_, y_] := N[(N[(y + N[(-1.0 + N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[x], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y + \left(-1 + \frac{0.1111111111111111}{x}\right)\right) \cdot \left(\sqrt{x} \cdot 3\right)
\end{array}
(FPCore (x y) :precision binary64 (if (or (<= y -10000.0) (not (<= y 3.5e-26))) (* 3.0 (* (sqrt x) y)) (* (sqrt x) -3.0)))
double code(double x, double y) {
double tmp;
if ((y <= -10000.0) || !(y <= 3.5e-26)) {
tmp = 3.0 * (sqrt(x) * 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 <= (-10000.0d0)) .or. (.not. (y <= 3.5d-26))) then
tmp = 3.0d0 * (sqrt(x) * 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 <= -10000.0) || !(y <= 3.5e-26)) {
tmp = 3.0 * (Math.sqrt(x) * y);
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -10000.0) or not (y <= 3.5e-26): tmp = 3.0 * (math.sqrt(x) * y) else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) tmp = 0.0 if ((y <= -10000.0) || !(y <= 3.5e-26)) tmp = Float64(3.0 * Float64(sqrt(x) * y)); else tmp = Float64(sqrt(x) * -3.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -10000.0) || ~((y <= 3.5e-26))) tmp = 3.0 * (sqrt(x) * y); else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -10000.0], N[Not[LessEqual[y, 3.5e-26]], $MachinePrecision]], N[(3.0 * N[(N[Sqrt[x], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -10000 \lor \neg \left(y \leq 3.5 \cdot 10^{-26}\right):\\
\;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (if (or (<= y -10000.0) (not (<= y 3.5e-26))) (* y (* (sqrt x) 3.0)) (* (sqrt x) -3.0)))
double code(double x, double y) {
double tmp;
if ((y <= -10000.0) || !(y <= 3.5e-26)) {
tmp = y * (sqrt(x) * 3.0);
} 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 <= (-10000.0d0)) .or. (.not. (y <= 3.5d-26))) then
tmp = y * (sqrt(x) * 3.0d0)
else
tmp = sqrt(x) * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -10000.0) || !(y <= 3.5e-26)) {
tmp = y * (Math.sqrt(x) * 3.0);
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -10000.0) or not (y <= 3.5e-26): tmp = y * (math.sqrt(x) * 3.0) else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) tmp = 0.0 if ((y <= -10000.0) || !(y <= 3.5e-26)) tmp = Float64(y * Float64(sqrt(x) * 3.0)); else tmp = Float64(sqrt(x) * -3.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -10000.0) || ~((y <= 3.5e-26))) tmp = y * (sqrt(x) * 3.0); else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -10000.0], N[Not[LessEqual[y, 3.5e-26]], $MachinePrecision]], N[(y * N[(N[Sqrt[x], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -10000 \lor \neg \left(y \leq 3.5 \cdot 10^{-26}\right):\\
\;\;\;\;y \cdot \left(\sqrt{x} \cdot 3\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (if (<= y -10000.0) (* y (* (sqrt x) 3.0)) (if (<= y 3.5e-26) (* (sqrt x) -3.0) (* (sqrt x) (* 3.0 y)))))
double code(double x, double y) {
double tmp;
if (y <= -10000.0) {
tmp = y * (sqrt(x) * 3.0);
} else if (y <= 3.5e-26) {
tmp = sqrt(x) * -3.0;
} else {
tmp = sqrt(x) * (3.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 <= (-10000.0d0)) then
tmp = y * (sqrt(x) * 3.0d0)
else if (y <= 3.5d-26) then
tmp = sqrt(x) * (-3.0d0)
else
tmp = sqrt(x) * (3.0d0 * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -10000.0) {
tmp = y * (Math.sqrt(x) * 3.0);
} else if (y <= 3.5e-26) {
tmp = Math.sqrt(x) * -3.0;
} else {
tmp = Math.sqrt(x) * (3.0 * y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -10000.0: tmp = y * (math.sqrt(x) * 3.0) elif y <= 3.5e-26: tmp = math.sqrt(x) * -3.0 else: tmp = math.sqrt(x) * (3.0 * y) return tmp
function code(x, y) tmp = 0.0 if (y <= -10000.0) tmp = Float64(y * Float64(sqrt(x) * 3.0)); elseif (y <= 3.5e-26) tmp = Float64(sqrt(x) * -3.0); else tmp = Float64(sqrt(x) * Float64(3.0 * y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -10000.0) tmp = y * (sqrt(x) * 3.0); elseif (y <= 3.5e-26) tmp = sqrt(x) * -3.0; else tmp = sqrt(x) * (3.0 * y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -10000.0], N[(y * N[(N[Sqrt[x], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e-26], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -10000:\\
\;\;\;\;y \cdot \left(\sqrt{x} \cdot 3\right)\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-26}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(3 \cdot y\right)\\
\end{array}
\end{array}
(FPCore (x y) :precision binary64 (sqrt (* x 9.0)))
double code(double x, double y) {
return sqrt((x * 9.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt((x * 9.0d0))
end function
public static double code(double x, double y) {
return Math.sqrt((x * 9.0));
}
def code(x, y): return math.sqrt((x * 9.0))
function code(x, y) return sqrt(Float64(x * 9.0)) end
function tmp = code(x, y) tmp = sqrt((x * 9.0)); end
code[x_, y_] := N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x \cdot 9}
\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 2024008
(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)))