VandenBroeck and Keller, Equation (20)

Percentage Accurate: 6.5% → 96.9%
Time: 15.1s
Alternatives: 6
Speedup: 4.6×

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 6 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.5% 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: 96.9% accurate, 1.8× speedup?

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

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

    \[-\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. 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 \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{4}}}\right) \]
    6. associate-/r/N/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}{\left(\frac{1}{\mathsf{PI}\left(\right)} \cdot 4\right)}\right) \]
  4. Applied rewrites96.4%

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

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

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

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

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

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

      \[\leadsto \frac{\log \left(\frac{\cosh \left(\frac{\mathsf{PI}\left(\right)}{-4} \cdot f\right)}{\sinh \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot f\right) \cdot 0.25\right)}\right)}{\mathsf{PI}\left(\right)} \cdot -4 \]
  7. Applied rewrites96.4%

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

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

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

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

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

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

      \[\leadsto \frac{\log \left(\frac{\cosh \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot f\right) \cdot -0.25\right)}{\sinh \left(\left(\mathsf{PI}\left(\right) \cdot f\right) \cdot 0.25\right)}\right)}{\mathsf{PI}\left(\right)} \cdot -4 \]
  10. Applied rewrites96.4%

    \[\leadsto \frac{\log \left(\frac{\cosh \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot f\right) \cdot -0.25\right)}}{\sinh \left(\left(\mathsf{PI}\left(\right) \cdot f\right) \cdot 0.25\right)}\right)}{\mathsf{PI}\left(\right)} \cdot -4 \]
  11. Add Preprocessing

Alternative 2: 96.3% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \frac{-1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{\frac{{\mathsf{PI}\left(\right)}^{3}}{\mathsf{PI}\left(\right)}}{\mathsf{PI}\left(\right)} \cdot 0.020833333333333332, -2, \frac{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}{\mathsf{PI}\left(\right)} \cdot 0.125\right), f, 0\right), f, \frac{2}{0.5 \cdot \mathsf{PI}\left(\right)}\right)}{f}\right) \end{array} \]
(FPCore (f)
 :precision binary64
 (*
  (/ -1.0 (/ (PI) 4.0))
  (log
   (/
    (fma
     (fma
      (fma
       (* (/ (/ (pow (PI) 3.0) (PI)) (PI)) 0.020833333333333332)
       -2.0
       (* (/ (* (PI) (PI)) (PI)) 0.125))
      f
      0.0)
     f
     (/ 2.0 (* 0.5 (PI))))
    f))))
\begin{array}{l}

\\
\frac{-1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{\frac{{\mathsf{PI}\left(\right)}^{3}}{\mathsf{PI}\left(\right)}}{\mathsf{PI}\left(\right)} \cdot 0.020833333333333332, -2, \frac{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}{\mathsf{PI}\left(\right)} \cdot 0.125\right), f, 0\right), f, \frac{2}{0.5 \cdot \mathsf{PI}\left(\right)}\right)}{f}\right)
\end{array}
Derivation
  1. Initial program 5.4%

    \[-\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{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)} \]
  4. Applied rewrites96.0%

    \[\leadsto -\frac{1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \color{blue}{\left(\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{\frac{{\mathsf{PI}\left(\right)}^{3}}{\mathsf{PI}\left(\right)}}{\mathsf{PI}\left(\right)} \cdot 0.020833333333333332, -2, \frac{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}{\mathsf{PI}\left(\right)} \cdot 0.125\right), f, 0\right), f, \frac{2}{0.5 \cdot \mathsf{PI}\left(\right)}\right)}{f}\right)} \]
  5. Final simplification96.0%

    \[\leadsto \frac{-1}{\frac{\mathsf{PI}\left(\right)}{4}} \cdot \log \left(\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{\frac{{\mathsf{PI}\left(\right)}^{3}}{\mathsf{PI}\left(\right)}}{\mathsf{PI}\left(\right)} \cdot 0.020833333333333332, -2, \frac{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}{\mathsf{PI}\left(\right)} \cdot 0.125\right), f, 0\right), f, \frac{2}{0.5 \cdot \mathsf{PI}\left(\right)}\right)}{f}\right) \]
  6. Add Preprocessing

