(FPCore () :precision binary64 (sin PI))
double code() { return sin(((double) M_PI)); }
public static double code() { return Math.sin(Math.PI); }
def code(): return math.sin(math.pi)
function code() return sin(pi) end
function tmp = code() tmp = sin(pi); end
code[] := N[Sin[Pi], $MachinePrecision]
\begin{array}{l} \\ \sin \pi \end{array}
Sampling outcomes in binary64 precision:
Herbie found 1 alternatives:
Alternative | Accuracy | Speedup |
---|
(FPCore () :precision binary64 (sin PI))
double code() { return sin(((double) M_PI)); }
public static double code() { return Math.sin(Math.PI); }
def code(): return math.sin(math.pi)
function code() return sin(pi) end
function tmp = code() tmp = sin(pi); end
code[] := N[Sin[Pi], $MachinePrecision]
\begin{array}{l} \\ \sin \pi \end{array}
(FPCore () :precision binary64 0.0)
double code() { return 0.0; }
real(8) function code() code = 0.0d0 end function
public static double code() { return 0.0; }
def code(): return 0.0
function code() return 0.0 end
function tmp = code() tmp = 0.0; end
code[] := 0.0
\begin{array}{l} \\ 0 \end{array}
Initial program 3.2%
sin-PI
100.0
Applied egg-rr100.0%
herbie shell --seed 5
(FPCore ()
:name "sin(PI)"
:precision binary64
(sin PI))