\[\left(\frac{1}{6} \cdot {\left(-2 \cdot \log u1\right)}^{0.5}\right) \cdot \cos \left(\left(2 \cdot \pi\right) \cdot u2\right) + 0.5\]
Test:
normal distribution
Bits:
128 bits
Bits error versus u1
Bits error versus u2
Time: 11.4 s
Input Error: 0.4
Output Error: 0.4
Log:
Profile: 🕒
\(0.5 + \frac{1}{\frac{\frac{6}{\cos \left(\pi \cdot \left(u2 \cdot 2\right)\right)}}{{\left(-2 \cdot \log u1\right)}^{0.5}}}\)
  1. Started with
    \[\left(\frac{1}{6} \cdot {\left(-2 \cdot \log u1\right)}^{0.5}\right) \cdot \cos \left(\left(2 \cdot \pi\right) \cdot u2\right) + 0.5\]
    0.4
  2. Applied simplify to get
    \[\color{red}{\left(\frac{1}{6} \cdot {\left(-2 \cdot \log u1\right)}^{0.5}\right) \cdot \cos \left(\left(2 \cdot \pi\right) \cdot u2\right) + 0.5} \leadsto \color{blue}{0.5 + \frac{{\left(-2 \cdot \log u1\right)}^{0.5}}{\frac{6}{\cos \left(\pi \cdot \left(u2 \cdot 2\right)\right)}}}\]
    0.4
  3. Using strategy rm
    0.4
  4. Applied clear-num to get
    \[0.5 + \color{red}{\frac{{\left(-2 \cdot \log u1\right)}^{0.5}}{\frac{6}{\cos \left(\pi \cdot \left(u2 \cdot 2\right)\right)}}} \leadsto 0.5 + \color{blue}{\frac{1}{\frac{\frac{6}{\cos \left(\pi \cdot \left(u2 \cdot 2\right)\right)}}{{\left(-2 \cdot \log u1\right)}^{0.5}}}}\]
    0.4

Original test:


(lambda ((u1 (uniform 0 1)) (u2 (uniform 0 1)))
  #:name "normal distribution"
  (+ (* (* (/ 1 6) (pow (* -2 (log u1)) 0.5)) (cos (* (* 2 PI) u2))) 0.5))