Average Error: 0.5 → 0.4
Time: 16.1s
Precision: binary64
\[\frac{2 + \left(\left(\sqrt{2} \cdot \left(\sin x - \frac{\sin y}{16}\right)\right) \cdot \left(\sin y - \frac{\sin x}{16}\right)\right) \cdot \left(\cos x - \cos y\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}\]
\[\frac{\left(\left(0.0625 \cdot \left(\left(\cos x \cdot \sqrt{2}\right) \cdot \left({\sin x}^{2} + {\sin y}^{2}\right)\right) + \sin y \cdot \left(\left(\cos y \cdot 1.00390625\right) \cdot \left(\sqrt{2} \cdot \sin x\right) - 1.00390625 \cdot \left(\cos x \cdot \left(\sqrt{2} \cdot \sin x\right)\right)\right)\right) - \left({\sin x}^{2} + {\sin y}^{2}\right) \cdot \left(0.0625 \cdot \left(\sqrt{2} \cdot \cos y\right)\right)\right) + -2}{\cos x \cdot 1.5 - \left(3 + \left(\frac{\cos y}{3 + \sqrt{5}} \cdot 6 + \cos x \cdot \left(1.5 \cdot \sqrt{5}\right)\right)\right)}\]
\frac{2 + \left(\left(\sqrt{2} \cdot \left(\sin x - \frac{\sin y}{16}\right)\right) \cdot \left(\sin y - \frac{\sin x}{16}\right)\right) \cdot \left(\cos x - \cos y\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\frac{\left(\left(0.0625 \cdot \left(\left(\cos x \cdot \sqrt{2}\right) \cdot \left({\sin x}^{2} + {\sin y}^{2}\right)\right) + \sin y \cdot \left(\left(\cos y \cdot 1.00390625\right) \cdot \left(\sqrt{2} \cdot \sin x\right) - 1.00390625 \cdot \left(\cos x \cdot \left(\sqrt{2} \cdot \sin x\right)\right)\right)\right) - \left({\sin x}^{2} + {\sin y}^{2}\right) \cdot \left(0.0625 \cdot \left(\sqrt{2} \cdot \cos y\right)\right)\right) + -2}{\cos x \cdot 1.5 - \left(3 + \left(\frac{\cos y}{3 + \sqrt{5}} \cdot 6 + \cos x \cdot \left(1.5 \cdot \sqrt{5}\right)\right)\right)}
(FPCore (x y)
 :precision binary64
 (/
  (+
   2.0
   (*
    (*
     (* (sqrt 2.0) (- (sin x) (/ (sin y) 16.0)))
     (- (sin y) (/ (sin x) 16.0)))
    (- (cos x) (cos y))))
  (*
   3.0
   (+
    (+ 1.0 (* (/ (- (sqrt 5.0) 1.0) 2.0) (cos x)))
    (* (/ (- 3.0 (sqrt 5.0)) 2.0) (cos y))))))
(FPCore (x y)
 :precision binary64
 (/
  (+
   (-
    (+
     (*
      0.0625
      (* (* (cos x) (sqrt 2.0)) (+ (pow (sin x) 2.0) (pow (sin y) 2.0))))
     (*
      (sin y)
      (-
       (* (* (cos y) 1.00390625) (* (sqrt 2.0) (sin x)))
       (* 1.00390625 (* (cos x) (* (sqrt 2.0) (sin x)))))))
    (*
     (+ (pow (sin x) 2.0) (pow (sin y) 2.0))
     (* 0.0625 (* (sqrt 2.0) (cos y)))))
   -2.0)
  (-
   (* (cos x) 1.5)
   (+
    3.0
    (+
     (* (/ (cos y) (+ 3.0 (sqrt 5.0))) 6.0)
     (* (cos x) (* 1.5 (sqrt 5.0))))))))
double code(double x, double y) {
	return (2.0 + (((sqrt(2.0) * (sin(x) - (sin(y) / 16.0))) * (sin(y) - (sin(x) / 16.0))) * (cos(x) - cos(y)))) / (3.0 * ((1.0 + (((sqrt(5.0) - 1.0) / 2.0) * cos(x))) + (((3.0 - sqrt(5.0)) / 2.0) * cos(y))));
}
double code(double x, double y) {
	return ((((0.0625 * ((cos(x) * sqrt(2.0)) * (pow(sin(x), 2.0) + pow(sin(y), 2.0)))) + (sin(y) * (((cos(y) * 1.00390625) * (sqrt(2.0) * sin(x))) - (1.00390625 * (cos(x) * (sqrt(2.0) * sin(x))))))) - ((pow(sin(x), 2.0) + pow(sin(y), 2.0)) * (0.0625 * (sqrt(2.0) * cos(y))))) + -2.0) / ((cos(x) * 1.5) - (3.0 + (((cos(y) / (3.0 + sqrt(5.0))) * 6.0) + (cos(x) * (1.5 * sqrt(5.0))))));
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.5

    \[\frac{2 + \left(\left(\sqrt{2} \cdot \left(\sin x - \frac{\sin y}{16}\right)\right) \cdot \left(\sin y - \frac{\sin x}{16}\right)\right) \cdot \left(\cos x - \cos y\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}\]
  2. Using strategy rm
  3. Applied flip--_binary640.5

    \[\leadsto \frac{2 + \left(\left(\sqrt{2} \cdot \left(\sin x - \frac{\sin y}{16}\right)\right) \cdot \left(\sin y - \frac{\sin x}{16}\right)\right) \cdot \left(\cos x - \cos y\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{\color{blue}{\frac{3 \cdot 3 - \sqrt{5} \cdot \sqrt{5}}{3 + \sqrt{5}}}}{2} \cdot \cos y\right)}\]
  4. Simplified0.5

    \[\leadsto \frac{2 + \left(\left(\sqrt{2} \cdot \left(\sin x - \frac{\sin y}{16}\right)\right) \cdot \left(\sin y - \frac{\sin x}{16}\right)\right) \cdot \left(\cos x - \cos y\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{\frac{\color{blue}{4}}{3 + \sqrt{5}}}{2} \cdot \cos y\right)}\]
  5. Using strategy rm
  6. Applied frac-2neg_binary640.5

    \[\leadsto \color{blue}{\frac{-\left(2 + \left(\left(\sqrt{2} \cdot \left(\sin x - \frac{\sin y}{16}\right)\right) \cdot \left(\sin y - \frac{\sin x}{16}\right)\right) \cdot \left(\cos x - \cos y\right)\right)}{-3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{\frac{4}{3 + \sqrt{5}}}{2} \cdot \cos y\right)}}\]
  7. Simplified0.5

    \[\leadsto \frac{\color{blue}{-2 - \left(\cos x - \cos y\right) \cdot \left(\left(\sqrt{2} \cdot \left(\sin x - \frac{\sin y}{16}\right)\right) \cdot \left(\sin y - \frac{\sin x}{16}\right)\right)}}{-3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{\frac{4}{3 + \sqrt{5}}}{2} \cdot \cos y\right)}\]
  8. Simplified0.4

    \[\leadsto \frac{-2 - \left(\cos x - \cos y\right) \cdot \left(\left(\sqrt{2} \cdot \left(\sin x - \frac{\sin y}{16}\right)\right) \cdot \left(\sin y - \frac{\sin x}{16}\right)\right)}{\color{blue}{-3 + \left(\cos x \cdot \frac{\sqrt{5} - 1}{2} + \cos y \cdot \frac{2}{3 + \sqrt{5}}\right) \cdot -3}}\]
  9. Taylor expanded around inf 0.5

    \[\leadsto \color{blue}{\frac{\left(0.0625 \cdot \left(\sqrt{2} \cdot \left({\sin x}^{2} \cdot \cos x\right)\right) + \left(0.0625 \cdot \left({\sin y}^{2} \cdot \left(\sqrt{2} \cdot \cos x\right)\right) + 1.00390625 \cdot \left(\cos y \cdot \left(\sin y \cdot \left(\sin x \cdot \sqrt{2}\right)\right)\right)\right)\right) - \left(0.0625 \cdot \left(\cos y \cdot \left(\sqrt{2} \cdot {\sin x}^{2}\right)\right) + \left(1.00390625 \cdot \left(\sin y \cdot \left(\sin x \cdot \left(\sqrt{2} \cdot \cos x\right)\right)\right) + \left(0.0625 \cdot \left({\sin y}^{2} \cdot \left(\cos y \cdot \sqrt{2}\right)\right) + 2\right)\right)\right)}{1.5 \cdot \cos x - \left(3 + \left(6 \cdot \frac{\cos y}{\sqrt{5} + 3} + 1.5 \cdot \left(\sqrt{5} \cdot \cos x\right)\right)\right)}}\]
  10. Simplified0.4

    \[\leadsto \color{blue}{\frac{\left(\left(0.0625 \cdot \left(\left(\cos x \cdot \sqrt{2}\right) \cdot \left({\sin x}^{2} + {\sin y}^{2}\right)\right) + \sin y \cdot \left(\left(\cos y \cdot 1.00390625\right) \cdot \left(\sqrt{2} \cdot \sin x\right) - 1.00390625 \cdot \left(\cos x \cdot \left(\sqrt{2} \cdot \sin x\right)\right)\right)\right) - \left(\left(\cos y \cdot \sqrt{2}\right) \cdot 0.0625\right) \cdot \left({\sin x}^{2} + {\sin y}^{2}\right)\right) + -2}{\cos x \cdot 1.5 - \left(3 + \left(\frac{\cos y}{3 + \sqrt{5}} \cdot 6 + \cos x \cdot \left(\sqrt{5} \cdot 1.5\right)\right)\right)}}\]
  11. Final simplification0.4

    \[\leadsto \frac{\left(\left(0.0625 \cdot \left(\left(\cos x \cdot \sqrt{2}\right) \cdot \left({\sin x}^{2} + {\sin y}^{2}\right)\right) + \sin y \cdot \left(\left(\cos y \cdot 1.00390625\right) \cdot \left(\sqrt{2} \cdot \sin x\right) - 1.00390625 \cdot \left(\cos x \cdot \left(\sqrt{2} \cdot \sin x\right)\right)\right)\right) - \left({\sin x}^{2} + {\sin y}^{2}\right) \cdot \left(0.0625 \cdot \left(\sqrt{2} \cdot \cos y\right)\right)\right) + -2}{\cos x \cdot 1.5 - \left(3 + \left(\frac{\cos y}{3 + \sqrt{5}} \cdot 6 + \cos x \cdot \left(1.5 \cdot \sqrt{5}\right)\right)\right)}\]

Reproduce

herbie shell --seed 2020232 
(FPCore (x y)
  :name "Diagrams.TwoD.Path.Metafont.Internal:hobbyF from diagrams-contrib-1.3.0.5"
  :precision binary64
  (/ (+ 2.0 (* (* (* (sqrt 2.0) (- (sin x) (/ (sin y) 16.0))) (- (sin y) (/ (sin x) 16.0))) (- (cos x) (cos y)))) (* 3.0 (+ (+ 1.0 (* (/ (- (sqrt 5.0) 1.0) 2.0) (cos x))) (* (/ (- 3.0 (sqrt 5.0)) 2.0) (cos y))))))