Average Error: 0.1 → 0.1
Time: 39.1s
Precision: 64
Internal Precision: 384
\[\left(a - \frac{1.0}{3.0}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1.0}{3.0}\right)}} \cdot rand\right)\]
\[\left(a - \frac{1.0}{3.0}\right) + rand \cdot \frac{a - \frac{1.0}{3.0}}{\sqrt{9 \cdot \left(a - \frac{1.0}{3.0}\right)}}\]

Error

Bits error versus a

Bits error versus rand

Derivation

  1. Initial program 0.1

    \[\left(a - \frac{1.0}{3.0}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1.0}{3.0}\right)}} \cdot rand\right)\]
  2. Using strategy rm
  3. Applied distribute-lft-in0.1

    \[\leadsto \color{blue}{\left(a - \frac{1.0}{3.0}\right) \cdot 1 + \left(a - \frac{1.0}{3.0}\right) \cdot \left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1.0}{3.0}\right)}} \cdot rand\right)}\]
  4. Applied simplify0.1

    \[\leadsto \color{blue}{\left(a - \frac{1.0}{3.0}\right)} + \left(a - \frac{1.0}{3.0}\right) \cdot \left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1.0}{3.0}\right)}} \cdot rand\right)\]
  5. Applied simplify0.1

    \[\leadsto \left(a - \frac{1.0}{3.0}\right) + \color{blue}{\frac{rand}{\sqrt{\left(a - \frac{1.0}{3.0}\right) \cdot 9}} \cdot \left(a - \frac{1.0}{3.0}\right)}\]
  6. Using strategy rm
  7. Applied div-inv0.1

    \[\leadsto \left(a - \frac{1.0}{3.0}\right) + \color{blue}{\left(rand \cdot \frac{1}{\sqrt{\left(a - \frac{1.0}{3.0}\right) \cdot 9}}\right)} \cdot \left(a - \frac{1.0}{3.0}\right)\]
  8. Applied associate-*l*0.1

    \[\leadsto \left(a - \frac{1.0}{3.0}\right) + \color{blue}{rand \cdot \left(\frac{1}{\sqrt{\left(a - \frac{1.0}{3.0}\right) \cdot 9}} \cdot \left(a - \frac{1.0}{3.0}\right)\right)}\]
  9. Applied simplify0.1

    \[\leadsto \left(a - \frac{1.0}{3.0}\right) + rand \cdot \color{blue}{\frac{a - \frac{1.0}{3.0}}{\sqrt{9 \cdot \left(a - \frac{1.0}{3.0}\right)}}}\]

Runtime

Time bar (total: 39.1s)Debug logProfile

herbie shell --seed '#(1070227846 1561819246 480764335 4016816270 2602869839 2117310382)' +o rules:numerics
(FPCore (a rand)
  :name "Octave 3.8, oct_fill_randg"
  (* (- a (/ 1.0 3.0)) (+ 1 (* (/ 1 (sqrt (* 9 (- a (/ 1.0 3.0))))) rand))))