Average Error: 16.5 → 8.5
Time: 1.5m
Precision: 64
Internal Precision: 3136
\[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
\[\begin{array}{l} \mathbf{if}\;\ell \le -4.305557043867859 \cdot 10^{+153}:\\ \;\;\;\;\pi \cdot \ell - \frac{\frac{\tan \left(\sqrt[3]{\pi \cdot \ell} \cdot \left(\sqrt[3]{\pi \cdot \ell} \cdot \sqrt[3]{\pi \cdot \ell}\right)\right)}{F}}{F}\\ \mathbf{elif}\;\ell \le 4.308821057688026 \cdot 10^{+153}:\\ \;\;\;\;\pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right)}{\left(1 + \frac{1}{24} \cdot \left({\pi}^{4} \cdot {\ell}^{4}\right)\right) - \left({\ell}^{2} \cdot {\pi}^{2}\right) \cdot \frac{1}{2}} \cdot \frac{1}{F}}{F}\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \frac{\tan \left(e^{\log \left(\pi \cdot \ell\right)}\right)}{F \cdot F}\\ \end{array}\]

Error

Bits error versus F

Bits error versus l

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if l < -4.305557043867859e+153

    1. Initial program 21.7

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
    2. Initial simplification21.7

      \[\leadsto \pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}\]
    3. Using strategy rm
    4. Applied associate-/r*21.7

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt21.8

      \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \color{blue}{\left(\left(\sqrt[3]{\pi \cdot \ell} \cdot \sqrt[3]{\pi \cdot \ell}\right) \cdot \sqrt[3]{\pi \cdot \ell}\right)}}{F}}{F}\]

    if -4.305557043867859e+153 < l < 4.308821057688026e+153

    1. Initial program 15.0

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
    2. Initial simplification14.6

      \[\leadsto \pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}\]
    3. Using strategy rm
    4. Applied associate-/r*9.8

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}}\]
    5. Using strategy rm
    6. Applied div-inv9.8

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\tan \left(\pi \cdot \ell\right) \cdot \frac{1}{F}}}{F}\]
    7. Taylor expanded around -inf 9.8

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{\sin \left(\pi \cdot \ell\right)}{\cos \left(\pi \cdot \ell\right)}} \cdot \frac{1}{F}}{F}\]
    8. Taylor expanded around 0 4.0

      \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right)}{\color{blue}{\left(\frac{1}{24} \cdot \left({\pi}^{4} \cdot {\ell}^{4}\right) + 1\right) - \frac{1}{2} \cdot \left({\pi}^{2} \cdot {\ell}^{2}\right)}} \cdot \frac{1}{F}}{F}\]

    if 4.308821057688026e+153 < l

    1. Initial program 19.7

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
    2. Initial simplification19.7

      \[\leadsto \pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}\]
    3. Using strategy rm
    4. Applied add-exp-log19.7

      \[\leadsto \pi \cdot \ell - \frac{\tan \color{blue}{\left(e^{\log \left(\pi \cdot \ell\right)}\right)}}{F \cdot F}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification8.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \le -4.305557043867859 \cdot 10^{+153}:\\ \;\;\;\;\pi \cdot \ell - \frac{\frac{\tan \left(\sqrt[3]{\pi \cdot \ell} \cdot \left(\sqrt[3]{\pi \cdot \ell} \cdot \sqrt[3]{\pi \cdot \ell}\right)\right)}{F}}{F}\\ \mathbf{elif}\;\ell \le 4.308821057688026 \cdot 10^{+153}:\\ \;\;\;\;\pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right)}{\left(1 + \frac{1}{24} \cdot \left({\pi}^{4} \cdot {\ell}^{4}\right)\right) - \left({\ell}^{2} \cdot {\pi}^{2}\right) \cdot \frac{1}{2}} \cdot \frac{1}{F}}{F}\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \frac{\tan \left(e^{\log \left(\pi \cdot \ell\right)}\right)}{F \cdot F}\\ \end{array}\]

Runtime

Time bar (total: 1.5m)Debug logProfile

herbie shell --seed 2018255 
(FPCore (F l)
  :name "VandenBroeck and Keller, Equation (6)"
  (- (* PI l) (* (/ 1 (* F F)) (tan (* PI l)))))