(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
(*
(+ (sin x) (* (sin y) -0.0625))
(* (- (cos x) (cos y)) (* (sqrt 2.0) (+ (sin y) (* (sin x) -0.0625))))))
(*
3.0
(+
(+ 1.0 (* (cos x) (/ (+ (sqrt 5.0) -1.0) 2.0)))
(* (cos y) (/ (/ 4.0 (+ 3.0 (sqrt 5.0))) 2.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 (2.0 + ((sin(x) + (sin(y) * -0.0625)) * ((cos(x) - cos(y)) * (sqrt(2.0) * (sin(y) + (sin(x) * -0.0625)))))) / (3.0 * ((1.0 + (cos(x) * ((sqrt(5.0) + -1.0) / 2.0))) + (cos(y) * ((4.0 / (3.0 + sqrt(5.0))) / 2.0))));
}
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 + ((sin(x) + (sin(y) * (-0.0625d0))) * ((cos(x) - cos(y)) * (sqrt(2.0d0) * (sin(y) + (sin(x) * (-0.0625d0))))))) / (3.0d0 * ((1.0d0 + (cos(x) * ((sqrt(5.0d0) + (-1.0d0)) / 2.0d0))) + (cos(y) * ((4.0d0 / (3.0d0 + sqrt(5.0d0))) / 2.0d0))))
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.sin(x) + (Math.sin(y) * -0.0625)) * ((Math.cos(x) - Math.cos(y)) * (Math.sqrt(2.0) * (Math.sin(y) + (Math.sin(x) * -0.0625)))))) / (3.0 * ((1.0 + (Math.cos(x) * ((Math.sqrt(5.0) + -1.0) / 2.0))) + (Math.cos(y) * ((4.0 / (3.0 + Math.sqrt(5.0))) / 2.0))));
}
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.sin(x) + (math.sin(y) * -0.0625)) * ((math.cos(x) - math.cos(y)) * (math.sqrt(2.0) * (math.sin(y) + (math.sin(x) * -0.0625)))))) / (3.0 * ((1.0 + (math.cos(x) * ((math.sqrt(5.0) + -1.0) / 2.0))) + (math.cos(y) * ((4.0 / (3.0 + math.sqrt(5.0))) / 2.0))))
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(sin(x) + Float64(sin(y) * -0.0625)) * Float64(Float64(cos(x) - cos(y)) * Float64(sqrt(2.0) * Float64(sin(y) + Float64(sin(x) * -0.0625)))))) / Float64(3.0 * Float64(Float64(1.0 + Float64(cos(x) * Float64(Float64(sqrt(5.0) + -1.0) / 2.0))) + Float64(cos(y) * Float64(Float64(4.0 / Float64(3.0 + sqrt(5.0))) / 2.0))))) 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 + ((sin(x) + (sin(y) * -0.0625)) * ((cos(x) - cos(y)) * (sqrt(2.0) * (sin(y) + (sin(x) * -0.0625)))))) / (3.0 * ((1.0 + (cos(x) * ((sqrt(5.0) + -1.0) / 2.0))) + (cos(y) * ((4.0 / (3.0 + sqrt(5.0))) / 2.0)))); 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[Sin[x], $MachinePrecision] + N[(N[Sin[y], $MachinePrecision] * -0.0625), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[x], $MachinePrecision] - N[Cos[y], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] + N[(N[Sin[x], $MachinePrecision] * -0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * N[(N[(1.0 + N[(N[Cos[x], $MachinePrecision] * N[(N[(N[Sqrt[5.0], $MachinePrecision] + -1.0), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Cos[y], $MachinePrecision] * N[(N[(4.0 / N[(3.0 + N[Sqrt[5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $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(\sin x + \sin y \cdot -0.0625\right) \cdot \left(\left(\cos x - \cos y\right) \cdot \left(\sqrt{2} \cdot \left(\sin y + \sin x \cdot -0.0625\right)\right)\right)}{3 \cdot \left(\left(1 + \cos x \cdot \frac{\sqrt{5} + -1}{2}\right) + \cos y \cdot \frac{\frac{4}{3 + \sqrt{5}}}{2}\right)}



Bits error versus x



Bits error versus y
Results
Initial program 0.5
Applied egg-rr0.5
Applied egg-rr0.5
Taylor expanded in x around inf 0.5
Simplified0.5
Final simplification0.5
herbie shell --seed 2022159
(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))))))