Average Error: 32.8 → 0.2
Time: 55.7s
Precision: 64
Internal Precision: 4416
\[\frac{\left(2 \cdot a - 3 \cdot \sin a\right) + a \cdot \cos a}{\left(\left(\left(\left(2 \cdot a\right) \cdot a\right) \cdot a\right) \cdot a\right) \cdot a}\]
\[\begin{array}{l} \mathbf{if}\;a \le -0.14258269255488928:\\ \;\;\;\;\frac{1}{a \cdot a} \cdot \frac{\left({\left(\cos a\right)}^{3} + {2}^{3}\right) \cdot \frac{a}{3} - \sin a \cdot \left(\cos a \cdot \cos a + \left(2 \cdot 2 - 2 \cdot \cos a\right)\right)}{\left(\left(2 \cdot a\right) \cdot a\right) \cdot \left(\left(\cos a \cdot \cos a + \left(2 \cdot 2 - 2 \cdot \cos a\right)\right) \cdot \frac{a}{3}\right)}\\ \mathbf{elif}\;a \le 0.14139226800334523:\\ \;\;\;\;\left(\frac{1}{120} + {a}^{4} \cdot \frac{1}{120960}\right) - {a}^{2} \cdot \frac{1}{2520}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos a + 2}{\left(2 \cdot a\right) \cdot {a}^{3}} - \frac{\sin a \cdot 3}{\left(a \cdot a\right) \cdot \left(\left(a \cdot a\right) \cdot \left(2 \cdot a\right)\right)}\\ \end{array}\]

