Average Error: 0.5 → 0.4
Time: 32.7s
Precision: binary64
Cost: 72640
\[\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{2 + \left(\sqrt{2} \cdot \left(\sin x - \frac{\sin y}{16}\right)\right) \cdot \left(\left(\sin y - \frac{\sin x}{16}\right) \cdot \left(\cos x - \cos y\right)\right)}{3 \cdot \left(1 + \left(\frac{\cos y}{\sqrt{1.25} + 1.5} + \cos x \cdot \left(\sqrt{1.25} + -0.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
 (/
  (+
   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
    (+ (/ (cos y) (+ (sqrt 1.25) 1.5)) (* (cos x) (+ (sqrt 1.25) -0.5)))))))
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 (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 + ((cos(y) / (sqrt(1.25) + 1.5)) + (cos(x) * (sqrt(1.25) + -0.5)))));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (2.0d0 + (((sqrt(2.0d0) * (sin(x) - (sin(y) / 16.0d0))) * (sin(y) - (sin(x) / 16.0d0))) * (cos(x) - cos(y)))) / (3.0d0 * ((1.0d0 + (((sqrt(5.0d0) - 1.0d0) / 2.0d0) * cos(x))) + (((3.0d0 - sqrt(5.0d0)) / 2.0d0) * cos(y))))
end function
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (2.0d0 + ((sqrt(2.0d0) * (sin(x) - (sin(y) / 16.0d0))) * ((sin(y) - (sin(x) / 16.0d0)) * (cos(x) - cos(y))))) / (3.0d0 * (1.0d0 + ((cos(y) / (sqrt(1.25d0) + 1.5d0)) + (cos(x) * (sqrt(1.25d0) + (-0.5d0))))))
end function
public static double code(double x, double y) {
	return (2.0 + (((Math.sqrt(2.0) * (Math.sin(x) - (Math.sin(y) / 16.0))) * (Math.sin(y) - (Math.sin(x) / 16.0))) * (Math.cos(x) - Math.cos(y)))) / (3.0 * ((1.0 + (((Math.sqrt(5.0) - 1.0) / 2.0) * Math.cos(x))) + (((3.0 - Math.sqrt(5.0)) / 2.0) * Math.cos(y))));
}
public static double code(double x, double y) {
	return (2.0 + ((Math.sqrt(2.0) * (Math.sin(x) - (Math.sin(y) / 16.0))) * ((Math.sin(y) - (Math.sin(x) / 16.0)) * (Math.cos(x) - Math.cos(y))))) / (3.0 * (1.0 + ((Math.cos(y) / (Math.sqrt(1.25) + 1.5)) + (Math.cos(x) * (Math.sqrt(1.25) + -0.5)))));
}
def code(x, y):
	return (2.0 + (((math.sqrt(2.0) * (math.sin(x) - (math.sin(y) / 16.0))) * (math.sin(y) - (math.sin(x) / 16.0))) * (math.cos(x) - math.cos(y)))) / (3.0 * ((1.0 + (((math.sqrt(5.0) - 1.0) / 2.0) * math.cos(x))) + (((3.0 - math.sqrt(5.0)) / 2.0) * math.cos(y))))
def code(x, y):
	return (2.0 + ((math.sqrt(2.0) * (math.sin(x) - (math.sin(y) / 16.0))) * ((math.sin(y) - (math.sin(x) / 16.0)) * (math.cos(x) - math.cos(y))))) / (3.0 * (1.0 + ((math.cos(y) / (math.sqrt(1.25) + 1.5)) + (math.cos(x) * (math.sqrt(1.25) + -0.5)))))
function code(x, y)
	return Float64(Float64(2.0 + Float64(Float64(Float64(sqrt(2.0) * Float64(sin(x) - Float64(sin(y) / 16.0))) * Float64(sin(y) - Float64(sin(x) / 16.0))) * Float64(cos(x) - cos(y)))) / Float64(3.0 * Float64(Float64(1.0 + Float64(Float64(Float64(sqrt(5.0) - 1.0) / 2.0) * cos(x))) + Float64(Float64(Float64(3.0 - sqrt(5.0)) / 2.0) * cos(y)))))
end
function code(x, y)
	return Float64(Float64(2.0 + Float64(Float64(sqrt(2.0) * Float64(sin(x) - Float64(sin(y) / 16.0))) * Float64(Float64(sin(y) - Float64(sin(x) / 16.0)) * Float64(cos(x) - cos(y))))) / Float64(3.0 * Float64(1.0 + Float64(Float64(cos(y) / Float64(sqrt(1.25) + 1.5)) + Float64(cos(x) * Float64(sqrt(1.25) + -0.5))))))
end
function tmp = code(x, y)
	tmp = (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))));
