(FPCore (x y) :precision binary64 (/ (atan x) (atan y)))
double code(double x, double y) { return atan(x) / atan(y); }
real(8) function code(x, y) real(8), intent (in) :: x real(8), intent (in) :: y code = atan(x) / atan(y) end function
public static double code(double x, double y) { return Math.atan(x) / Math.atan(y); }
def code(x, y): return math.atan(x) / math.atan(y)
function code(x, y) return Float64(atan(x) / atan(y)) end
function tmp = code(x, y) tmp = atan(x) / atan(y); end
code[x_, y_] := N[(N[ArcTan[x], $MachinePrecision] / N[ArcTan[y], $MachinePrecision]), $MachinePrecision]
\begin{array}{l} \\ \frac{\tan^{-1} x}{\tan^{-1} y} \end{array}
Sampling outcomes in binary64 precision:
Herbie found 1 alternatives:
Alternative | Accuracy | Speedup |
---|
(FPCore (x y) :precision binary64 (/ (atan x) (atan y)))
double code(double x, double y) { return atan(x) / atan(y); }
real(8) function code(x, y) real(8), intent (in) :: x real(8), intent (in) :: y code = atan(x) / atan(y) end function
public static double code(double x, double y) { return Math.atan(x) / Math.atan(y); }
def code(x, y): return math.atan(x) / math.atan(y)
function code(x, y) return Float64(atan(x) / atan(y)) end
function tmp = code(x, y) tmp = atan(x) / atan(y); end
code[x_, y_] := N[(N[ArcTan[x], $MachinePrecision] / N[ArcTan[y], $MachinePrecision]), $MachinePrecision]
\begin{array}{l} \\ \frac{\tan^{-1} x}{\tan^{-1} y} \end{array}
(FPCore (x y) :precision binary64 (/ (atan x) (atan y)))
double code(double x, double y) { return atan(x) / atan(y); }
real(8) function code(x, y) real(8), intent (in) :: x real(8), intent (in) :: y code = atan(x) / atan(y) end function
public static double code(double x, double y) { return Math.atan(x) / Math.atan(y); }
def code(x, y): return math.atan(x) / math.atan(y)
function code(x, y) return Float64(atan(x) / atan(y)) end
function tmp = code(x, y) tmp = atan(x) / atan(y); end
code[x_, y_] := N[(N[ArcTan[x], $MachinePrecision] / N[ArcTan[y], $MachinePrecision]), $MachinePrecision]
\begin{array}{l} \\ \frac{\tan^{-1} x}{\tan^{-1} y} \end{array}
Initial program 99.7%
herbie shell --seed 1
(FPCore (x y)
:name "atan(x)/atan(y)"
:precision binary64
:pre (and (and (<= -1.79e+308 x) (<= x 1.79e+308)) (and (<= -1.79e+308 y) (<= y 1.79e+308)))
(/ (atan x) (atan y)))