(FPCore () :precision binary64 (* 4.0 (atan 1.0)))
double code() { return 4.0 * atan(1.0); }
real(8) function code() code = 4.0d0 * atan(1.0d0) end function
public static double code() { return 4.0 * Math.atan(1.0); }
def code(): return 4.0 * math.atan(1.0)
function code() return Float64(4.0 * atan(1.0)) end
function tmp = code() tmp = 4.0 * atan(1.0); end
code[] := N[(4.0 * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l} \\ 4 \cdot \tan^{-1} 1 \end{array}
Sampling outcomes in binary64 precision:
Herbie found 1 alternatives:
Alternative | Accuracy | Speedup |
---|
(FPCore () :precision binary64 (* 4.0 (atan 1.0)))
double code() { return 4.0 * atan(1.0); }
real(8) function code() code = 4.0d0 * atan(1.0d0) end function
public static double code() { return 4.0 * Math.atan(1.0); }
def code(): return 4.0 * math.atan(1.0)
function code() return Float64(4.0 * atan(1.0)) end
function tmp = code() tmp = 4.0 * atan(1.0); end
code[] := N[(4.0 * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l} \\ 4 \cdot \tan^{-1} 1 \end{array}
(FPCore () :precision binary64 (* 4.0 (atan 1.0)))
double code() { return 4.0 * atan(1.0); }
real(8) function code() code = 4.0d0 * atan(1.0d0) end function
public static double code() { return 4.0 * Math.atan(1.0); }
def code(): return 4.0 * math.atan(1.0)
function code() return Float64(4.0 * atan(1.0)) end
function tmp = code() tmp = 4.0 * atan(1.0); end
code[] := N[(4.0 * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l} \\ 4 \cdot \tan^{-1} 1 \end{array}
Initial program 100.0%
herbie shell --seed 1
(FPCore ()
:name "4*atan(1)"
:precision binary64
(* 4.0 (atan 1.0)))