Initial program 57.5%
\[\sqrt{-\log \left(1 - u1\right)} \cdot \cos \left(\left(2 \cdot \pi\right) \cdot u2\right)
\]
Simplified99.0%
\[\leadsto \color{blue}{\sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \cos \left(2 \cdot \left(\pi \cdot u2\right)\right)}
\]
Proof
[Start]57.5 | \[ \sqrt{-\log \left(1 - u1\right)} \cdot \cos \left(\left(2 \cdot \pi\right) \cdot u2\right)
\] |
|---|
sub-neg [=>]57.5 | \[ \sqrt{-\log \color{blue}{\left(1 + \left(-u1\right)\right)}} \cdot \cos \left(\left(2 \cdot \pi\right) \cdot u2\right)
\] |
|---|
log1p-def [=>]99.0 | \[ \sqrt{-\color{blue}{\mathsf{log1p}\left(-u1\right)}} \cdot \cos \left(\left(2 \cdot \pi\right) \cdot u2\right)
\] |
|---|
associate-*l* [=>]99.0 | \[ \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \cos \color{blue}{\left(2 \cdot \left(\pi \cdot u2\right)\right)}
\] |
|---|
Applied egg-rr99.0%
\[\leadsto \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \color{blue}{\left(0.5 + \left(0.5 \cdot \cos \left(\pi \cdot \left(u2 + u2\right)\right) - {\sin \left(\pi \cdot u2\right)}^{2}\right)\right)}
\]
Applied egg-rr98.9%
\[\leadsto \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \color{blue}{\left(\mathsf{fma}\left(0.5, \cos 0, -0.5 + 0.5 \cdot \cos 0\right) + \left(\mathsf{fma}\left(-\sin \left(\pi \cdot u2\right), \sin \left(\pi \cdot u2\right), 0.5 - 0.5 \cdot \cos 0\right) + \mathsf{fma}\left(-\sin \left(\pi \cdot u2\right), \sin \left(\pi \cdot u2\right), 0.5 - 0.5 \cdot \cos 0\right)\right)\right)}\right)
\]
Simplified98.9%
\[\leadsto \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \color{blue}{\left(0.5 + {\sin \left(u2 \cdot \pi\right)}^{2} \cdot -2\right)}\right)
\]
Proof
[Start]98.9 | \[ \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \left(\mathsf{fma}\left(0.5, \cos 0, -0.5 + 0.5 \cdot \cos 0\right) + \left(\mathsf{fma}\left(-\sin \left(\pi \cdot u2\right), \sin \left(\pi \cdot u2\right), 0.5 - 0.5 \cdot \cos 0\right) + \mathsf{fma}\left(-\sin \left(\pi \cdot u2\right), \sin \left(\pi \cdot u2\right), 0.5 - 0.5 \cdot \cos 0\right)\right)\right)\right)
\] |
|---|
associate-+r+ [=>]98.9 | \[ \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \color{blue}{\left(\left(\mathsf{fma}\left(0.5, \cos 0, -0.5 + 0.5 \cdot \cos 0\right) + \mathsf{fma}\left(-\sin \left(\pi \cdot u2\right), \sin \left(\pi \cdot u2\right), 0.5 - 0.5 \cdot \cos 0\right)\right) + \mathsf{fma}\left(-\sin \left(\pi \cdot u2\right), \sin \left(\pi \cdot u2\right), 0.5 - 0.5 \cdot \cos 0\right)\right)}\right)
\] |
|---|
cos-0 [=>]98.9 | \[ \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \left(\left(\mathsf{fma}\left(0.5, \color{blue}{1}, -0.5 + 0.5 \cdot \cos 0\right) + \mathsf{fma}\left(-\sin \left(\pi \cdot u2\right), \sin \left(\pi \cdot u2\right), 0.5 - 0.5 \cdot \cos 0\right)\right) + \mathsf{fma}\left(-\sin \left(\pi \cdot u2\right), \sin \left(\pi \cdot u2\right), 0.5 - 0.5 \cdot \cos 0\right)\right)\right)
\] |
|---|
fma-def [<=]98.9 | \[ \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \left(\left(\color{blue}{\left(0.5 \cdot 1 + \left(-0.5 + 0.5 \cdot \cos 0\right)\right)} + \mathsf{fma}\left(-\sin \left(\pi \cdot u2\right), \sin \left(\pi \cdot u2\right), 0.5 - 0.5 \cdot \cos 0\right)\right) + \mathsf{fma}\left(-\sin \left(\pi \cdot u2\right), \sin \left(\pi \cdot u2\right), 0.5 - 0.5 \cdot \cos 0\right)\right)\right)
\] |
|---|
cos-0 [<=]98.9 | \[ \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \left(\left(\left(0.5 \cdot \color{blue}{\cos 0} + \left(-0.5 + 0.5 \cdot \cos 0\right)\right) + \mathsf{fma}\left(-\sin \left(\pi \cdot u2\right), \sin \left(\pi \cdot u2\right), 0.5 - 0.5 \cdot \cos 0\right)\right) + \mathsf{fma}\left(-\sin \left(\pi \cdot u2\right), \sin \left(\pi \cdot u2\right), 0.5 - 0.5 \cdot \cos 0\right)\right)\right)
\] |
|---|
associate-+r+ [<=]98.9 | \[ \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \left(\color{blue}{\left(0.5 \cdot \cos 0 + \left(\left(-0.5 + 0.5 \cdot \cos 0\right) + \mathsf{fma}\left(-\sin \left(\pi \cdot u2\right), \sin \left(\pi \cdot u2\right), 0.5 - 0.5 \cdot \cos 0\right)\right)\right)} + \mathsf{fma}\left(-\sin \left(\pi \cdot u2\right), \sin \left(\pi \cdot u2\right), 0.5 - 0.5 \cdot \cos 0\right)\right)\right)
\] |
|---|
associate-+l+ [=>]98.9 | \[ \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \color{blue}{\left(0.5 \cdot \cos 0 + \left(\left(\left(-0.5 + 0.5 \cdot \cos 0\right) + \mathsf{fma}\left(-\sin \left(\pi \cdot u2\right), \sin \left(\pi \cdot u2\right), 0.5 - 0.5 \cdot \cos 0\right)\right) + \mathsf{fma}\left(-\sin \left(\pi \cdot u2\right), \sin \left(\pi \cdot u2\right), 0.5 - 0.5 \cdot \cos 0\right)\right)\right)}\right)
\] |
|---|
Applied egg-rr99.0%
\[\leadsto \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \left(0.5 + \color{blue}{\frac{\cos \left(u2 \cdot \pi - u2 \cdot \pi\right) - \cos \left(2 \cdot \left(u2 \cdot \pi\right)\right)}{2}} \cdot -2\right)\right)
\]
Simplified99.0%
\[\leadsto \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \left(0.5 + \color{blue}{\left(0.5 - \frac{\cos \left(\left(2 \cdot \pi\right) \cdot u2\right)}{2}\right)} \cdot -2\right)\right)
\]
Proof
[Start]99.0 | \[ \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \left(0.5 + \frac{\cos \left(u2 \cdot \pi - u2 \cdot \pi\right) - \cos \left(2 \cdot \left(u2 \cdot \pi\right)\right)}{2} \cdot -2\right)\right)
\] |
|---|
div-sub [=>]99.0 | \[ \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \left(0.5 + \color{blue}{\left(\frac{\cos \left(u2 \cdot \pi - u2 \cdot \pi\right)}{2} - \frac{\cos \left(2 \cdot \left(u2 \cdot \pi\right)\right)}{2}\right)} \cdot -2\right)\right)
\] |
|---|
+-inverses [=>]99.0 | \[ \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \left(0.5 + \left(\frac{\cos \color{blue}{0}}{2} - \frac{\cos \left(2 \cdot \left(u2 \cdot \pi\right)\right)}{2}\right) \cdot -2\right)\right)
\] |
|---|
cos-0 [=>]99.0 | \[ \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \left(0.5 + \left(\frac{\color{blue}{1}}{2} - \frac{\cos \left(2 \cdot \left(u2 \cdot \pi\right)\right)}{2}\right) \cdot -2\right)\right)
\] |
|---|
metadata-eval [=>]99.0 | \[ \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \left(0.5 + \left(\color{blue}{0.5} - \frac{\cos \left(2 \cdot \left(u2 \cdot \pi\right)\right)}{2}\right) \cdot -2\right)\right)
\] |
|---|
*-commutative [=>]99.0 | \[ \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \left(0.5 + \left(0.5 - \frac{\cos \left(2 \cdot \color{blue}{\left(\pi \cdot u2\right)}\right)}{2}\right) \cdot -2\right)\right)
\] |
|---|
associate-*r* [=>]99.0 | \[ \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(0.5 + \left(0.5 + \left(0.5 - \frac{\cos \color{blue}{\left(\left(2 \cdot \pi\right) \cdot u2\right)}}{2}\right) \cdot -2\right)\right)
\] |
|---|
Applied egg-rr99.0%
\[\leadsto \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \color{blue}{\left(\frac{0.25}{1.5 - -2 \cdot \left(\cos \left(2 \cdot \left(\pi \cdot u2\right)\right) \cdot -0.5\right)} - \left(\frac{{\left(-1 + -2 \cdot \left(\cos \left(2 \cdot \left(\pi \cdot u2\right)\right) \cdot -0.5\right)\right)}^{2}}{1.5 - -2 \cdot \left(\cos \left(2 \cdot \left(\pi \cdot u2\right)\right) \cdot -0.5\right)} - 0.5\right)\right)}
\]
Final simplification99.0%
\[\leadsto \sqrt{-\mathsf{log1p}\left(-u1\right)} \cdot \left(\frac{0.25}{1.5 + -2 \cdot \left(0.5 \cdot \cos \left(2 \cdot \left(\pi \cdot u2\right)\right)\right)} + \left(0.5 - \frac{{\left(-2 \cdot \left(-0.5 \cdot \cos \left(2 \cdot \left(\pi \cdot u2\right)\right)\right) + -1\right)}^{2}}{1.5 + -2 \cdot \left(0.5 \cdot \cos \left(2 \cdot \left(\pi \cdot u2\right)\right)\right)}\right)\right)
\]