VandenBroeck and Keller, Equation (20)

Percentage Accurate: 6.7% → 98.9%
Time: 17.0s
Alternatives: 5
Speedup: 4.8×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\mathsf{PI}\left(\right)}{4}\\ t_1 := t\_0 \cdot f\\ t_2 := e^{t\_1}\\ t_3 := e^{-t\_1}\\ -\frac{1}{t\_0} \cdot \log \left(\frac{t\_2 + t\_3}{t\_2 - t\_3}\right) \end{array} \end{array} \]
(FPCore (f)
 :precision binary64
 (let* ((t_0 (/ (PI) 4.0)) (t_1 (* t_0 f)) (t_2 (exp t_1)) (t_3 (exp (- t_1))))
   (- (* (/ 1.0 t_0) (log (/ (+ t_2 t_3) (- t_2 t_3)))))))
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\mathsf{PI}\left(\right)}{4}\\
t_1 := t\_0 \cdot f\\
t_2 := e^{t\_1}\\
t_3 := e^{-t\_1}\\
-\frac{1}{t\_0} \cdot \log \left(\frac{t\_2 + t\_3}{t\_2 - t\_3}\right)
\end{array}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 5 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 6.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\mathsf{PI}\left(\right)}{4}\\ t_1 := t\_0 \cdot f\\ t_2 := e^{t\_1}\\ t_3 := e^{-t\_1}\\ -\frac{1}{t\_0} \cdot \log \left(\frac{t\_2 + t\_3}{t\_2 - t\_3}\right) \end{array} \end{array} \]
(FPCore (f)
 :precision binary64
 (let* ((t_0 (/ (PI) 4.0)) (t_1 (* t_0 f)) (t_2 (exp t_1)) (t_3 (exp (- t_1))))
   (- (* (/ 1.0 t_0) (log (/ (+ t_2 t_3) (- t_2 t_3)))))))
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\mathsf{PI}\left(\right)}{4}\\
t_1 := t\_0 \cdot f\\
t_2 := e^{t\_1}\\
t_3 := e^{-t\_1}\\
-\frac{1}{t\_0} \cdot \log \left(\frac{t\_2 + t\_3}{t\_2 - t\_3}\right)
\end{array}
\end{array}

