Average Error: 59.6 → 0.8
Time: 2.1m
Precision: 64
Internal Precision: 128
\[-\frac{1}{\frac{\pi}{4}} \cdot \log \left(\frac{e^{\frac{\pi}{4} \cdot f} + e^{-\frac{\pi}{4} \cdot f}}{e^{\frac{\pi}{4} \cdot f} - e^{-\frac{\pi}{4} \cdot f}}\right)\]
\[\log \left(\frac{1}{\sqrt[3]{\left(\frac{1}{61440} \cdot \left({\pi}^{5} \cdot {f}^{5}\right) + \left({\pi}^{3} \cdot {f}^{3}\right) \cdot \frac{1}{192}\right) + \frac{1}{2} \cdot \left(f \cdot \pi\right)} \cdot \sqrt[3]{\left(\frac{1}{61440} \cdot \left({\pi}^{5} \cdot {f}^{5}\right) + \left({\pi}^{3} \cdot {f}^{3}\right) \cdot \frac{1}{192}\right) + \frac{1}{2} \cdot \left(f \cdot \pi\right)}}\right) \cdot \frac{-1}{\frac{\pi}{4}} + \frac{-\log \left(\frac{e^{\frac{\pi}{4} \cdot \left(-f\right)} + e^{\frac{f \cdot \pi}{4}}}{\sqrt[3]{(\pi \cdot \left((\left(\pi \cdot \pi\right) \cdot \left(\left(\frac{1}{192} \cdot f\right) \cdot \left(f \cdot f\right)\right) + \left(f \cdot \frac{1}{2}\right))_*\right) + \left({\pi}^{5} \cdot \left(\frac{1}{61440} \cdot {f}^{5}\right)\right))_*}}\right)}{\frac{\pi}{4}}\]

Error

Bits error versus f

Derivation

  1. Initial program 59.6

    \[-\frac{1}{\frac{\pi}{4}} \cdot \log \left(\frac{e^{\frac{\pi}{4} \cdot f} + e^{-\frac{\pi}{4} \cdot f}}{e^{\frac{\pi}{4} \cdot f} - e^{-\frac{\pi}{4} \cdot f}}\right)\]
  2. Taylor expanded around 0 0.8

    \[\leadsto -\frac{1}{\frac{\pi}{4}} \cdot \log \left(\frac{e^{\frac{\pi}{4} \cdot f} + e^{-\frac{\pi}{4} \cdot f}}{\color{blue}{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)}}\right)\]
  3. Using strategy rm
  4. Applied add-cube-cbrt0.8

    \[\leadsto -\frac{1}{\frac{\pi}{4}} \cdot \log \left(\frac{e^{\frac{\pi}{4} \cdot f} + e^{-\frac{\pi}{4} \cdot f}}{\color{blue}{\left(\sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)} \cdot \sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)}\right) \cdot \sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)}}}\right)\]
  5. Applied *-un-lft-identity0.8

    \[\leadsto -\frac{1}{\frac{\pi}{4}} \cdot \log \left(\frac{\color{blue}{1 \cdot \left(e^{\frac{\pi}{4} \cdot f} + e^{-\frac{\pi}{4} \cdot f}\right)}}{\left(\sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)} \cdot \sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)}\right) \cdot \sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)}}\right)\]
  6. Applied times-frac0.8

    \[\leadsto -\frac{1}{\frac{\pi}{4}} \cdot \log \color{blue}{\left(\frac{1}{\sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)} \cdot \sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)}} \cdot \frac{e^{\frac{\pi}{4} \cdot f} + e^{-\frac{\pi}{4} \cdot f}}{\sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)}}\right)}\]
  7. Applied log-prod0.9

    \[\leadsto -\frac{1}{\frac{\pi}{4}} \cdot \color{blue}{\left(\log \left(\frac{1}{\sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)} \cdot \sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)}}\right) + \log \left(\frac{e^{\frac{\pi}{4} \cdot f} + e^{-\frac{\pi}{4} \cdot f}}{\sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)}}\right)\right)}\]
  8. Applied distribute-rgt-in0.8

    \[\leadsto -\color{blue}{\left(\log \left(\frac{1}{\sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)} \cdot \sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)}}\right) \cdot \frac{1}{\frac{\pi}{4}} + \log \left(\frac{e^{\frac{\pi}{4} \cdot f} + e^{-\frac{\pi}{4} \cdot f}}{\sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)}}\right) \cdot \frac{1}{\frac{\pi}{4}}\right)}\]
  9. Simplified0.8

    \[\leadsto -\left(\log \left(\frac{1}{\sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)} \cdot \sqrt[3]{\frac{1}{2} \cdot \left(f \cdot \pi\right) + \left(\frac{1}{192} \cdot \left({f}^{3} \cdot {\pi}^{3}\right) + \frac{1}{61440} \cdot \left({f}^{5} \cdot {\pi}^{5}\right)\right)}}\right) \cdot \frac{1}{\frac{\pi}{4}} + \color{blue}{\frac{\log \left(\frac{e^{\frac{f \cdot \pi}{4}} + e^{\frac{\pi}{4} \cdot \left(-f\right)}}{\sqrt[3]{(\pi \cdot \left((\left(\pi \cdot \pi\right) \cdot \left(\left(\frac{1}{192} \cdot f\right) \cdot \left(f \cdot f\right)\right) + \left(f \cdot \frac{1}{2}\right))_*\right) + \left(\left({f}^{5} \cdot \frac{1}{61440}\right) \cdot {\pi}^{5}\right))_*}}\right)}{\frac{\pi}{4}}}\right)\]
  10. Final simplification0.8

    \[\leadsto \log \left(\frac{1}{\sqrt[3]{\left(\frac{1}{61440} \cdot \left({\pi}^{5} \cdot {f}^{5}\right) + \left({\pi}^{3} \cdot {f}^{3}\right) \cdot \frac{1}{192}\right) + \frac{1}{2} \cdot \left(f \cdot \pi\right)} \cdot \sqrt[3]{\left(\frac{1}{61440} \cdot \left({\pi}^{5} \cdot {f}^{5}\right) + \left({\pi}^{3} \cdot {f}^{3}\right) \cdot \frac{1}{192}\right) + \frac{1}{2} \cdot \left(f \cdot \pi\right)}}\right) \cdot \frac{-1}{\frac{\pi}{4}} + \frac{-\log \left(\frac{e^{\frac{\pi}{4} \cdot \left(-f\right)} + e^{\frac{f \cdot \pi}{4}}}{\sqrt[3]{(\pi \cdot \left((\left(\pi \cdot \pi\right) \cdot \left(\left(\frac{1}{192} \cdot f\right) \cdot \left(f \cdot f\right)\right) + \left(f \cdot \frac{1}{2}\right))_*\right) + \left({\pi}^{5} \cdot \left(\frac{1}{61440} \cdot {f}^{5}\right)\right))_*}}\right)}{\frac{\pi}{4}}\]

