Initial program 0.5
\[\frac{\cos th}{\sqrt{2}} \cdot \left(a1 \cdot a1\right) + \frac{\cos th}{\sqrt{2}} \cdot \left(a2 \cdot a2\right)\]
Simplified0.5
\[\leadsto \color{blue}{\frac{\cos th \cdot \mathsf{fma}\left(a1, a1, a2 \cdot a2\right)}{\sqrt{2}}}\]
- Using strategy
rm Applied *-un-lft-identity0.5
\[\leadsto \frac{\cos th \cdot \mathsf{fma}\left(a1, a1, a2 \cdot a2\right)}{\sqrt{\color{blue}{1 \cdot 2}}}\]
Applied sqrt-prod0.5
\[\leadsto \frac{\cos th \cdot \mathsf{fma}\left(a1, a1, a2 \cdot a2\right)}{\color{blue}{\sqrt{1} \cdot \sqrt{2}}}\]
Applied times-frac0.5
\[\leadsto \color{blue}{\frac{\cos th}{\sqrt{1}} \cdot \frac{\mathsf{fma}\left(a1, a1, a2 \cdot a2\right)}{\sqrt{2}}}\]
Simplified0.5
\[\leadsto \color{blue}{\cos th} \cdot \frac{\mathsf{fma}\left(a1, a1, a2 \cdot a2\right)}{\sqrt{2}}\]
- Using strategy
rm Applied add-sqr-sqrt0.5
\[\leadsto \cos th \cdot \frac{\mathsf{fma}\left(a1, a1, a2 \cdot a2\right)}{\sqrt{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}}\]
Applied sqrt-prod0.6
\[\leadsto \cos th \cdot \frac{\mathsf{fma}\left(a1, a1, a2 \cdot a2\right)}{\color{blue}{\sqrt{\sqrt{2}} \cdot \sqrt{\sqrt{2}}}}\]
Applied add-sqr-sqrt0.6
\[\leadsto \cos th \cdot \frac{\color{blue}{\sqrt{\mathsf{fma}\left(a1, a1, a2 \cdot a2\right)} \cdot \sqrt{\mathsf{fma}\left(a1, a1, a2 \cdot a2\right)}}}{\sqrt{\sqrt{2}} \cdot \sqrt{\sqrt{2}}}\]
Applied times-frac0.6
\[\leadsto \cos th \cdot \color{blue}{\left(\frac{\sqrt{\mathsf{fma}\left(a1, a1, a2 \cdot a2\right)}}{\sqrt{\sqrt{2}}} \cdot \frac{\sqrt{\mathsf{fma}\left(a1, a1, a2 \cdot a2\right)}}{\sqrt{\sqrt{2}}}\right)}\]
Simplified0.6
\[\leadsto \cos th \cdot \left(\color{blue}{\frac{\mathsf{hypot}\left(a1, a2\right)}{\sqrt{\sqrt{2}}}} \cdot \frac{\sqrt{\mathsf{fma}\left(a1, a1, a2 \cdot a2\right)}}{\sqrt{\sqrt{2}}}\right)\]
Simplified0.6
\[\leadsto \cos th \cdot \left(\frac{\mathsf{hypot}\left(a1, a2\right)}{\sqrt{\sqrt{2}}} \cdot \color{blue}{\frac{\mathsf{hypot}\left(a1, a2\right)}{\sqrt{\sqrt{2}}}}\right)\]
- Using strategy
rm Applied associate-*r/0.5
\[\leadsto \cos th \cdot \color{blue}{\frac{\frac{\mathsf{hypot}\left(a1, a2\right)}{\sqrt{\sqrt{2}}} \cdot \mathsf{hypot}\left(a1, a2\right)}{\sqrt{\sqrt{2}}}}\]
Simplified0.5
\[\leadsto \cos th \cdot \frac{\color{blue}{\mathsf{hypot}\left(a1, a2\right) \cdot \frac{\mathsf{hypot}\left(a1, a2\right)}{\sqrt{\sqrt{2}}}}}{\sqrt{\sqrt{2}}}\]
Final simplification0.5
\[\leadsto \cos th \cdot \frac{\mathsf{hypot}\left(a1, a2\right) \cdot \frac{\mathsf{hypot}\left(a1, a2\right)}{\sqrt{\sqrt{2}}}}{\sqrt{\sqrt{2}}}\]