Alternative 1: 98.9% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{2}{\sqrt{\mathsf{PI}\left(\right)}}\\ \left(\log \tanh \left(0.25 \cdot \left(f \cdot \mathsf{PI}\left(\right)\right)\right) \cdot t\_0\right) \cdot t\_0 \end{array} \end{array} \]
(FPCore (f)
 :precision binary64
 (let* ((t_0 (/ 2.0 (sqrt (PI)))))
   (* (* (log (tanh (* 0.25 (* f (PI))))) t_0) t_0)))
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{2}{\sqrt{\mathsf{PI}\left(\right)}}\\
\left(\log \tanh \left(0.25 \cdot \left(f \cdot \mathsf{PI}\left(\right)\right)\right) \cdot t\_0\right) \cdot t\_0
\end{array}
\end{array}
Derivation
  1. Initial program 6.9%

    \[-\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-neg.f64N/A

      \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right)\right)} \]
    2. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right)}\right) \]
    3. distribute-rgt-neg-inN/A

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \left(\mathsf{neg}\left(\log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right)\right)\right)} \]
    4. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}}} \cdot \left(\mathsf{neg}\left(\log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right)\right)\right) \]
    5. inv-powN/A

      \[\leadsto \color{blue}{{\left(\frac{\mathsf{PI}\left(\right)}{4}\right)}^{-1}} \cdot \left(\mathsf{neg}\left(\log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right)\right)\right) \]
    6. sqr-powN/A

      \[\leadsto \color{blue}{\left({\left(\frac{\mathsf{PI}\left(\right)}{4}\right)}^{\left(\frac{-1}{2}\right)} \cdot {\left(\frac{\mathsf{PI}\left(\right)}{4}\right)}^{\left(\frac{-1}{2}\right)}\right)} \cdot \left(\mathsf{neg}\left(\log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right)\right)\right) \]
  4. Applied rewrites98.6%

    \[\leadsto \color{blue}{{\left(\frac{4}{\mathsf{PI}\left(\right)}\right)}^{0.5} \cdot \left({\left(\frac{4}{\mathsf{PI}\left(\right)}\right)}^{0.5} \cdot \log \tanh \left(f \cdot \left(0.25 \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
  5. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto \color{blue}{{\left(\frac{4}{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{2}}} \cdot \left({\left(\frac{4}{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{2}} \cdot \log \tanh \left(f \cdot \left(\frac{1}{4} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
    2. unpow1/2N/A

      \[\leadsto \color{blue}{\sqrt{\frac{4}{\mathsf{PI}\left(\right)}}} \cdot \left({\left(\frac{4}{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{2}} \cdot \log \tanh \left(f \cdot \left(\frac{1}{4} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
    3. lift-/.f64N/A

      \[\leadsto \sqrt{\color{blue}{\frac{4}{\mathsf{PI}\left(\right)}}} \cdot \left({\left(\frac{4}{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{2}} \cdot \log \tanh \left(f \cdot \left(\frac{1}{4} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
    4. sqrt-divN/A

      \[\leadsto \color{blue}{\frac{\sqrt{4}}{\sqrt{\mathsf{PI}\left(\right)}}} \cdot \left({\left(\frac{4}{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{2}} \cdot \log \tanh \left(f \cdot \left(\frac{1}{4} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
    5. metadata-evalN/A

      \[\leadsto \frac{\color{blue}{2}}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left({\left(\frac{4}{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{2}} \cdot \log \tanh \left(f \cdot \left(\frac{1}{4} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
    6. lift-PI.f64N/A

      \[\leadsto \frac{2}{\sqrt{\color{blue}{\mathsf{PI}\left(\right)}}} \cdot \left({\left(\frac{4}{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{2}} \cdot \log \tanh \left(f \cdot \left(\frac{1}{4} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
    7. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{2}{\sqrt{\mathsf{PI}\left(\right)}}} \cdot \left({\left(\frac{4}{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{2}} \cdot \log \tanh \left(f \cdot \left(\frac{1}{4} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
    8. lift-PI.f64N/A

      \[\leadsto \frac{2}{\sqrt{\color{blue}{\mathsf{PI}\left(\right)}}} \cdot \left({\left(\frac{4}{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{2}} \cdot \log \tanh \left(f \cdot \left(\frac{1}{4} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
    9. lower-sqrt.f6498.6

      \[\leadsto \frac{2}{\color{blue}{\sqrt{\mathsf{PI}\left(\right)}}} \cdot \left({\left(\frac{4}{\mathsf{PI}\left(\right)}\right)}^{0.5} \cdot \log \tanh \left(f \cdot \left(0.25 \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
    10. lift-*.f64N/A

      \[\leadsto \frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \color{blue}{\left({\left(\frac{4}{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{2}} \cdot \log \tanh \left(f \cdot \left(\frac{1}{4} \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
    11. *-commutativeN/A

      \[\leadsto \frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \color{blue}{\left(\log \tanh \left(f \cdot \left(\frac{1}{4} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {\left(\frac{4}{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{2}}\right)} \]
    12. lower-*.f6498.6

      \[\leadsto \frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \color{blue}{\left(\log \tanh \left(f \cdot \left(0.25 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {\left(\frac{4}{\mathsf{PI}\left(\right)}\right)}^{0.5}\right)} \]
  6. Applied rewrites98.6%

    \[\leadsto \color{blue}{\frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(\log \tanh \left(\frac{f}{\frac{4}{\mathsf{PI}\left(\right)}}\right) \cdot \frac{2}{\sqrt{\mathsf{PI}\left(\right)}}\right)} \]
  7. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(\log \tanh \color{blue}{\left(\frac{f}{\frac{4}{\mathsf{PI}\left(\right)}}\right)} \cdot \frac{2}{\sqrt{\mathsf{PI}\left(\right)}}\right) \]
    2. lift-/.f64N/A

      \[\leadsto \frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(\log \tanh \left(\frac{f}{\color{blue}{\frac{4}{\mathsf{PI}\left(\right)}}}\right) \cdot \frac{2}{\sqrt{\mathsf{PI}\left(\right)}}\right) \]
    3. associate-/r/N/A

      \[\leadsto \frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(\log \tanh \color{blue}{\left(\frac{f}{4} \cdot \mathsf{PI}\left(\right)\right)} \cdot \frac{2}{\sqrt{\mathsf{PI}\left(\right)}}\right) \]
    4. *-commutativeN/A

      \[\leadsto \frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(\log \tanh \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{f}{4}\right)} \cdot \frac{2}{\sqrt{\mathsf{PI}\left(\right)}}\right) \]
    5. associate-/l*N/A

      \[\leadsto \frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(\log \tanh \color{blue}{\left(\frac{\mathsf{PI}\left(\right) \cdot f}{4}\right)} \cdot \frac{2}{\sqrt{\mathsf{PI}\left(\right)}}\right) \]
    6. div-invN/A

      \[\leadsto \frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(\log \tanh \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot f\right) \cdot \frac{1}{4}\right)} \cdot \frac{2}{\sqrt{\mathsf{PI}\left(\right)}}\right) \]
    7. metadata-evalN/A

      \[\leadsto \frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(\log \tanh \left(\left(\mathsf{PI}\left(\right) \cdot f\right) \cdot \color{blue}{\frac{1}{4}}\right) \cdot \frac{2}{\sqrt{\mathsf{PI}\left(\right)}}\right) \]
    8. lower-*.f64N/A

      \[\leadsto \frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(\log \tanh \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot f\right) \cdot \frac{1}{4}\right)} \cdot \frac{2}{\sqrt{\mathsf{PI}\left(\right)}}\right) \]
    9. *-commutativeN/A

      \[\leadsto \frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(\log \tanh \left(\color{blue}{\left(f \cdot \mathsf{PI}\left(\right)\right)} \cdot \frac{1}{4}\right) \cdot \frac{2}{\sqrt{\mathsf{PI}\left(\right)}}\right) \]
    10. lower-*.f6498.6

      \[\leadsto \frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(\log \tanh \left(\color{blue}{\left(f \cdot \mathsf{PI}\left(\right)\right)} \cdot 0.25\right) \cdot \frac{2}{\sqrt{\mathsf{PI}\left(\right)}}\right) \]
  8. Applied rewrites98.6%

    \[\leadsto \frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(\log \tanh \color{blue}{\left(\left(f \cdot \mathsf{PI}\left(\right)\right) \cdot 0.25\right)} \cdot \frac{2}{\sqrt{\mathsf{PI}\left(\right)}}\right) \]
  9. Final simplification98.6%

    \[\leadsto \left(\log \tanh \left(0.25 \cdot \left(f \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{2}{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot \frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \]
  10. Add Preprocessing

Alternative 2: 99.0% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.25 \cdot \mathsf{PI}\left(\right)\\ \frac{\log \tanh \left(t\_0 \cdot f\right)}{t\_0} \end{array} \end{array} \]
(FPCore (f)
 :precision binary64
 (let* ((t_0 (* 0.25 (PI)))) (/ (log (tanh (* t_0 f))) t_0)))
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 0.25 \cdot \mathsf{PI}\left(\right)\\
\frac{\log \tanh \left(t\_0 \cdot f\right)}{t\_0}
\end{array}
\end{array}
Derivation
  1. Initial program 6.9%

    \[-\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-neg.f64N/A

      \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right)\right)} \]
    2. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right)}\right) \]
    3. *-commutativeN/A

      \[\leadsto \mathsf{neg}\left(\color{blue}{\log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right) \cdot \frac{1}{\frac{\mathsf{PI}\left(\right)}{4}}}\right) \]
    4. lift-/.f64N/A

      \[\leadsto \mathsf{neg}\left(\log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right) \cdot \color{blue}{\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}}}\right) \]
    5. un-div-invN/A

      \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{\log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right)}{\frac{\mathsf{PI}\left(\right)}{4}}}\right) \]
  4. Applied rewrites98.6%

    \[\leadsto \color{blue}{\frac{\log \tanh \left(f \cdot \left(0.25 \cdot \mathsf{PI}\left(\right)\right)\right)}{0.25 \cdot \mathsf{PI}\left(\right)}} \]
  5. Final simplification98.6%

    \[\leadsto \frac{\log \tanh \left(\left(0.25 \cdot \mathsf{PI}\left(\right)\right) \cdot f\right)}{0.25 \cdot \mathsf{PI}\left(\right)} \]
  6. Add Preprocessing

Alternative 3: 96.4% accurate, 3.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{PI}\left(\right) \cdot 2\\ \log \left(\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(t\_0 \cdot 2\right) \cdot 0.005208333333333333, -2, 0.0625 \cdot t\_0\right) \cdot f, f, \frac{2}{0.5 \cdot \mathsf{PI}\left(\right)}\right)}{f}\right) \cdot \frac{-4}{\mathsf{PI}\left(\right)} \end{array} \end{array} \]
(FPCore (f)
 :precision binary64
 (let* ((t_0 (* (PI) 2.0)))
   (*
    (log
     (/
      (fma
       (* (fma (* (* t_0 2.0) 0.005208333333333333) -2.0 (* 0.0625 t_0)) f)
       f
       (/ 2.0 (* 0.5 (PI))))
      f))
    (/ -4.0 (PI)))))
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot 2\\
\log \left(\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(t\_0 \cdot 2\right) \cdot 0.005208333333333333, -2, 0.0625 \cdot t\_0\right) \cdot f, f, \frac{2}{0.5 \cdot \mathsf{PI}\left(\right)}\right)}{f}\right) \cdot \frac{-4}{\mathsf{PI}\left(\right)}
\end{array}
\end{array}
Derivation
  1. Initial program 6.9%

    \[-\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right) \]
  2. Add Preprocessing
  3. Taylor expanded in f around 0

    \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \color{blue}{\left(\frac{2}{f \cdot \left(\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)\right)}\right)} \]
  4. Step-by-step derivation
    1. associate-/l/N/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \color{blue}{\left(\frac{\frac{2}{\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)}}{f}\right)} \]
    2. metadata-evalN/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{\color{blue}{2 \cdot 1}}{\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)}}{f}\right) \]
    3. associate-*r/N/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\color{blue}{2 \cdot \frac{1}{\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)}}}{f}\right) \]
    4. lower-/.f64N/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \color{blue}{\left(\frac{2 \cdot \frac{1}{\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)}}{f}\right)} \]
    5. associate-*r/N/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\color{blue}{\frac{2 \cdot 1}{\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)}}}{f}\right) \]
    6. metadata-evalN/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{\color{blue}{2}}{\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)}}{f}\right) \]
    7. distribute-rgt-out--N/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{2}{\color{blue}{\mathsf{PI}\left(\right) \cdot \left(\frac{1}{4} - \frac{-1}{4}\right)}}}{f}\right) \]
    8. metadata-evalN/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{2}{\mathsf{PI}\left(\right) \cdot \color{blue}{\frac{1}{2}}}}{f}\right) \]
    9. *-commutativeN/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{2}{\color{blue}{\frac{1}{2} \cdot \mathsf{PI}\left(\right)}}}{f}\right) \]
    10. associate-/r*N/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\color{blue}{\frac{\frac{2}{\frac{1}{2}}}{\mathsf{PI}\left(\right)}}}{f}\right) \]
    11. metadata-evalN/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{\color{blue}{4}}{\mathsf{PI}\left(\right)}}{f}\right) \]
    12. lower-/.f64N/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\color{blue}{\frac{4}{\mathsf{PI}\left(\right)}}}{f}\right) \]
    13. lower-PI.f6494.8

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{4}{\color{blue}{\mathsf{PI}\left(\right)}}}{f}\right) \]
  5. Applied rewrites94.8%

    \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \color{blue}{\left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)} \]
  6. Step-by-step derivation
    1. lift-neg.f64N/A

      \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)\right)} \]
    2. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)}\right) \]
    3. lift-/.f64N/A

      \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}}} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)\right) \]
    4. lift-/.f64N/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{4}}} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)\right) \]
    5. clear-numN/A

      \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{4}{\mathsf{PI}\left(\right)}} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)\right) \]
    6. lift-/.f64N/A

      \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{4}{\mathsf{PI}\left(\right)}} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)\right) \]
  7. Applied rewrites94.8%

    \[\leadsto \color{blue}{\frac{-4}{\mathsf{PI}\left(\right)} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)} \]
  8. Taylor expanded in f around 0

    \[\leadsto \frac{-4}{\mathsf{PI}\left(\right)} \cdot \log \color{blue}{\left(\frac{f \cdot \left(\frac{-1}{4} \cdot \frac{\mathsf{PI}\left(\right)}{\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)} + \left(\frac{1}{4} \cdot \frac{\mathsf{PI}\left(\right)}{\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)} + f \cdot \left(\frac{1}{16} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)} - 2 \cdot \frac{\frac{1}{384} \cdot {\mathsf{PI}\left(\right)}^{3} - \frac{-1}{384} \cdot {\mathsf{PI}\left(\right)}^{3}}{{\left(\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)\right)}^{2}}\right)\right)\right) + 2 \cdot \frac{1}{\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)}}{f}\right)} \]
  9. Applied rewrites95.5%

    \[\leadsto \frac{-4}{\mathsf{PI}\left(\right)} \cdot \log \color{blue}{\left(\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.005208333333333333 \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 2\right) \cdot 2\right), -2, \left(\mathsf{PI}\left(\right) \cdot 2\right) \cdot 0.0625\right) \cdot f, f, \frac{2}{0.5 \cdot \mathsf{PI}\left(\right)}\right)}{f}\right)} \]
  10. Final simplification95.5%

    \[\leadsto \log \left(\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(\left(\mathsf{PI}\left(\right) \cdot 2\right) \cdot 2\right) \cdot 0.005208333333333333, -2, 0.0625 \cdot \left(\mathsf{PI}\left(\right) \cdot 2\right)\right) \cdot f, f, \frac{2}{0.5 \cdot \mathsf{PI}\left(\right)}\right)}{f}\right) \cdot \frac{-4}{\mathsf{PI}\left(\right)} \]
  11. Add Preprocessing

