Average Error: 18.2 → 18.2
Time: 2.2s
Precision: binary64
\[\left|\sin x - \frac{\left(16 \cdot x\right) \cdot \left(\pi - x\right)}{5 \cdot {\pi}^{2} - \left(4 \cdot x\right) \cdot \left(\pi - x\right)}\right|\]
\[\left|\sin x - \frac{\left(16 \cdot x\right) \cdot \left(\pi - x\right)}{5 \cdot {\pi}^{2} - \left(4 \cdot x\right) \cdot \left(\pi - x\right)}\right|\]
\left|\sin x - \frac{\left(16 \cdot x\right) \cdot \left(\pi - x\right)}{5 \cdot {\pi}^{2} - \left(4 \cdot x\right) \cdot \left(\pi - x\right)}\right|
\left|\sin x - \frac{\left(16 \cdot x\right) \cdot \left(\pi - x\right)}{5 \cdot {\pi}^{2} - \left(4 \cdot x\right) \cdot \left(\pi - x\right)}\right|
double code(double x) {
	return ((double) fabs(((double) (((double) sin(x)) - ((double) (((double) (((double) (16.0 * x)) * ((double) (((double) M_PI) - x)))) / ((double) (((double) (5.0 * ((double) pow(((double) M_PI), 2.0)))) - ((double) (((double) (4.0 * x)) * ((double) (((double) M_PI) - x))))))))))));
}
double code(double x) {
	return ((double) fabs(((double) (((double) sin(x)) - ((double) (((double) (((double) (16.0 * x)) * ((double) (((double) M_PI) - x)))) / ((double) (((double) (5.0 * ((double) pow(((double) M_PI), 2.0)))) - ((double) (((double) (4.0 * x)) * ((double) (((double) M_PI) - x))))))))))));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 18.2

    \[\left|\sin x - \frac{\left(16 \cdot x\right) \cdot \left(\pi - x\right)}{5 \cdot {\pi}^{2} - \left(4 \cdot x\right) \cdot \left(\pi - x\right)}\right|\]
  2. Final simplification18.2

    \[\leadsto \left|\sin x - \frac{\left(16 \cdot x\right) \cdot \left(\pi - x\right)}{5 \cdot {\pi}^{2} - \left(4 \cdot x\right) \cdot \left(\pi - x\right)}\right|\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x)
  :name "(fabs (- (sin x) (/ (* (* 16 x) (- PI x)) (- (* 5 (pow PI 2)) (* (* 4 x) (- PI x))))))"
  :precision binary64
  (fabs (- (sin x) (/ (* (* 16.0 x) (- PI x)) (- (* 5.0 (pow PI 2.0)) (* (* 4.0 x) (- PI x)))))))