Average Error: 0.1 → 0.1
Time: 47.3s
Precision: 64
Internal Precision: 320
\[\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)\]
\[rand \cdot \frac{a - \frac{1.0}{3.0}}{\sqrt{\left(a - \frac{1.0}{3.0}\right) \cdot 9}} + \left(a - \frac{1.0}{3.0}\right)\]

Error

Bits error versus a

Bits error versus rand

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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. Initial simplification0.1

    \[\leadsto (\left(\frac{a - \frac{1.0}{3.0}}{\sqrt{9 \cdot \left(a - \frac{1.0}{3.0}\right)}}\right) \cdot rand + \left(a - \frac{1.0}{3.0}\right))_*\]
  3. Using strategy rm
  4. Applied fma-udef0.1

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

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

Runtime

Time bar (total: 47.3s)Debug logProfile

herbie shell --seed 2018234 +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))))