Alternative 4: 96.0% accurate, 3.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\mathsf{PI}\left(\right)}\\ \left(\frac{-2}{t\_0} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)\right) \cdot \frac{2}{t\_0} \end{array} \end{array} \]
(FPCore (f)
 :precision binary64
 (let* ((t_0 (sqrt (PI))))
   (* (* (/ (- 2.0) t_0) (log (/ (/ 4.0 (PI)) f))) (/ 2.0 t_0))))
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{PI}\left(\right)}\\
\left(\frac{-2}{t\_0} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)\right) \cdot \frac{2}{t\_0}
\end{array}
\end{array}
Derivation
  1. Initial program 6.9%

    \[-\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right) \]
  2. Add Preprocessing
  3. Taylor expanded in f around 0

    \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \color{blue}{\left(\frac{2}{f \cdot \left(\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)\right)}\right)} \]
  4. Step-by-step derivation
    1. associate-/l/N/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \color{blue}{\left(\frac{\frac{2}{\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)}}{f}\right)} \]
    2. metadata-evalN/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{\color{blue}{2 \cdot 1}}{\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)}}{f}\right) \]
    3. associate-*r/N/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\color{blue}{2 \cdot \frac{1}{\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)}}}{f}\right) \]
    4. lower-/.f64N/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \color{blue}{\left(\frac{2 \cdot \frac{1}{\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)}}{f}\right)} \]
    5. associate-*r/N/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\color{blue}{\frac{2 \cdot 1}{\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)}}}{f}\right) \]
    6. metadata-evalN/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{\color{blue}{2}}{\frac{1}{4} \cdot \mathsf{PI}\left(\right) - \frac{-1}{4} \cdot \mathsf{PI}\left(\right)}}{f}\right) \]
    7. distribute-rgt-out--N/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{2}{\color{blue}{\mathsf{PI}\left(\right) \cdot \left(\frac{1}{4} - \frac{-1}{4}\right)}}}{f}\right) \]
    8. metadata-evalN/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{2}{\mathsf{PI}\left(\right) \cdot \color{blue}{\frac{1}{2}}}}{f}\right) \]
    9. *-commutativeN/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{2}{\color{blue}{\frac{1}{2} \cdot \mathsf{PI}\left(\right)}}}{f}\right) \]
    10. associate-/r*N/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\color{blue}{\frac{\frac{2}{\frac{1}{2}}}{\mathsf{PI}\left(\right)}}}{f}\right) \]
    11. metadata-evalN/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{\color{blue}{4}}{\mathsf{PI}\left(\right)}}{f}\right) \]
    12. lower-/.f64N/A

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\color{blue}{\frac{4}{\mathsf{PI}\left(\right)}}}{f}\right) \]
    13. lower-PI.f6494.8

      \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{4}{\color{blue}{\mathsf{PI}\left(\right)}}}{f}\right) \]
  5. Applied rewrites94.8%

    \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \color{blue}{\left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)} \]
  6. Step-by-step derivation
    1. lift-neg.f64N/A

      \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)\right)} \]
    2. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)}\right) \]
    3. lift-/.f64N/A

      \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}}} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)\right) \]
    4. lift-/.f64N/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{4}}} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)\right) \]
    5. clear-numN/A

      \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{4}{\mathsf{PI}\left(\right)}} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)\right) \]
    6. lift-/.f64N/A

      \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{4}{\mathsf{PI}\left(\right)}} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)\right) \]
  7. Applied rewrites94.8%

    \[\leadsto \color{blue}{\frac{-4}{\mathsf{PI}\left(\right)} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)} \]
  8. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto \color{blue}{\frac{-4}{\mathsf{PI}\left(\right)} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)} \]
    2. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{-4}{\mathsf{PI}\left(\right)}} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right) \]
    3. metadata-evalN/A

      \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(4\right)}}{\mathsf{PI}\left(\right)} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right) \]
    4. distribute-neg-fracN/A

      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{4}{\mathsf{PI}\left(\right)}\right)\right)} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right) \]
    5. lift-/.f64N/A

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{4}{\mathsf{PI}\left(\right)}}\right)\right) \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right) \]
    6. distribute-lft-neg-inN/A

      \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{4}{\mathsf{PI}\left(\right)} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)\right)} \]
    7. distribute-rgt-neg-inN/A

      \[\leadsto \color{blue}{\frac{4}{\mathsf{PI}\left(\right)} \cdot \left(\mathsf{neg}\left(\log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)\right)\right)} \]
  9. Applied rewrites95.0%

    \[\leadsto \color{blue}{\frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(\frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(-\log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)\right)\right)} \]
  10. Final simplification95.0%

    \[\leadsto \left(\frac{-2}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)\right) \cdot \frac{2}{\sqrt{\mathsf{PI}\left(\right)}} \]
  11. Add Preprocessing

