| Alternative 1 | |
|---|---|
| Error | 12.1 |
| Cost | 72969 |
(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)
(*
(log (exp (- (cos x) (cos y))))
(* (+ (sin y) (* -0.0625 (sin x))) (+ (* -0.0625 (sin y)) (sin x))))))
(+
3.0
(+
(* 6.0 (/ (cos y) (+ 3.0 (sqrt 5.0))))
(* 1.5 (* (cos x) (+ (sqrt 5.0) -1.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 + (sqrt(2.0) * (log(exp((cos(x) - cos(y)))) * ((sin(y) + (-0.0625 * sin(x))) * ((-0.0625 * sin(y)) + sin(x)))))) / (3.0 + ((6.0 * (cos(y) / (3.0 + sqrt(5.0)))) + (1.5 * (cos(x) * (sqrt(5.0) + -1.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 + (sqrt(2.0d0) * (log(exp((cos(x) - cos(y)))) * ((sin(y) + ((-0.0625d0) * sin(x))) * (((-0.0625d0) * sin(y)) + sin(x)))))) / (3.0d0 + ((6.0d0 * (cos(y) / (3.0d0 + sqrt(5.0d0)))) + (1.5d0 * (cos(x) * (sqrt(5.0d0) + (-1.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.sqrt(2.0) * (Math.log(Math.exp((Math.cos(x) - Math.cos(y)))) * ((Math.sin(y) + (-0.0625 * Math.sin(x))) * ((-0.0625 * Math.sin(y)) + Math.sin(x)))))) / (3.0 + ((6.0 * (Math.cos(y) / (3.0 + Math.sqrt(5.0)))) + (1.5 * (Math.cos(x) * (Math.sqrt(5.0) + -1.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.sqrt(2.0) * (math.log(math.exp((math.cos(x) - math.cos(y)))) * ((math.sin(y) + (-0.0625 * math.sin(x))) * ((-0.0625 * math.sin(y)) + math.sin(x)))))) / (3.0 + ((6.0 * (math.cos(y) / (3.0 + math.sqrt(5.0)))) + (1.5 * (math.cos(x) * (math.sqrt(5.0) + -1.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(sqrt(2.0) * Float64(log(exp(Float64(cos(x) - cos(y)))) * Float64(Float64(sin(y) + Float64(-0.0625 * sin(x))) * Float64(Float64(-0.0625 * sin(y)) + sin(x)))))) / Float64(3.0 + Float64(Float64(6.0 * Float64(cos(y) / Float64(3.0 + sqrt(5.0)))) + Float64(1.5 * Float64(cos(x) * Float64(sqrt(5.0) + -1.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 + (sqrt(2.0) * (log(exp((cos(x) - cos(y)))) * ((sin(y) + (-0.0625 * sin(x))) * ((-0.0625 * sin(y)) + sin(x)))))) / (3.0 + ((6.0 * (cos(y) / (3.0 + sqrt(5.0)))) + (1.5 * (cos(x) * (sqrt(5.0) + -1.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[Sqrt[2.0], $MachinePrecision] * N[(N[Log[N[Exp[N[(N[Cos[x], $MachinePrecision] - N[Cos[y], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[(N[Sin[y], $MachinePrecision] + N[(-0.0625 * N[Sin[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.0625 * N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[Sin[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 + N[(N[(6.0 * N[(N[Cos[y], $MachinePrecision] / N[(3.0 + N[Sqrt[5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.5 * N[(N[Cos[x], $MachinePrecision] * N[(N[Sqrt[5.0], $MachinePrecision] + -1.0), $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 + \sqrt{2} \cdot \left(\log \left(e^{\cos x - \cos y}\right) \cdot \left(\left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(-0.0625 \cdot \sin y + \sin x\right)\right)\right)}{3 + \left(6 \cdot \frac{\cos y}{3 + \sqrt{5}} + 1.5 \cdot \left(\cos x \cdot \left(\sqrt{5} + -1\right)\right)\right)}
Results
Initial program 0.5
Simplified0.4
[Start]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)}
\] |
|---|---|
+-commutative [=>]0.5 | \[ \frac{\color{blue}{\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) + 2}}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
associate-*l* [=>]0.5 | \[ \frac{\color{blue}{\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)} + 2}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
associate-*l* [=>]0.5 | \[ \frac{\color{blue}{\sqrt{2} \cdot \left(\left(\sin x - \frac{\sin y}{16}\right) \cdot \left(\left(\sin y - \frac{\sin x}{16}\right) \cdot \left(\cos x - \cos y\right)\right)\right)} + 2}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
fma-def [=>]0.5 | \[ \frac{\color{blue}{\mathsf{fma}\left(\sqrt{2}, \left(\sin x - \frac{\sin y}{16}\right) \cdot \left(\left(\sin y - \frac{\sin x}{16}\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
associate-*r* [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \color{blue}{\left(\left(\sin x - \frac{\sin y}{16}\right) \cdot \left(\sin y - \frac{\sin x}{16}\right)\right) \cdot \left(\cos x - \cos y\right)}, 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
*-commutative [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \color{blue}{\left(\left(\sin y - \frac{\sin x}{16}\right) \cdot \left(\sin x - \frac{\sin y}{16}\right)\right)} \cdot \left(\cos x - \cos y\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
associate-*l* [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \color{blue}{\left(\sin y - \frac{\sin x}{16}\right) \cdot \left(\left(\sin x - \frac{\sin y}{16}\right) \cdot \left(\cos x - \cos y\right)\right)}, 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
sub-neg [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \color{blue}{\left(\sin y + \left(-\frac{\sin x}{16}\right)\right)} \cdot \left(\left(\sin x - \frac{\sin y}{16}\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
neg-mul-1 [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + \color{blue}{-1 \cdot \frac{\sin x}{16}}\right) \cdot \left(\left(\sin x - \frac{\sin y}{16}\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
metadata-eval [<=]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + \color{blue}{\left(-1\right)} \cdot \frac{\sin x}{16}\right) \cdot \left(\left(\sin x - \frac{\sin y}{16}\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
associate-*r/ [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + \color{blue}{\frac{\left(-1\right) \cdot \sin x}{16}}\right) \cdot \left(\left(\sin x - \frac{\sin y}{16}\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
associate-/l* [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + \color{blue}{\frac{-1}{\frac{16}{\sin x}}}\right) \cdot \left(\left(\sin x - \frac{\sin y}{16}\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
associate-/r/ [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + \color{blue}{\frac{-1}{16} \cdot \sin x}\right) \cdot \left(\left(\sin x - \frac{\sin y}{16}\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
metadata-eval [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + \frac{\color{blue}{-1}}{16} \cdot \sin x\right) \cdot \left(\left(\sin x - \frac{\sin y}{16}\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
metadata-eval [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + \color{blue}{-0.0625} \cdot \sin x\right) \cdot \left(\left(\sin x - \frac{\sin y}{16}\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
sub-neg [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\color{blue}{\left(\sin x + \left(-\frac{\sin y}{16}\right)\right)} \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
neg-mul-1 [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + \color{blue}{-1 \cdot \frac{\sin y}{16}}\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
metadata-eval [<=]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + \color{blue}{\left(-1\right)} \cdot \frac{\sin y}{16}\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
associate-*r/ [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + \color{blue}{\frac{\left(-1\right) \cdot \sin y}{16}}\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
associate-/l* [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + \color{blue}{\frac{-1}{\frac{16}{\sin y}}}\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
associate-/r/ [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + \color{blue}{\frac{-1}{16} \cdot \sin y}\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
metadata-eval [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + \frac{\color{blue}{-1}}{16} \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
metadata-eval [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + \color{blue}{-0.0625} \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \left(\left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + \frac{3 - \sqrt{5}}{2} \cdot \cos y\right)}
\] |
+-commutative [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \color{blue}{\left(\frac{3 - \sqrt{5}}{2} \cdot \cos y + \left(1 + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right)\right)}}
\] |
associate-+r+ [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \color{blue}{\left(\left(\frac{3 - \sqrt{5}}{2} \cdot \cos y + 1\right) + \frac{\sqrt{5} - 1}{2} \cdot \cos x\right)}}
\] |
+-commutative [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{3 \cdot \color{blue}{\left(\frac{\sqrt{5} - 1}{2} \cdot \cos x + \left(\frac{3 - \sqrt{5}}{2} \cdot \cos y + 1\right)\right)}}
\] |
distribute-lft-in [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\color{blue}{3 \cdot \left(\frac{\sqrt{5} - 1}{2} \cdot \cos x\right) + 3 \cdot \left(\frac{3 - \sqrt{5}}{2} \cdot \cos y + 1\right)}}
\] |
associate-*r* [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\color{blue}{\left(3 \cdot \frac{\sqrt{5} - 1}{2}\right) \cdot \cos x} + 3 \cdot \left(\frac{3 - \sqrt{5}}{2} \cdot \cos y + 1\right)}
\] |
*-commutative [<=]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\color{blue}{\cos x \cdot \left(3 \cdot \frac{\sqrt{5} - 1}{2}\right)} + 3 \cdot \left(\frac{3 - \sqrt{5}}{2} \cdot \cos y + 1\right)}
\] |
fma-def [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\color{blue}{\mathsf{fma}\left(\cos x, 3 \cdot \frac{\sqrt{5} - 1}{2}, 3 \cdot \left(\frac{3 - \sqrt{5}}{2} \cdot \cos y + 1\right)\right)}}
\] |
associate-*r/ [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\mathsf{fma}\left(\cos x, \color{blue}{\frac{3 \cdot \left(\sqrt{5} - 1\right)}{2}}, 3 \cdot \left(\frac{3 - \sqrt{5}}{2} \cdot \cos y + 1\right)\right)}
\] |
*-commutative [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\mathsf{fma}\left(\cos x, \frac{\color{blue}{\left(\sqrt{5} - 1\right) \cdot 3}}{2}, 3 \cdot \left(\frac{3 - \sqrt{5}}{2} \cdot \cos y + 1\right)\right)}
\] |
associate-/l* [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\mathsf{fma}\left(\cos x, \color{blue}{\frac{\sqrt{5} - 1}{\frac{2}{3}}}, 3 \cdot \left(\frac{3 - \sqrt{5}}{2} \cdot \cos y + 1\right)\right)}
\] |
sub-neg [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\mathsf{fma}\left(\cos x, \frac{\color{blue}{\sqrt{5} + \left(-1\right)}}{\frac{2}{3}}, 3 \cdot \left(\frac{3 - \sqrt{5}}{2} \cdot \cos y + 1\right)\right)}
\] |
metadata-eval [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\mathsf{fma}\left(\cos x, \frac{\sqrt{5} + \color{blue}{-1}}{\frac{2}{3}}, 3 \cdot \left(\frac{3 - \sqrt{5}}{2} \cdot \cos y + 1\right)\right)}
\] |
metadata-eval [=>]0.5 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\mathsf{fma}\left(\cos x, \frac{\sqrt{5} + -1}{\color{blue}{0.6666666666666666}}, 3 \cdot \left(\frac{3 - \sqrt{5}}{2} \cdot \cos y + 1\right)\right)}
\] |
distribute-lft-in [=>]0.4 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\mathsf{fma}\left(\cos x, \frac{\sqrt{5} + -1}{0.6666666666666666}, \color{blue}{3 \cdot \left(\frac{3 - \sqrt{5}}{2} \cdot \cos y\right) + 3 \cdot 1}\right)}
\] |
metadata-eval [=>]0.4 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\mathsf{fma}\left(\cos x, \frac{\sqrt{5} + -1}{0.6666666666666666}, 3 \cdot \left(\frac{3 - \sqrt{5}}{2} \cdot \cos y\right) + \color{blue}{3}\right)}
\] |
associate-*r* [=>]0.4 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\mathsf{fma}\left(\cos x, \frac{\sqrt{5} + -1}{0.6666666666666666}, \color{blue}{\left(3 \cdot \frac{3 - \sqrt{5}}{2}\right) \cdot \cos y} + 3\right)}
\] |
*-commutative [<=]0.4 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\mathsf{fma}\left(\cos x, \frac{\sqrt{5} + -1}{0.6666666666666666}, \color{blue}{\cos y \cdot \left(3 \cdot \frac{3 - \sqrt{5}}{2}\right)} + 3\right)}
\] |
fma-def [=>]0.4 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\mathsf{fma}\left(\cos x, \frac{\sqrt{5} + -1}{0.6666666666666666}, \color{blue}{\mathsf{fma}\left(\cos y, 3 \cdot \frac{3 - \sqrt{5}}{2}, 3\right)}\right)}
\] |
associate-*r/ [=>]0.4 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\mathsf{fma}\left(\cos x, \frac{\sqrt{5} + -1}{0.6666666666666666}, \mathsf{fma}\left(\cos y, \color{blue}{\frac{3 \cdot \left(3 - \sqrt{5}\right)}{2}}, 3\right)\right)}
\] |
associate-/l* [=>]0.4 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\mathsf{fma}\left(\cos x, \frac{\sqrt{5} + -1}{0.6666666666666666}, \mathsf{fma}\left(\cos y, \color{blue}{\frac{3}{\frac{2}{3 - \sqrt{5}}}}, 3\right)\right)}
\] |
associate-/r/ [=>]0.4 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\mathsf{fma}\left(\cos x, \frac{\sqrt{5} + -1}{0.6666666666666666}, \mathsf{fma}\left(\cos y, \color{blue}{\frac{3}{2} \cdot \left(3 - \sqrt{5}\right)}, 3\right)\right)}
\] |
metadata-eval [=>]0.4 | \[ \frac{\mathsf{fma}\left(\sqrt{2}, \left(\sin y + -0.0625 \cdot \sin x\right) \cdot \left(\left(\sin x + -0.0625 \cdot \sin y\right) \cdot \left(\cos x - \cos y\right)\right), 2\right)}{\mathsf{fma}\left(\cos x, \frac{\sqrt{5} + -1}{0.6666666666666666}, \mathsf{fma}\left(\cos y, \color{blue}{1.5} \cdot \left(3 - \sqrt{5}\right), 3\right)\right)}
\] |
Applied egg-rr0.5
Taylor expanded in y around inf 0.4
Applied egg-rr0.4
Final simplification0.4
| Alternative 1 | |
|---|---|
| Error | 12.1 |
| Cost | 72969 |
| Alternative 2 | |
|---|---|
| Error | 0.5 |
| Cost | 72768 |
| Alternative 3 | |
|---|---|
| Error | 0.4 |
| Cost | 72768 |
| Alternative 4 | |
|---|---|
| Error | 0.4 |
| Cost | 72768 |
| Alternative 5 | |
|---|---|
| Error | 12.1 |
| Cost | 66633 |
| Alternative 6 | |
|---|---|
| Error | 12.1 |
| Cost | 66505 |
| Alternative 7 | |
|---|---|
| Error | 12.1 |
| Cost | 66505 |
| Alternative 8 | |
|---|---|
| Error | 13.2 |
| Cost | 66372 |
| Alternative 9 | |
|---|---|
| Error | 13.1 |
| Cost | 60105 |
| Alternative 10 | |
|---|---|
| Error | 13.2 |
| Cost | 59785 |
| Alternative 11 | |
|---|---|
| Error | 13.2 |
| Cost | 59785 |
| Alternative 12 | |
|---|---|
| Error | 13.2 |
| Cost | 53705 |
| Alternative 13 | |
|---|---|
| Error | 13.3 |
| Cost | 53577 |
| Alternative 14 | |
|---|---|
| Error | 13.4 |
| Cost | 53513 |
| Alternative 15 | |
|---|---|
| Error | 13.7 |
| Cost | 46980 |
| Alternative 16 | |
|---|---|
| Error | 13.7 |
| Cost | 46857 |
| Alternative 17 | |
|---|---|
| Error | 13.8 |
| Cost | 46856 |
| Alternative 18 | |
|---|---|
| Error | 13.7 |
| Cost | 46856 |
| Alternative 19 | |
|---|---|
| Error | 13.7 |
| Cost | 46856 |
| Alternative 20 | |
|---|---|
| Error | 13.7 |
| Cost | 46856 |
| Alternative 21 | |
|---|---|
| Error | 13.7 |
| Cost | 46856 |
| Alternative 22 | |
|---|---|
| Error | 13.7 |
| Cost | 46856 |
| Alternative 23 | |
|---|---|
| Error | 25.9 |
| Cost | 46464 |
| Alternative 24 | |
|---|---|
| Error | 36.5 |
| Cost | 20288 |
| Alternative 25 | |
|---|---|
| Error | 38.1 |
| Cost | 64 |
herbie shell --seed 2022364
(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))))))