Average Error: 15.5 → 0.3
Time: 50.4s
Precision: 64
Internal Precision: 1344
\[r \cdot \frac{\sin b}{\cos \left(a + b\right)}\]
\[r \cdot \frac{\sin b}{(\left(\cos a\right) \cdot \left(\cos b\right) + \left(-\sin b \cdot \sin a\right))_* + 0}\]

Error

Bits error versus r

Bits error versus a

Bits error versus b

Try it out

  1. Inputs

  2. Original Output:

    Herbie Output:

Derivation

  1. Initial program 15.5

    \[r \cdot \frac{\sin b}{\cos \left(a + b\right)}\]
  2. Using strategy rm
  3. Applied cos-sum0.3

    \[\leadsto r \cdot \frac{\sin b}{\color{blue}{\cos a \cdot \cos b - \sin a \cdot \sin b}}\]
  4. Using strategy rm
  5. Applied prod-diff0.3

    \[\leadsto r \cdot \frac{\sin b}{\color{blue}{(\left(\cos a\right) \cdot \left(\cos b\right) + \left(-\sin b \cdot \sin a\right))_* + (\left(-\sin b\right) \cdot \left(\sin a\right) + \left(\sin b \cdot \sin a\right))_*}}\]
  6. Applied simplify0.3

    \[\leadsto r \cdot \frac{\sin b}{(\left(\cos a\right) \cdot \left(\cos b\right) + \left(-\sin b \cdot \sin a\right))_* + \color{blue}{0}}\]

Runtime

Time bar (total: 50.4s)Debug logProfile

herbie shell --seed '#(1072361757 3390613284 2339397988 1175251238 145061547 3101881848)' +o rules:numerics
(FPCore (r a b)
  :name "r*sin(b)/cos(a+b), B"
  (* r (/ (sin b) (cos (+ a b)))))