Alternative 5: 96.1% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \frac{\log \left(0.25 \cdot \left(f \cdot \mathsf{PI}\left(\right)\right)\right)}{0.25 \cdot \mathsf{PI}\left(\right)} \end{array} \]
(FPCore (f) :precision binary64 (/ (log (* 0.25 (* f (PI)))) (* 0.25 (PI))))
\begin{array}{l}

\\
\frac{\log \left(0.25 \cdot \left(f \cdot \mathsf{PI}\left(\right)\right)\right)}{0.25 \cdot \mathsf{PI}\left(\right)}
\end{array}
Derivation
  1. Initial program 6.9%

    \[-\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-neg.f64N/A

      \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right)\right)} \]
    2. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right)}\right) \]
    3. *-commutativeN/A

      \[\leadsto \mathsf{neg}\left(\color{blue}{\log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right) \cdot \frac{1}{\frac{\mathsf{PI}\left(\right)}{4}}}\right) \]
    4. lift-/.f64N/A

      \[\leadsto \mathsf{neg}\left(\log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right) \cdot \color{blue}{\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}}}\right) \]
    5. un-div-invN/A

      \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{\log \left(\frac{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} + e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}{e^{\frac{\mathsf{PI}\left(\right)}{4} \cdot f} - e^{-\frac{\mathsf{PI}\left(\right)}{4} \cdot f}}\right)}{\frac{\mathsf{PI}\left(\right)}{4}}}\right) \]
  4. Applied rewrites98.6%

    \[\leadsto \color{blue}{\frac{\log \tanh \left(f \cdot \left(0.25 \cdot \mathsf{PI}\left(\right)\right)\right)}{0.25 \cdot \mathsf{PI}\left(\right)}} \]
  5. Taylor expanded in f around 0

    \[\leadsto \frac{\log \color{blue}{\left(\frac{1}{4} \cdot \left(f \cdot \mathsf{PI}\left(\right)\right)\right)}}{\frac{1}{4} \cdot \mathsf{PI}\left(\right)} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \frac{\log \color{blue}{\left(\left(f \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{4}\right)}}{\frac{1}{4} \cdot \mathsf{PI}\left(\right)} \]
    2. lower-*.f64N/A

      \[\leadsto \frac{\log \color{blue}{\left(\left(f \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{4}\right)}}{\frac{1}{4} \cdot \mathsf{PI}\left(\right)} \]
    3. *-commutativeN/A

      \[\leadsto \frac{\log \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot f\right)} \cdot \frac{1}{4}\right)}{\frac{1}{4} \cdot \mathsf{PI}\left(\right)} \]
    4. lower-*.f64N/A

      \[\leadsto \frac{\log \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot f\right)} \cdot \frac{1}{4}\right)}{\frac{1}{4} \cdot \mathsf{PI}\left(\right)} \]
    5. lower-PI.f6495.0

      \[\leadsto \frac{\log \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot f\right) \cdot 0.25\right)}{0.25 \cdot \mathsf{PI}\left(\right)} \]
  7. Applied rewrites95.0%

    \[\leadsto \frac{\log \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot f\right) \cdot 0.25\right)}}{0.25 \cdot \mathsf{PI}\left(\right)} \]
  8. Final simplification95.0%

    \[\leadsto \frac{\log \left(0.25 \cdot \left(f \cdot \mathsf{PI}\left(\right)\right)\right)}{0.25 \cdot \mathsf{PI}\left(\right)} \]
  9. Add Preprocessing

Reproduce

?
herbie shell --seed 2024256 
(FPCore (f)
  :name "VandenBroeck and Keller, Equation (20)"
  :precision binary64
  (- (* (/ 1.0 (/ (PI) 4.0)) (log (/ (+ (exp (* (/ (PI) 4.0) f)) (exp (- (* (/ (PI) 4.0) f)))) (- (exp (* (/ (PI) 4.0) f)) (exp (- (* (/ (PI) 4.0) f)))))))))