Average Error: 16.1 → 13.6
Time: 1.1m
Precision: 64
Internal Precision: 2880
\[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
\[\begin{array}{l} \mathbf{if}\;\ell \le -4.7751597257690975 \cdot 10^{+142} \lor \neg \left(\ell \le 9.369212242939625 \cdot 10^{+144}\right):\\ \;\;\;\;\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}\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \frac{\sin \left(\pi \cdot \ell\right)}{\left(F \cdot F\right) \cdot (\left({\ell}^{4}\right) \cdot \left({\pi}^{4} \cdot \frac{1}{24}\right) + \left((\left(\left(\pi \cdot \ell\right) \cdot \left(\pi \cdot \ell\right)\right) \cdot \frac{-1}{2} + 1)_*\right))_*}\\ \end{array}\]

Error

Bits error versus F

Bits error versus l

Derivation

  1. Split input into 2 regimes
  2. if l < -4.7751597257690975e+142 or 9.369212242939625e+144 < l

    1. Initial program 19.4

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

      \[\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)}\]

    if -4.7751597257690975e+142 < l < 9.369212242939625e+144

    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.4

      \[\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.4

      \[\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.3

      \[\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.3

      \[\leadsto \pi \cdot \ell - \frac{\sin \left(\ell \cdot \pi\right)}{\left(F \cdot F\right) \cdot \color{blue}{(\left({\ell}^{4}\right) \cdot \left({\pi}^{4} \cdot \frac{1}{24}\right) + \left((\left(\left(\pi \cdot \ell\right) \cdot \left(\pi \cdot \ell\right)\right) \cdot \frac{-1}{2} + 1)_*\right))_*}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification13.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \le -4.7751597257690975 \cdot 10^{+142} \lor \neg \left(\ell \le 9.369212242939625 \cdot 10^{+144}\right):\\ \;\;\;\;\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}\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \frac{\sin \left(\pi \cdot \ell\right)}{\left(F \cdot F\right) \cdot (\left({\ell}^{4}\right) \cdot \left({\pi}^{4} \cdot \frac{1}{24}\right) + \left((\left(\left(\pi \cdot \ell\right) \cdot \left(\pi \cdot \ell\right)\right) \cdot \frac{-1}{2} + 1)_*\right))_*}\\ \end{array}\]

Runtime

Time bar (total: 1.1m)Debug logProfile

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