Average Error: 0.1 → 0.1
Time: 35.6s
Precision: 64
Internal precision: 128
\[\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) \cdot \left(1 + 1 \cdot \frac{rand}{\sqrt{9 \cdot \left(a - \frac{1.0}{3.0}\right)}}\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 *-un-lft-identity 0.1

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

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

    \[\leadsto \left(a - \frac{1.0}{3.0}\right) \cdot \left(1 + 1 \cdot \color{blue}{\frac{rand}{\sqrt{9 \cdot \left(a - \frac{1.0}{3.0}\right)}}}\right)\]
  6. Removed slow pow expressions

Runtime

Time bar (total: 35.6s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(2079582354 2680725196 2460656964 2410037737 2834893555 1701240056)'
(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))))