end
function tmp = code(x, y)
	tmp = (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 + ((cos(y) / (sqrt(1.25) + 1.5)) + (cos(x) * (sqrt(1.25) + -0.5)))));
end
code[x_, y_] := N[(N[(2.0 + N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sin[x], $MachinePrecision] - N[(N[Sin[y], $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] - N[(N[Sin[x], $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[x], $MachinePrecision] - N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * N[(N[(1.0 + N[(N[(N[(N[Sqrt[5.0], $MachinePrecision] - 1.0), $MachinePrecision] / 2.0), $MachinePrecision] * N[Cos[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(3.0 - N[Sqrt[5.0], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision] * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := N[(N[(2.0 + N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sin[x], $MachinePrecision] - N[(N[Sin[y], $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[y], $MachinePrecision] - N[(N[Sin[x], $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[x], $MachinePrecision] - N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * N[(1.0 + N[(N[(N[Cos[y], $MachinePrecision] / N[(N[Sqrt[1.25], $MachinePrecision] + 1.5), $MachinePrecision]), $MachinePrecision] + N[(N[Cos[x], $MachinePrecision] * N[(N[Sqrt[1.25], $MachinePrecision] + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\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{2 + \left(\sqrt{2} \cdot \left(\sin x - \frac{\sin y}{16}\right)\right) \cdot \left(\left(\sin y - \frac{\sin x}{16}\right) \cdot \left(\cos x - \cos y\right)\right)}{3 \cdot \left(1 + \left(\frac{\cos y}{\sqrt{1.25} + 1.5} + \cos x \cdot \left(\sqrt{1.25} + -0.5\right)\right)\right)}

Error

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. Simplified0.5

    \[\leadsto \color{blue}{\frac{2 + \left(\sqrt{2} \cdot \left(\sin x - \frac{\sin y}{16}\right)\right) \cdot \left(\left(\sin y - \frac{\sin x}{16}\right) \cdot \left(\cos x - \cos y\right)\right)}{3 \cdot \left(1 + \left(\cos x \cdot \left(\frac{\sqrt{5}}{2} - 0.5\right) + \cos y \cdot \left(1.5 - \frac{\sqrt{5}}{2}\right)\right)\right)}} \]
    Proof
    (/.f64 (+.f64 2 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (*.f64 (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16)) (-.f64 (cos.f64 x) (cos.f64 y))))) (*.f64 3 (+.f64 1 (+.f64 (*.f64 (cos.f64 x) (-.f64 (/.f64 (sqrt.f64 5) 2) 1/2)) (*.f64 (cos.f64 y) (-.f64 3/2 (/.f64 (sqrt.f64 5) 2))))))): 0 points increase in error, 0 points decrease in error
    (/.f64 (+.f64 2 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y))))) (*.f64 3 (+.f64 1 (+.f64 (*.f64 (cos.f64 x) (-.f64 (/.f64 (sqrt.f64 5) 2) 1/2)) (*.f64 (cos.f64 y) (-.f64 3/2 (/.f64 (sqrt.f64 5) 2))))))): 6 points increase in error, 0 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y)))) (*.f64 3 (+.f64 1 (+.f64 (*.f64 (cos.f64 x) (-.f64 (/.f64 (sqrt.f64 5) 2) (Rewrite<= metadata-eval (/.f64 1 2)))) (*.f64 (cos.f64 y) (-.f64 3/2 (/.f64 (sqrt.f64 5) 2))))))): 0 points increase in error, 6 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y)))) (*.f64 3 (+.f64 1 (+.f64 (*.f64 (cos.f64 x) (Rewrite=> sub-neg_binary64 (+.f64 (/.f64 (sqrt.f64 5) 2) (neg.f64 (/.f64 1 2))))) (*.f64 (cos.f64 y) (-.f64 3/2 (/.f64 (sqrt.f64 5) 2))))))): 18 points increase in error, 0 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y)))) (*.f64 3 (+.f64 1 (+.f64 (Rewrite=> distribute-lft-in_binary64 (+.f64 (*.f64 (cos.f64 x) (/.f64 (sqrt.f64 5) 2)) (*.f64 (cos.f64 x) (neg.f64 (/.f64 1 2))))) (*.f64 (cos.f64 y) (-.f64 3/2 (/.f64 (sqrt.f64 5) 2))))))): 0 points increase in error, 0 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y)))) (*.f64 3 (+.f64 1 (+.f64 (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 (sqrt.f64 5) 2) (cos.f64 x))) (*.f64 (cos.f64 x) (neg.f64 (/.f64 1 2)))) (*.f64 (cos.f64 y) (-.f64 3/2 (/.f64 (sqrt.f64 5) 2))))))): 0 points increase in error, 18 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y)))) (*.f64 3 (+.f64 1 (+.f64 (+.f64 (*.f64 (/.f64 (sqrt.f64 5) 2) (cos.f64 x)) (*.f64 (cos.f64 x) (neg.f64 (/.f64 1 2)))) (*.f64 (cos.f64 y) (-.f64 (Rewrite<= metadata-eval (/.f64 3 2)) (/.f64 (sqrt.f64 5) 2))))))): 18 points increase in error, 0 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y)))) (*.f64 3 (+.f64 1 (+.f64 (+.f64 (*.f64 (/.f64 (sqrt.f64 5) 2) (cos.f64 x)) (*.f64 (cos.f64 x) (neg.f64 (/.f64 1 2)))) (*.f64 (cos.f64 y) (Rewrite<= div-sub_binary64 (/.f64 (-.f64 3 (sqrt.f64 5)) 2))))))): 0 points increase in error, 18 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y)))) (*.f64 3 (+.f64 1 (+.f64 (+.f64 (*.f64 (/.f64 (sqrt.f64 5) 2) (cos.f64 x)) (*.f64 (cos.f64 x) (neg.f64 (/.f64 1 2)))) (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 (-.f64 3 (sqrt.f64 5)) 2) (cos.f64 y))))))): 18 points increase in error, 0 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y)))) (*.f64 3 (+.f64 1 (Rewrite=> associate-+l+_binary64 (+.f64 (*.f64 (/.f64 (sqrt.f64 5) 2) (cos.f64 x)) (+.f64 (*.f64 (cos.f64 x) (neg.f64 (/.f64 1 2))) (*.f64 (/.f64 (-.f64 3 (sqrt.f64 5)) 2) (cos.f64 y)))))))): 0 points increase in error, 18 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y)))) (*.f64 3 (Rewrite=> associate-+r+_binary64 (+.f64 (+.f64 1 (*.f64 (/.f64 (sqrt.f64 5) 2) (cos.f64 x))) (+.f64 (*.f64 (cos.f64 x) (neg.f64 (/.f64 1 2))) (*.f64 (/.f64 (-.f64 3 (sqrt.f64 5)) 2) (cos.f64 y))))))): 18 points increase in error, 0 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y)))) (*.f64 3 (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 (+.f64 1 (*.f64 (/.f64 (sqrt.f64 5) 2) (cos.f64 x))) (*.f64 (cos.f64 x) (neg.f64 (/.f64 1 2)))) (*.f64 (/.f64 (-.f64 3 (sqrt.f64 5)) 2) (cos.f64 y)))))): 0 points increase in error, 2 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y)))) (*.f64 3 (+.f64 (Rewrite<= associate-+r+_binary64 (+.f64 1 (+.f64 (*.f64 (/.f64 (sqrt.f64 5) 2) (cos.f64 x)) (*.f64 (cos.f64 x) (neg.f64 (/.f64 1 2)))))) (*.f64 (/.f64 (-.f64 3 (sqrt.f64 5)) 2) (cos.f64 y))))): 0 points increase in error, 18 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y)))) (*.f64 3 (+.f64 (+.f64 1 (+.f64 (Rewrite=> *-commutative_binary64 (*.f64 (cos.f64 x) (/.f64 (sqrt.f64 5) 2))) (*.f64 (cos.f64 x) (neg.f64 (/.f64 1 2))))) (*.f64 (/.f64 (-.f64 3 (sqrt.f64 5)) 2) (cos.f64 y))))): 18 points increase in error, 0 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y)))) (*.f64 3 (+.f64 (+.f64 1 (Rewrite<= distribute-lft-in_binary64 (*.f64 (cos.f64 x) (+.f64 (/.f64 (sqrt.f64 5) 2) (neg.f64 (/.f64 1 2)))))) (*.f64 (/.f64 (-.f64 3 (sqrt.f64 5)) 2) (cos.f64 y))))): 0 points increase in error, 18 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y)))) (*.f64 3 (+.f64 (+.f64 1 (*.f64 (cos.f64 x) (Rewrite<= sub-neg_binary64 (-.f64 (/.f64 (sqrt.f64 5) 2) (/.f64 1 2))))) (*.f64 (/.f64 (-.f64 3 (sqrt.f64 5)) 2) (cos.f64 y))))): 1 points increase in error, 0 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y)))) (*.f64 3 (+.f64 (+.f64 1 (*.f64 (cos.f64 x) (Rewrite<= div-sub_binary64 (/.f64 (-.f64 (sqrt.f64 5) 1) 2)))) (*.f64 (/.f64 (-.f64 3 (sqrt.f64 5)) 2) (cos.f64 y))))): 0 points increase in error, 1 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16))) (-.f64 (cos.f64 x) (cos.f64 y)))) (*.f64 3 (+.f64 (+.f64 1 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 (-.f64 (sqrt.f64 5) 1) 2) (cos.f64 x)))) (*.f64 (/.f64 (-.f64 3 (sqrt.f64 5)) 2) (cos.f64 y))))): 0 points increase in error, 0 points decrease in error
  3. Applied egg-rr0.5

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

    \[\leadsto \frac{2 + \left(\sqrt{2} \cdot \left(\sin x - \frac{\sin y}{16}\right)\right) \cdot \left(\left(\sin y - \frac{\sin x}{16}\right) \cdot \left(\cos x - \cos y\right)\right)}{3 \cdot \left(1 + \color{blue}{\left(\frac{\cos y}{\sqrt{1.25} + 1.5} + \cos x \cdot \left(0.5 \cdot \sqrt{5} - 0.5\right)\right)}\right)} \]
  5. Applied egg-rr0.5

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

    \[\leadsto \frac{2 + \left(\sqrt{2} \cdot \left(\sin x - \frac{\sin y}{16}\right)\right) \cdot \left(\left(\sin y - \frac{\sin x}{16}\right) \cdot \left(\cos x - \cos y\right)\right)}{3 \cdot \left(1 + \left(\frac{\cos y}{\sqrt{1.25} + 1.5} + \color{blue}{\cos x \cdot \left(-0.5 + \sqrt{1.25}\right)}\right)\right)} \]
    Proof
    (/.f64 (+.f64 2 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (*.f64 (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16)) (-.f64 (cos.f64 x) (cos.f64 y))))) (*.f64 3 (+.f64 1 (+.f64 (/.f64 (cos.f64 y) (+.f64 (sqrt.f64 5/4) 3/2)) (*.f64 (cos.f64 x) (+.f64 -1/2 (sqrt.f64 5/4))))))): 0 points increase in error, 0 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (*.f64 (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16)) (-.f64 (cos.f64 x) (cos.f64 y))))) (*.f64 3 (+.f64 1 (+.f64 (/.f64 (cos.f64 y) (+.f64 (sqrt.f64 5/4) 3/2)) (*.f64 (cos.f64 x) (Rewrite<= +-commutative_binary64 (+.f64 (sqrt.f64 5/4) -1/2))))))): 0 points increase in error, 0 points decrease in error
    (/.f64 (+.f64 2 (*.f64 (*.f64 (sqrt.f64 2) (-.f64 (sin.f64 x) (/.f64 (sin.f64 y) 16))) (*.f64 (-.f64 (sin.f64 y) (/.f64 (sin.f64 x) 16)) (-.f64 (cos.f64 x) (cos.f64 y))))) (*.f64 3 (+.f64 1 (+.f64 (/.f64 (cos.f64 y) (+.f64 (sqrt.f64 5/4) 3/2)) (Rewrite=> distribute-lft-in_binary64 (+.f64 (*.f64 (cos.f64 x) (sqrt.f64 5/4)) (*.f64 (cos.f64 x) -1/2))))))): 0 points increase in error, 0 points decrease in error
  7. Final simplification0.4

    \[\leadsto \frac{2 + \left(\sqrt{2} \cdot \left(\sin x - \frac{\sin y}{16}\right)\right) \cdot \left(\left(\sin y - \frac{\sin x}{16}\right) \cdot \left(\cos x - \cos y\right)\right)}{3 \cdot \left(1 + \left(\frac{\cos y}{\sqrt{1.25} + 1.5} + \cos x \cdot \left(\sqrt{1.25} + -0.5\right)\right)\right)} \]