Reproduce

herbie shell --seed 2018365 +o rules:numerics
(FPCore (f)
  :name "VandenBroeck and Keller, Equation (20)"
  (- (* (/ 1 (/ PI 4)) (log (/ (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f)))) (- (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f)))))))))

Details

Time bar (total: 55.7s)Debug log

start2.6s

Algorithm
intervals

setup270.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 59.0b

localize50.0ms

Local error

Found 4 expressions with local error:

6.1b
(- (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f))))
0.3b
(* (/ PI 4) f)
0.3b
(* (/ PI 4) f)
0.3b
(* (/ PI 4) f)

rewrite37.0ms

Algorithm
rewrite-expression-head
Counts
4 → 73
Calls

4 calls. Slowest were:

22.0ms
(- (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f))))
4.0ms
(* (/ PI 4) f)
4.0ms
(* (/ PI 4) f)

series328.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

129.0ms
(- (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f))))
76.0ms
(* (/ PI 4) f)
62.0ms
(* (/ PI 4) f)
61.0ms
(* (/ PI 4) f)

simplify1.5s

Counts
45 → 85
Calls

45 calls. Slowest were:

330.0ms
(+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5)))))
71.0ms
(fma (sqrt (exp (* (/ PI 4) f))) (sqrt (exp (* (/ PI 4) f))) (- (* (exp (- (* (/ PI 4) f))) 1)))
64.0ms
(fma 1 (exp (* (/ PI 4) f)) (- (* (exp (- (* (/ PI 4) f))) 1)))

prune1.3s

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0.5b

localize64.0ms

Local error

Found 4 expressions with local error:

1.0b
(pow PI 3)
1.0b
(pow PI 5)
0.4b
(* (/ 1 (/ PI 4)) (log (/ (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f)))) (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5))))))))
0.3b
(/ (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f)))) (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5))))))

rewrite64.0ms

Algorithm
rewrite-expression-head
Counts
4 → 119
Calls

4 calls. Slowest were:

32.0ms
(* (/ 1 (/ PI 4)) (log (/ (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f)))) (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5))))))))
29.0ms
(/ (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f)))) (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5))))))
1.0ms
(pow PI 3)

series709.0ms

Counts
4 → 8
Calls

4 calls. Slowest were:

436.0ms
(* (/ 1 (/ PI 4)) (log (/ (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f)))) (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5))))))))
273.0ms
(/ (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f)))) (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5))))))
0.0ms
(pow PI 3)
0.0ms
(pow PI 5)

simplify24.4s

Counts
91 → 127
Calls

91 calls. Slowest were:

817.0ms
(/ (cbrt (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f))))) (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5))))))
429.0ms
(/ (* (cbrt (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f))))) (cbrt (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f)))))) (* (cbrt (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5)))))) (cbrt (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5))))))))
398.0ms
(- (log (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f))))) (log (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5)))))))

prune4.6s

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 0.1b

localize24.0ms

Local error

Found 4 expressions with local error:

1.0b
(pow PI 3)
1.0b
(pow PI 5)
0.4b
(/ (* 1 (log (/ (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f)))) (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5)))))))) (/ PI 4))
0.3b
(/ (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f)))) (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5))))))

rewrite113.0ms

Algorithm
rewrite-expression-head
Counts
4 → 83
Calls

4 calls. Slowest were:

74.0ms
(/ (* 1 (log (/ (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f)))) (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5)))))))) (/ PI 4))
38.0ms
(/ (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f)))) (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5))))))
0.0ms
(pow PI 3)

series658.0ms

Counts
4 → 8
Calls

4 calls. Slowest were:

388.0ms
(/ (* 1 (log (/ (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f)))) (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5)))))))) (/ PI 4))
269.0ms
(/ (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f)))) (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5))))))
0.0ms
(pow PI 3)
0.0ms
(pow PI 5)

simplify12.8s

Counts
57 → 91
Calls

57 calls. Slowest were:

440.0ms
(/ (cbrt (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f))))) (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5))))))
421.0ms
(/ (sqrt (+ (exp (* (/ PI 4) f)) (exp (- (* (/ PI 4) f))))) (sqrt (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5)))))))
414.0ms
(/ 1 (sqrt (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5)))))))

prune2.9s

Pruning

9 alts after pruning (9 fresh and 0 done)

Merged error: 0.1b

localize107.0ms

Local error

Found 4 expressions with local error:

1.0b
(pow PI 3)
1.0b
(pow PI 3)
1.0b
(pow PI 5)
1.0b
(pow PI 5)

rewrite2.0ms

Algorithm
rewrite-expression-head
Counts
4 → 44
Calls

4 calls. Slowest were:

0.0ms
(pow PI 3)
0.0ms
(pow PI 5)
0.0ms
(pow PI 3)

series0.0ms

Counts
4 → 4
Calls

4 calls. Slowest were:

0.0ms
(pow PI 3)
0.0ms
(pow PI 3)
0.0ms
(pow PI 5)
0.0ms
(pow PI 5)

simplify585.0ms

Counts
4 → 48
Calls

4 calls. Slowest were:

171.0ms
(- (+ (* (log (/ 1 (* (cbrt (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5)))))) (cbrt (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5))))))))) (/ 1 (/ PI 4))) (/ (log (/ (+ (exp (/ (* f PI) 4)) (exp (* (/ PI 4) (- f)))) (cbrt (fma PI (fma (* PI PI) (* (* 1/192 f) (* f f)) (* f 1/2)) (* (* (pow f 5) 1/61440) (pow PI 5)))))) (/ PI 4))))
143.0ms
(- (+ (* (log (/ 1 (* (cbrt (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5)))))) (cbrt (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5))))))))) (/ 1 (/ PI 4))) (/ (log (/ (+ (exp (/ (* f PI) 4)) (exp (* (/ PI 4) (- f)))) (cbrt (fma PI (fma (* PI PI) (* (* 1/192 f) (* f f)) (* f 1/2)) (* (* (pow f 5) 1/61440) (pow PI 5)))))) (/ PI 4))))
140.0ms
(- (+ (* (log (/ 1 (* (cbrt (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5)))))) (cbrt (+ (* 1/2 (* f PI)) (+ (* 1/192 (* (pow f 3) (pow PI 3))) (* 1/61440 (* (pow f 5) (pow PI 5))))))))) (/ 1 (/ PI 4))) (/ (log (/ (+ (exp (/ (* f PI) 4)) (exp (* (/ PI 4) (- f)))) (cbrt (fma PI (fma (* PI PI) (* (* 1/192 f) (* f f)) (* f 1/2)) (* (* (pow f 5) 1/61440) (pow PI 5)))))) (/ PI 4))))

prune2.4s

Pruning

9 alts after pruning (8 fresh and 1 done)

Merged error: 0.1b

regimes316.0ms

Accuracy

0% (0.7b remaining)

Error of 0.8b against oracle of 0.1b and baseline of 0.8b

bsearch28.0ms