Alternative 3: 95.9% accurate, 3.8× speedup?

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

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

    \[-\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. 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 \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{4}}}\right) \]
    6. associate-/r/N/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}{\left(\frac{1}{\mathsf{PI}\left(\right)} \cdot 4\right)}\right) \]
  4. Applied rewrites96.4%

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

    \[\leadsto \frac{\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)}}{\mathsf{PI}\left(\right)} \cdot -4 \]
  6. Step-by-step derivation
    1. lower-/.f64N/A

      \[\leadsto \frac{\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)}}{\mathsf{PI}\left(\right)} \cdot -4 \]
    2. *-commutativeN/A

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

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

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

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

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

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

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

    \[\leadsto \frac{\log \color{blue}{\left(\frac{2}{\left(0.5 \cdot \mathsf{PI}\left(\right)\right) \cdot f}\right)}}{\mathsf{PI}\left(\right)} \cdot -4 \]
  8. Step-by-step derivation
    1. Applied rewrites95.8%

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

    Alternative 4: 95.9% accurate, 4.4× speedup?

    \[\begin{array}{l} \\ \frac{\log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)}{\mathsf{PI}\left(\right)} \cdot -4 \end{array} \]
    (FPCore (f) :precision binary64 (* (/ (log (/ (/ 4.0 (PI)) f)) (PI)) -4.0))
    \begin{array}{l}
    
    \\
    \frac{\log \left(\frac{\frac{4}{\mathsf{PI}\left(\right)}}{f}\right)}{\mathsf{PI}\left(\right)} \cdot -4
    \end{array}
    
    Derivation
    1. Initial program 5.4%

      \[-\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. 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 \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{4}}}\right) \]
      6. associate-/r/N/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}{\left(\frac{1}{\mathsf{PI}\left(\right)} \cdot 4\right)}\right) \]
    4. Applied rewrites96.4%

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

      \[\leadsto \frac{\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)}}{\mathsf{PI}\left(\right)} \cdot -4 \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\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)}}{\mathsf{PI}\left(\right)} \cdot -4 \]
      2. *-commutativeN/A

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

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

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

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

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

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

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

      \[\leadsto \frac{\log \color{blue}{\left(\frac{2}{\left(0.5 \cdot \mathsf{PI}\left(\right)\right) \cdot f}\right)}}{\mathsf{PI}\left(\right)} \cdot -4 \]
    8. Step-by-step derivation
      1. Applied rewrites95.8%

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

      Alternative 5: 95.9% accurate, 4.6× speedup?

      \[\begin{array}{l} \\ \frac{\log \left(\frac{4}{f \cdot \mathsf{PI}\left(\right)}\right) \cdot -4}{\mathsf{PI}\left(\right)} \end{array} \]
      (FPCore (f) :precision binary64 (/ (* (log (/ 4.0 (* f (PI)))) -4.0) (PI)))
      \begin{array}{l}
      
      \\
      \frac{\log \left(\frac{4}{f \cdot \mathsf{PI}\left(\right)}\right) \cdot -4}{\mathsf{PI}\left(\right)}
      \end{array}
      
      Derivation
      1. Initial program 5.4%

        \[-\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. 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 \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{4}}}\right) \]
        6. associate-/r/N/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}{\left(\frac{1}{\mathsf{PI}\left(\right)} \cdot 4\right)}\right) \]
      4. Applied rewrites96.4%

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

        \[\leadsto \frac{\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)}}{\mathsf{PI}\left(\right)} \cdot -4 \]
      6. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{\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)}}{\mathsf{PI}\left(\right)} \cdot -4 \]
        2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\log \left(\frac{4}{f \cdot \mathsf{PI}\left(\right)}\right) \cdot -4}{\mathsf{PI}\left(\right)}} \]
      10. Add Preprocessing

      Alternative 6: 95.8% accurate, 4.6× speedup?

      \[\begin{array}{l} \\ \log \left(\frac{4}{f \cdot \mathsf{PI}\left(\right)}\right) \cdot \frac{-4}{\mathsf{PI}\left(\right)} \end{array} \]
      (FPCore (f) :precision binary64 (* (log (/ 4.0 (* f (PI)))) (/ -4.0 (PI))))
      \begin{array}{l}
      
      \\
      \log \left(\frac{4}{f \cdot \mathsf{PI}\left(\right)}\right) \cdot \frac{-4}{\mathsf{PI}\left(\right)}
      \end{array}
      
      Derivation
      1. Initial program 5.4%

        \[-\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. 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 \frac{1}{\color{blue}{\frac{\mathsf{PI}\left(\right)}{4}}}\right) \]
        6. associate-/r/N/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}{\left(\frac{1}{\mathsf{PI}\left(\right)} \cdot 4\right)}\right) \]
      4. Applied rewrites96.4%

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

        \[\leadsto \frac{\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)}}{\mathsf{PI}\left(\right)} \cdot -4 \]
      6. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{\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)}}{\mathsf{PI}\left(\right)} \cdot -4 \]
        2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\log \left(\frac{4}{f \cdot \mathsf{PI}\left(\right)}\right) \cdot \frac{-4}{\mathsf{PI}\left(\right)}} \]
      10. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 2024350 
      (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)))))))))