Alternatives

Alternative 1
Error11.9
Cost66888
\[\begin{array}{l} t_0 := \sqrt{1.25} + 1.5\\ t_1 := 3 \cdot \left(1 + \left(\frac{\cos y}{t_0} + \cos x \cdot \left(\sqrt{1.25} + -0.5\right)\right)\right)\\ t_2 := \sin y - \frac{\sin x}{16}\\ t_3 := 2 + \left(t_2 \cdot \left(\cos x - \cos y\right)\right) \cdot \left(\sqrt{2} \cdot \sin x\right)\\ \mathbf{if}\;x \leq -0.031:\\ \;\;\;\;\frac{t_3}{3 \cdot \left(1 + \left(\cos x \cdot \frac{1}{\sqrt{1.25} + 0.5} + \cos y \cdot \frac{1}{t_0}\right)\right)}\\ \mathbf{elif}\;x \leq 0.21:\\ \;\;\;\;\frac{2 + \left(\sqrt{2} \cdot \left(\sin x - \frac{\sin y}{16}\right)\right) \cdot \left(t_2 \cdot \left(1 + \left(-0.5 \cdot \left(x \cdot x\right) - \cos y\right)\right)\right)}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_3}{t_1}\\ \end{array} \]
Alternative 2
Error11.9
Cost66504
\[\begin{array}{l} t_0 := \sqrt{1.25} + 1.5\\ t_1 := \left(\sin y - \frac{\sin x}{16}\right) \cdot \left(\cos x - \cos y\right)\\ t_2 := 2 + t_1 \cdot \left(\sqrt{2} \cdot \sin x\right)\\ t_3 := 3 \cdot \left(1 + \left(\frac{\cos y}{t_0} + \cos x \cdot \left(\sqrt{1.25} + -0.5\right)\right)\right)\\ \mathbf{if}\;x \leq -0.024:\\ \;\;\;\;\frac{t_2}{3 \cdot \left(1 + \left(\cos x \cdot \frac{1}{\sqrt{1.25} + 0.5} + \cos y \cdot \frac{1}{t_0}\right)\right)}\\ \mathbf{elif}\;x \leq 0.02:\\ \;\;\;\;\frac{2 + t_1 \cdot \left(\sqrt{2} \cdot \left(x + \sin y \cdot -0.0625\right)\right)}{t_3}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_2}{t_3}\\ \end{array} \]
Alternative 3
Error12.0
Cost66372
\[\begin{array}{l} t_0 := \sqrt{1.25} + 1.5\\ t_1 := \cos y \cdot \frac{1}{t_0}\\ t_2 := \sin y - \frac{\sin x}{16}\\ t_3 := 2 + \left(t_2 \cdot \left(\cos x - \cos y\right)\right) \cdot \left(\sqrt{2} \cdot \sin x\right)\\ \mathbf{if}\;x \leq -0.008:\\ \;\;\;\;\frac{t_3}{3 \cdot \left(1 + \left(\cos x \cdot \frac{1}{\sqrt{1.25} + 0.5} + t_1\right)\right)}\\ \mathbf{elif}\;x \leq 0.0017:\\ \;\;\;\;\frac{2 + \left(\sqrt{2} \cdot \left(x + \sin y \cdot -0.0625\right)\right) \cdot \left(t_2 \cdot \left(1 - \cos y\right)\right)}{3 \cdot \left(1 + \left(t_1 + \cos x \cdot \left(-0.5 + \frac{\sqrt{5}}{2}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_3}{3 \cdot \left(1 + \left(\frac{\cos y}{t_0} + \cos x \cdot \left(\sqrt{1.25} + -0.5\right)\right)\right)}\\ \end{array} \]
Alternative 4
Error12.0
Cost66249
\[\begin{array}{l} t_0 := \sqrt{1.25} + 1.5\\ t_1 := \sin y - \frac{\sin x}{16}\\ \mathbf{if}\;x \leq -0.0075 \lor \neg \left(x \leq 0.0024\right):\\ \;\;\;\;\frac{2 + \left(t_1 \cdot \left(\cos x - \cos y\right)\right) \cdot \left(\sqrt{2} \cdot \sin x\right)}{3 \cdot \left(1 + \left(\frac{\cos y}{t_0} + \cos x \cdot \left(\sqrt{1.25} + -0.5\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 + \left(\sqrt{2} \cdot \left(x + \sin y \cdot -0.0625\right)\right) \cdot \left(t_1 \cdot \left(1 - \cos y\right)\right)}{3 \cdot \left(1 + \left(\cos y \cdot \frac{1}{t_0} + \cos x \cdot \left(-0.5 + \frac{\sqrt{5}}{2}\right)\right)\right)}\\ \end{array} \]
Alternative 5
Error13.1
Cost65929
\[\begin{array}{l} \mathbf{if}\;x \leq -0.0095 \lor \neg \left(x \leq 0.007\right):\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{2}, -0.0625 \cdot \left({\sin x}^{2} \cdot \left(\cos x + -1\right)\right), 2\right)}{\frac{\cos x \cdot \left(\sqrt{5} + -1\right)}{0.6666666666666666} + \mathsf{fma}\left(\cos y, \frac{3 - \sqrt{5}}{0.6666666666666666}, 3\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 + \left(\sqrt{2} \cdot \left(x + \sin y \cdot -0.0625\right)\right) \cdot \left(\left(\sin y - \frac{\sin x}{16}\right) \cdot \left(1 - \cos y\right)\right)}{3 \cdot \left(1 + \left(\cos y \cdot \frac{1}{\sqrt{1.25} + 1.5} + \cos x \cdot \left(-0.5 + \frac{\sqrt{5}}{2}\right)\right)\right)}\\ \end{array} \]
Alternative 6
Error13.0
Cost60361
\[\begin{array}{l} t_0 := \sin y - \frac{\sin x}{16}\\ \mathbf{if}\;x \leq -0.004 \lor \neg \left(x \leq 0.0017\right):\\ \;\;\;\;\frac{2 + \left(\cos x + -1\right) \cdot \left(t_0 \cdot \left(\sqrt{2} \cdot \sin x\right)\right)}{3 \cdot \left(\left(1 + \cos x \cdot \frac{\sqrt{5} + -1}{2}\right) + \cos y \cdot \frac{3 - \sqrt{5}}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 + \left(\sqrt{2} \cdot \left(x + \sin y \cdot -0.0625\right)\right) \cdot \left(t_0 \cdot \left(1 - \cos y\right)\right)}{3 \cdot \left(1 + \left(\cos y \cdot \frac{1}{\sqrt{1.25} + 1.5} + \cos x \cdot \left(-0.5 + \frac{\sqrt{5}}{2}\right)\right)\right)}\\ \end{array} \]
Alternative 7
Error13.0
Cost60233
\[\begin{array}{l} t_0 := \sin y - \frac{\sin x}{16}\\ \mathbf{if}\;x \leq -0.004 \lor \neg \left(x \leq 0.0017\right):\\ \;\;\;\;\frac{2 + \left(\cos x + -1\right) \cdot \left(t_0 \cdot \left(\sqrt{2} \cdot \sin x\right)\right)}{3 \cdot \left(\left(1 + \cos x \cdot \frac{\sqrt{5} + -1}{2}\right) + \cos y \cdot \frac{3 - \sqrt{5}}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 + \left(\sqrt{2} \cdot \left(x + \sin y \cdot -0.0625\right)\right) \cdot \left(t_0 \cdot \left(1 - \cos y\right)\right)}{3 \cdot \left(1 + \left(\cos x \cdot \left(-0.5 + \frac{\sqrt{5}}{2}\right) + \cos y \cdot \left(1.5 - \sqrt{1.25}\right)\right)\right)}\\ \end{array} \]
Alternative 8
Error13.1
Cost60105
\[\begin{array}{l} t_0 := \sin y - \frac{\sin x}{16}\\ t_1 := 0.5 \cdot \sqrt{5}\\ \mathbf{if}\;x \leq -5.2 \cdot 10^{-5} \lor \neg \left(x \leq 5.2 \cdot 10^{-5}\right):\\ \;\;\;\;\frac{2 + \left(\cos x + -1\right) \cdot \left(t_0 \cdot \left(\sqrt{2} \cdot \sin x\right)\right)}{3 \cdot \left(\left(1 + \cos x \cdot \frac{\sqrt{5} + -1}{2}\right) + \cos y \cdot \frac{3 - \sqrt{5}}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 + \left(\sqrt{2} \cdot \left(x + \sin y \cdot -0.0625\right)\right) \cdot \left(t_0 \cdot \left(1 - \cos y\right)\right)}{3 \cdot \left(1 + \left(-0.5 + \left(t_1 + \cos y \cdot \left(1.5 - t_1\right)\right)\right)\right)}\\ \end{array} \]
Alternative 9
Error13.6
Cost59657
\[\begin{array}{l} t_0 := 0.5 \cdot \sqrt{5}\\ \mathbf{if}\;x \leq -2.3 \cdot 10^{-6} \lor \neg \left(x \leq 0.0001\right):\\ \;\;\;\;\frac{0.3333333333333333}{1 + \left(2 \cdot \frac{1}{3 + \sqrt{5}} + \cos x \cdot \left(-0.5 + t_0\right)\right)} \cdot \mathsf{fma}\left(\sqrt{2} \cdot \mathsf{fma}\left(-0.0625, \cos x, 0.0625\right), {\sin x}^{2}, 2\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2 + \left(\sqrt{2} \cdot \left(x + \sin y \cdot -0.0625\right)\right) \cdot \left(\left(\sin y - \frac{\sin x}{16}\right) \cdot \left(1 - \cos y\right)\right)}{3 \cdot \left(1 + \left(-0.5 + \left(t_0 + \cos y \cdot \left(1.5 - t_0\right)\right)\right)\right)}\\ \end{array} \]
Alternative 10
Error13.6
Cost53833
\[\begin{array}{l} t_0 := 0.5 \cdot \sqrt{5}\\ \mathbf{if}\;x \leq -5.5 \cdot 10^{-5} \lor \neg \left(x \leq 0.00014\right):\\ \;\;\;\;0.3333333333333333 \cdot \frac{2 + -0.0625 \cdot \left(\sqrt{2} \cdot \left({\sin x}^{2} \cdot \left(\cos x + -1\right)\right)\right)}{\left(2.5 + \frac{\cos x}{\sqrt{1.25} + 0.5}\right) + -0.5 \cdot \sqrt{5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 + \left(\sqrt{2} \cdot \left(x + \sin y \cdot -0.0625\right)\right) \cdot \left(\left(\sin y - \frac{\sin x}{16}\right) \cdot \left(1 - \cos y\right)\right)}{3 \cdot \left(1 + \left(-0.5 + \left(t_0 + \cos y \cdot \left(1.5 - t_0\right)\right)\right)\right)}\\ \end{array} \]
Alternative 11
Error13.7
Cost53129
\[\begin{array}{l} \mathbf{if}\;x \leq -2.6 \cdot 10^{-6} \lor \neg \left(x \leq 1.45 \cdot 10^{-5}\right):\\ \;\;\;\;0.3333333333333333 \cdot \frac{2 + -0.0625 \cdot \left(\sqrt{2} \cdot \left({\sin x}^{2} \cdot \left(\cos x + -1\right)\right)\right)}{\left(2.5 + \frac{\cos x}{\sqrt{1.25} + 0.5}\right) + -0.5 \cdot \sqrt{5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.0625, \left(1 - \cos y\right) \cdot \left(\sqrt{2} \cdot {\sin y}^{2}\right), 2\right)}{3 \cdot \left(0.5 + \left(0.5 \cdot \sqrt{5} + 2 \cdot \frac{\cos y}{3 + \sqrt{5}}\right)\right)}\\ \end{array} \]
Alternative 12
Error13.7
Cost46985
\[\begin{array}{l} \mathbf{if}\;x \leq -6.8 \cdot 10^{-6} \lor \neg \left(x \leq 1.45 \cdot 10^{-5}\right):\\ \;\;\;\;0.3333333333333333 \cdot \frac{2 + -0.0625 \cdot \left(\sqrt{2} \cdot \left({\sin x}^{2} \cdot \left(\cos x + -1\right)\right)\right)}{\left(2.5 + \frac{\cos x}{\sqrt{1.25} + 0.5}\right) + -0.5 \cdot \sqrt{5}}\\ \mathbf{else}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{2 + -0.0625 \cdot \left(\sqrt{2} \cdot \left(\left(1 - \cos y\right) \cdot {\sin y}^{2}\right)\right)}{1 + \left(2 \cdot \frac{\cos y}{3 + \sqrt{5}} + 0.5 \cdot \left(\sqrt{5} + -1\right)\right)}\\ \end{array} \]
Alternative 13
Error13.7
Cost46857
\[\begin{array}{l} t_0 := 0.5 \cdot \sqrt{5}\\ \mathbf{if}\;x \leq -6.6 \cdot 10^{-6} \lor \neg \left(x \leq 1.6 \cdot 10^{-6}\right):\\ \;\;\;\;0.3333333333333333 \cdot \frac{2 + -0.0625 \cdot \left(\sqrt{2} \cdot \left({\sin x}^{2} \cdot \left(\cos x + -1\right)\right)\right)}{\left(2.5 + \frac{\cos x}{\sqrt{1.25} + 0.5}\right) + -0.5 \cdot \sqrt{5}}\\ \mathbf{else}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{2 + -0.0625 \cdot \left(\sqrt{2} \cdot \left(\left(1 - \cos y\right) \cdot {\sin y}^{2}\right)\right)}{0.5 + \left(t_0 + \cos y \cdot \left(1.5 - t_0\right)\right)}\\ \end{array} \]
Alternative 14
Error25.4
Cost46464
\[0.3333333333333333 \cdot \frac{2 + -0.0625 \cdot \left(\sqrt{2} \cdot \left({\sin x}^{2} \cdot \left(\cos x + -1\right)\right)\right)}{\left(2.5 + \frac{\cos x}{\sqrt{1.25} + 0.5}\right) + -0.5 \cdot \sqrt{5}} \]
Alternative 15
Error25.4
Cost46336
\[0.3333333333333333 \cdot \frac{2 + -0.0625 \cdot \left(\sqrt{2} \cdot \left({\sin x}^{2} \cdot \left(\cos x + -1\right)\right)\right)}{\cos x \cdot \left(\sqrt{1.25} + -0.5\right) + \left(2.5 - \sqrt{1.25}\right)} \]
Alternative 16
Error25.4
Cost46336
\[0.3333333333333333 \cdot \frac{2 + -0.0625 \cdot \left(\sqrt{2} \cdot \left({\sin x}^{2} \cdot \left(\cos x + -1\right)\right)\right)}{2.5 + \left(\cos x \cdot \left(\sqrt{1.25} + -0.5\right) - \sqrt{1.25}\right)} \]
Alternative 17
Error38.0
Cost20544
\[0.3333333333333333 \cdot \frac{2 + -0.0625 \cdot \left(\sqrt{2} \cdot \left(\left(\cos x + -1\right) \cdot \left(0.5 - \frac{\cos \left(x + x\right)}{2}\right)\right)\right)}{2} \]
Alternative 18
Error38.0
Cost64
\[0.3333333333333333 \]

Error

Reproduce

herbie shell --seed 2022340 
(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))))))