Average Error: 14.7 → 0.3
Time: 6.8s
Precision: binary64
\[\]
\[\]
double code(double x) {
	return ((double) (((double) (((double) (((double) (8.0 / 3.0)) * ((double) sin(((double) (x * 0.5)))))) * ((double) sin(((double) (x * 0.5)))))) / ((double) sin(x))));
}
double code(double x) {
	return ((double) (8.0 * ((double) (((double) (((double) sin(((double) (x * 0.5)))) / 3.0)) * ((double) (((double) sin(((double) (x * 0.5)))) / ((double) sin(x))))))));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original14.7
Target0.3
Herbie0.3
\[\]

Derivation

  1. Initial program 14.7

    \[\]
  2. Simplified0.5

    \[\leadsto \]
  3. Using strategy rm
  4. Applied *-un-lft-identity0.5

    \[\leadsto \]
  5. Applied times-frac0.5

    \[\leadsto \]
  6. Applied associate-*r*0.5

    \[\leadsto \]
  7. Simplified0.3

    \[\leadsto \]
  8. Final simplification0.3

    \[\leadsto \]

Reproduce

herbie shell --seed 2020191 
(FPCore (x)
  :name "Graphics.Rasterific.Svg.PathConverter:segmentToBezier from rasterific-svg-0.2.3.1, A"
  :precision binary64

  :herbie-target
  (/ (/ (* 8.0 (sin (* x 0.5))) 3.0) (/ (sin x) (sin (* x 0.5))))

  (/ (* (* (/ 8.0 3.0) (sin (* x 0.5))) (sin (* x 0.5))) (sin x)))