Average Error: 0.1 → 0.1
Time: 3.0m
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) + \frac{rand}{\sqrt{\left(a - \frac{1.0}{3.0}\right) \cdot 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. Removed slow pow expressions.

Runtime

Time bar (total: 3.0m)Debug logProfile

herbie shell --seed '#(1063027428 1192549564 1443466578 604016274 3637110559 1698629644)' 
(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))))