\[\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: 6.0 s
Input Error: 0.4
Output Error: 0.4
Log:
Profile: 🕒
\((\left(\log_* (1 + (e^{\frac{{\left(-2 \cdot \log u1\right)}^{0.5}}{6}} - 1)^*)\right) * \left(\cos \left(\pi \cdot \left(u2 \cdot 2\right)\right)\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}{(\left(\frac{{\left(-2 \cdot \log u1\right)}^{0.5}}{6}\right) * \left(\cos \left(\pi \cdot \left(u2 \cdot 2\right)\right)\right) + 0.5)_*}\]
    0.3
  3. Using strategy rm
    0.3
  4. Applied log1p-expm1-u to get
    \[(\color{red}{\left(\frac{{\left(-2 \cdot \log u1\right)}^{0.5}}{6}\right)} * \left(\cos \left(\pi \cdot \left(u2 \cdot 2\right)\right)\right) + 0.5)_* \leadsto (\color{blue}{\left(\log_* (1 + (e^{\frac{{\left(-2 \cdot \log u1\right)}^{0.5}}{6}} - 1)^*)\right)} * \left(\cos \left(\pi \cdot \left(u2 \cdot 2\right)\right)\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))