Average Error: 16.3 → 13.8
Time: 2.4m
Precision: 64
Internal Precision: 3904
\[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
\[\begin{array}{l} \mathbf{if}\;\ell \le -4.3508229889260776 \cdot 10^{+153}:\\ \;\;\;\;\pi \cdot \ell - \left(\sqrt{\frac{1}{F \cdot F}} \cdot \tan \left(\pi \cdot \ell\right)\right) \cdot \sqrt{\frac{1}{F \cdot F}}\\ \mathbf{elif}\;\ell \le 4.325298884114056 \cdot 10^{+153}:\\ \;\;\;\;\pi \cdot \ell - \frac{\sin \left(\pi \cdot \ell\right)}{\left(F \cdot F\right) \cdot \left((\frac{1}{24} \cdot \left({\pi}^{4} \cdot {\ell}^{4}\right) + 1)_* - \frac{1}{2} \cdot \left(\left(\pi \cdot \ell\right) \cdot \left(\pi \cdot \ell\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \tan \left(\sqrt[3]{\pi \cdot \ell} \cdot \left(\sqrt[3]{\pi \cdot \ell} \cdot \sqrt[3]{\pi \cdot \ell}\right)\right) \cdot \frac{1}{F \cdot F}\\ \end{array}\]

Error

Bits error versus F

Bits error versus l

Derivation

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

    1. Initial program 20.1

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
    2. Using strategy rm
    3. Applied add-sqr-sqrt20.1

      \[\leadsto \pi \cdot \ell - \color{blue}{\left(\sqrt{\frac{1}{F \cdot F}} \cdot \sqrt{\frac{1}{F \cdot F}}\right)} \cdot \tan \left(\pi \cdot \ell\right)\]
    4. Applied associate-*l*20.1

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

    if -4.3508229889260776e+153 < l < 4.325298884114056e+153

    1. Initial program 14.8

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
    2. Using strategy rm
    3. Applied tan-quot14.8

      \[\leadsto \pi \cdot \ell - \frac{1}{F \cdot F} \cdot \color{blue}{\frac{\sin \left(\pi \cdot \ell\right)}{\cos \left(\pi \cdot \ell\right)}}\]
    4. Applied frac-times14.5

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1 \cdot \sin \left(\pi \cdot \ell\right)}{\left(F \cdot F\right) \cdot \cos \left(\pi \cdot \ell\right)}}\]
    5. Simplified14.5

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

      \[\leadsto \pi \cdot \ell - \frac{\sin \left(\ell \cdot \pi\right)}{\left(F \cdot F\right) \cdot \color{blue}{\left(\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)\right)}}\]
    7. Simplified11.4

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

    if 4.325298884114056e+153 < l

    1. Initial program 20.8

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
    2. Using strategy rm
    3. Applied add-cube-cbrt20.7

      \[\leadsto \pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \color{blue}{\left(\left(\sqrt[3]{\pi \cdot \ell} \cdot \sqrt[3]{\pi \cdot \ell}\right) \cdot \sqrt[3]{\pi \cdot \ell}\right)}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification13.8

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

Runtime

Time bar (total: 2.4m)Debug logProfile

herbie shell --seed 2018227 +o rules:numerics
(FPCore (F l)
  :name "VandenBroeck and Keller, Equation (6)"
  (- (* PI l) (* (/ 1 (* F F)) (tan (* PI l)))))