Average Error: 37.1 → 0.2
Time: 20.7s
Precision: 64
Internal Precision: 2368
\[\sin \left(a + b\right) - \sin \left(a - b\right)\]
\[2 \cdot \left(\sin \left(\frac{b + b}{2}\right) \cdot \cos \left(\frac{a}{2} + \frac{a}{2}\right)\right)\]

Error

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 37.1

    \[\sin \left(a + b\right) - \sin \left(a - b\right)\]
  2. Using strategy rm
  3. Applied diff-sin37.1

    \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\frac{\left(a + b\right) - \left(a - b\right)}{2}\right) \cdot \cos \left(\frac{\left(a + b\right) + \left(a - b\right)}{2}\right)\right)}\]
  4. Applied simplify0.2

    \[\leadsto 2 \cdot \color{blue}{\left(\sin \left(\frac{b + b}{2}\right) \cdot \cos \left(\frac{a}{2} + \frac{a}{2}\right)\right)}\]

Runtime

Time bar (total: 20.7s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (a b)
  :name "sin(a+b)-sin(a-b)"
  (- (sin (+ a b)) (sin (- a b))))