Average Error: 16.1 → 8.0
Time: 2.5m
Precision: 64
Internal Precision: 3904
\[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
\[\pi \cdot \ell - \frac{\frac{1}{F}}{\frac{\frac{F}{\pi}}{\ell} - \left(\ell \cdot F\right) \cdot \left(\pi \cdot \frac{1}{3}\right)}\]

Error

Bits error versus F

Bits error versus l

Try it out

  1. Inputs

  2. Original Output:

    Herbie Output:

Derivation

  1. Initial program 16.1

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

    \[\leadsto \color{blue}{\ell \cdot \pi - \frac{\tan \left(\ell \cdot \pi\right)}{F \cdot F}}\]
  3. Using strategy rm
  4. Applied *-un-lft-identity15.8

    \[\leadsto \ell \cdot \pi - \frac{\color{blue}{1 \cdot \tan \left(\ell \cdot \pi\right)}}{F \cdot F}\]
  5. Applied times-frac12.2

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

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

    \[\leadsto \ell \cdot \pi - \frac{1}{F} \cdot \frac{1}{\color{blue}{\frac{F}{\pi \cdot \ell} - \frac{1}{3} \cdot \left(F \cdot \left(\pi \cdot \ell\right)\right)}}\]
  9. Applied simplify8.0

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

Runtime

Time bar (total: 2.5m)Debug logProfile

herbie shell --seed '#(1072361757 3390613284 2339397988 1175251238 145061547 3101881848)' 
(FPCore (F l)
  :name "VandenBroeck and Keller, Equation (6)"
  (- (* PI l) (* (/ 1 (* F F)) (tan (* PI l)))))