Error

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if a < -0.14258269255488928

    1. Initial program 3.7

      \[\frac{\left(2 \cdot a - 3 \cdot \sin a\right) + a \cdot \cos a}{\left(\left(\left(\left(2 \cdot a\right) \cdot a\right) \cdot a\right) \cdot a\right) \cdot a}\]
    2. Initial simplification3.7

      \[\leadsto \frac{\left(\cos a + 2\right) \cdot a - 3 \cdot \sin a}{\left(a \cdot a\right) \cdot \left(\left(a \cdot a\right) \cdot \left(2 \cdot a\right)\right)}\]
    3. Using strategy rm
    4. Applied *-un-lft-identity3.7

      \[\leadsto \frac{\color{blue}{1 \cdot \left(\left(\cos a + 2\right) \cdot a - 3 \cdot \sin a\right)}}{\left(a \cdot a\right) \cdot \left(\left(a \cdot a\right) \cdot \left(2 \cdot a\right)\right)}\]
    5. Applied times-frac0.3

      \[\leadsto \color{blue}{\frac{1}{a \cdot a} \cdot \frac{\left(\cos a + 2\right) \cdot a - 3 \cdot \sin a}{\left(a \cdot a\right) \cdot \left(2 \cdot a\right)}}\]
    6. Simplified0.2

      \[\leadsto \frac{1}{a \cdot a} \cdot \color{blue}{\frac{\left(\cos a + 2\right) - \frac{\sin a}{\frac{a}{3}}}{\left(a \cdot 2\right) \cdot a}}\]
    7. Using strategy rm
    8. Applied flip3-+0.2

      \[\leadsto \frac{1}{a \cdot a} \cdot \frac{\color{blue}{\frac{{\left(\cos a\right)}^{3} + {2}^{3}}{\cos a \cdot \cos a + \left(2 \cdot 2 - \cos a \cdot 2\right)}} - \frac{\sin a}{\frac{a}{3}}}{\left(a \cdot 2\right) \cdot a}\]
    9. Applied frac-sub0.3

      \[\leadsto \frac{1}{a \cdot a} \cdot \frac{\color{blue}{\frac{\left({\left(\cos a\right)}^{3} + {2}^{3}\right) \cdot \frac{a}{3} - \left(\cos a \cdot \cos a + \left(2 \cdot 2 - \cos a \cdot 2\right)\right) \cdot \sin a}{\left(\cos a \cdot \cos a + \left(2 \cdot 2 - \cos a \cdot 2\right)\right) \cdot \frac{a}{3}}}}{\left(a \cdot 2\right) \cdot a}\]
    10. Applied associate-/l/0.3

      \[\leadsto \frac{1}{a \cdot a} \cdot \color{blue}{\frac{\left({\left(\cos a\right)}^{3} + {2}^{3}\right) \cdot \frac{a}{3} - \left(\cos a \cdot \cos a + \left(2 \cdot 2 - \cos a \cdot 2\right)\right) \cdot \sin a}{\left(\left(a \cdot 2\right) \cdot a\right) \cdot \left(\left(\cos a \cdot \cos a + \left(2 \cdot 2 - \cos a \cdot 2\right)\right) \cdot \frac{a}{3}\right)}}\]

    if -0.14258269255488928 < a < 0.14139226800334523

    1. Initial program 62.1

      \[\frac{\left(2 \cdot a - 3 \cdot \sin a\right) + a \cdot \cos a}{\left(\left(\left(\left(2 \cdot a\right) \cdot a\right) \cdot a\right) \cdot a\right) \cdot a}\]
    2. Initial simplification61.8

      \[\leadsto \frac{\left(\cos a + 2\right) \cdot a - 3 \cdot \sin a}{\left(a \cdot a\right) \cdot \left(\left(a \cdot a\right) \cdot \left(2 \cdot a\right)\right)}\]
    3. Taylor expanded around 0 0.0

      \[\leadsto \color{blue}{\left(\frac{1}{120} + \frac{1}{120960} \cdot {a}^{4}\right) - \frac{1}{2520} \cdot {a}^{2}}\]

    if 0.14139226800334523 < a

    1. Initial program 3.8

      \[\frac{\left(2 \cdot a - 3 \cdot \sin a\right) + a \cdot \cos a}{\left(\left(\left(\left(2 \cdot a\right) \cdot a\right) \cdot a\right) \cdot a\right) \cdot a}\]
    2. Initial simplification3.8

      \[\leadsto \frac{\left(\cos a + 2\right) \cdot a - 3 \cdot \sin a}{\left(a \cdot a\right) \cdot \left(\left(a \cdot a\right) \cdot \left(2 \cdot a\right)\right)}\]
    3. Using strategy rm
    4. Applied div-sub3.9

      \[\leadsto \color{blue}{\frac{\left(\cos a + 2\right) \cdot a}{\left(a \cdot a\right) \cdot \left(\left(a \cdot a\right) \cdot \left(2 \cdot a\right)\right)} - \frac{3 \cdot \sin a}{\left(a \cdot a\right) \cdot \left(\left(a \cdot a\right) \cdot \left(2 \cdot a\right)\right)}}\]
    5. Simplified0.3

      \[\leadsto \color{blue}{\frac{\cos a + 2}{\left(a \cdot 2\right) \cdot {a}^{3}}} - \frac{3 \cdot \sin a}{\left(a \cdot a\right) \cdot \left(\left(a \cdot a\right) \cdot \left(2 \cdot a\right)\right)}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le -0.14258269255488928:\\ \;\;\;\;\frac{1}{a \cdot a} \cdot \frac{\left({\left(\cos a\right)}^{3} + {2}^{3}\right) \cdot \frac{a}{3} - \sin a \cdot \left(\cos a \cdot \cos a + \left(2 \cdot 2 - 2 \cdot \cos a\right)\right)}{\left(\left(2 \cdot a\right) \cdot a\right) \cdot \left(\left(\cos a \cdot \cos a + \left(2 \cdot 2 - 2 \cdot \cos a\right)\right) \cdot \frac{a}{3}\right)}\\ \mathbf{elif}\;a \le 0.14139226800334523:\\ \;\;\;\;\left(\frac{1}{120} + {a}^{4} \cdot \frac{1}{120960}\right) - {a}^{2} \cdot \frac{1}{2520}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos a + 2}{\left(2 \cdot a\right) \cdot {a}^{3}} - \frac{\sin a \cdot 3}{\left(a \cdot a\right) \cdot \left(\left(a \cdot a\right) \cdot \left(2 \cdot a\right)\right)}\\ \end{array}\]

Runtime

Time bar (total: 55.7s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (a)
  :name "(2*a - 3*sin(a) + a*cos(a))/(2*a*a*a*a*a)"
  (/ (+ (- (* 2 a) (* 3 (sin a))) (* a (cos a))) (* (* (* (* (* 2 a) a) a) a) a)))