Average Error: 16.9 → 1.3
Time: 2.3m
Precision: 64
Internal Precision: 3456
\[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
\[\begin{array}{l} \mathbf{if}\;\pi \cdot \ell \le -1.34551932466073 \cdot 10^{+28}:\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{if}\;\pi \cdot \ell \le 4.2580202012117314 \cdot 10^{-21}:\\ \;\;\;\;\ell \cdot \pi - \frac{\frac{\tan \left(\ell \cdot \pi\right)}{F}}{F}\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell\\ \end{array}\]

Error

Bits error versus F

Bits error versus l

Derivation

  1. Split input into 2 regimes
  2. if (* PI l) < -1.34551932466073e+28 or 4.2580202012117314e-21 < (* PI l)

    1. Initial program 23.1

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
    2. Applied simplify23.1

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

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

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

      \[\leadsto \ell \cdot \pi - \frac{\tan \left(\ell \cdot \pi\right) \cdot \color{blue}{\left(\left(\sqrt[3]{\frac{1}{F}} \cdot \sqrt[3]{\frac{1}{F}}\right) \cdot \sqrt[3]{\frac{1}{F}}\right)}}{F}\]
    9. Applied associate-*r*23.1

      \[\leadsto \ell \cdot \pi - \frac{\color{blue}{\left(\tan \left(\ell \cdot \pi\right) \cdot \left(\sqrt[3]{\frac{1}{F}} \cdot \sqrt[3]{\frac{1}{F}}\right)\right) \cdot \sqrt[3]{\frac{1}{F}}}}{F}\]
    10. Taylor expanded around 0 1.2

      \[\leadsto \ell \cdot \pi - \color{blue}{0}\]
    11. Applied simplify1.2

      \[\leadsto \color{blue}{\pi \cdot \ell}\]

    if -1.34551932466073e+28 < (* PI l) < 4.2580202012117314e-21

    1. Initial program 10.2

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

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

      \[\leadsto \ell \cdot \pi - \color{blue}{\frac{\frac{\tan \left(\ell \cdot \pi\right)}{F}}{F}}\]
  3. Recombined 2 regimes into one program.

Runtime

Time bar (total: 2.3m)Debug logProfile

herbie shell --seed '#(1070991898 1055468627 4280279443 640792587 928206309 3646738750)' 
(FPCore (F l)
  :name "VandenBroeck and Keller, Equation (6)"
  (- (* PI l) (* (/ 1 (* F F)) (tan (* PI l)))))