Average Error: 16.0 → 10.1
Time: 1.3m
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}\;F \le -1.3298909550413492 \cdot 10^{+154} \lor \neg \left(F \le -1.8471792353631775 \cdot 10^{-160}\right) \land \left(F \le 1.6951563176912777 \cdot 10^{-158} \lor \neg \left(F \le 1.5999810088398118 \cdot 10^{-21}\right)\right):\\ \;\;\;\;\pi \cdot \ell - \frac{1}{F \cdot \frac{F}{\tan \left(\pi \cdot \ell\right)}}\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \frac{1}{(\left(\pi \cdot \ell\right) \cdot \left(\frac{-1}{3} \cdot \left(F \cdot F\right)\right) + \left(\frac{F \cdot F}{\pi \cdot \ell}\right))_*}\\ \end{array}\]

Error

Bits error versus F

Bits error versus l

Derivation

  1. Split input into 2 regimes
  2. if F < -1.3298909550413492e+154 or -1.8471792353631775e-160 < F < 1.6951563176912777e-158 or 1.5999810088398118e-21 < F

    1. Initial program 18.3

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

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

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

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

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1}{\frac{F}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}}}\]
    9. Using strategy rm
    10. Applied associate-/r/12.5

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

    if -1.3298909550413492e+154 < F < -1.8471792353631775e-160 or 1.6951563176912777e-158 < F < 1.5999810088398118e-21

    1. Initial program 12.3

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

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

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

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

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

      \[\leadsto \pi \cdot \ell - \frac{1}{\color{blue}{\frac{{F}^{2}}{\pi \cdot \ell} - \frac{1}{3} \cdot \left({F}^{2} \cdot \left(\pi \cdot \ell\right)\right)}}\]
    10. Simplified6.3

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \le -1.3298909550413492 \cdot 10^{+154} \lor \neg \left(F \le -1.8471792353631775 \cdot 10^{-160}\right) \land \left(F \le 1.6951563176912777 \cdot 10^{-158} \lor \neg \left(F \le 1.5999810088398118 \cdot 10^{-21}\right)\right):\\ \;\;\;\;\pi \cdot \ell - \frac{1}{F \cdot \frac{F}{\tan \left(\pi \cdot \ell\right)}}\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \frac{1}{(\left(\pi \cdot \ell\right) \cdot \left(\frac{-1}{3} \cdot \left(F \cdot F\right)\right) + \left(\frac{F \cdot F}{\pi \cdot \ell}\right))_*}\\ \end{array}\]

Runtime

Time bar (total: 1.3m)Debug logProfile

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