(FPCore (x) :precision binary64 (sin (* (PI) x)))
\begin{array}{l} \\ \sin \left(\mathsf{PI}\left(\right) \cdot x\right) \end{array}
Sampling outcomes in binary64 precision:
Herbie found 3 alternatives:
Alternative | Accuracy | Speedup |
---|
(FPCore (x) :precision binary64 (sin (* (PI) x)))
\begin{array}{l} \\ \sin \left(\mathsf{PI}\left(\right) \cdot x\right) \end{array}
(FPCore (x) :precision binary64 (sin (* (PI) x)))
\begin{array}{l} \\ \sin \left(\mathsf{PI}\left(\right) \cdot x\right) \end{array}
Initial program 99.7%
(FPCore (x) :precision binary64 (* (PI) x))
\begin{array}{l} \\ \mathsf{PI}\left(\right) \cdot x \end{array}
Initial program 99.7%
Taylor expanded in x around 0
*-commutative
N/A
lower-*.f64
N/A
lower-PI.f64
98.0
Applied rewrites98.0%
(FPCore (x) :precision binary64 x)
double code(double x) { return x; }
real(8) function code(x) real(8), intent (in) :: x code = x end function
public static double code(double x) { return x; }
def code(x): return x
function code(x) return x end
function tmp = code(x) tmp = x; end
code[x_] := x
\begin{array}{l} \\ x \end{array}
Initial program 99.7%
Taylor expanded in x around 0
*-commutative
N/A
lower-*.f64
N/A
lower-PI.f64
98.0
Applied rewrites98.0%
Applied rewrites17.6%
herbie shell --seed 1
(FPCore (x)
:name "sin(PI*x)"
:precision binary64
:pre (and (<= 0.0 x) (<= x 2.0))
(sin (* (PI) x)))