-\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)\left(\left(0.6666666666666666 \cdot \frac{{\pi}^{4} \cdot \left(\left(f \cdot f\right) \cdot -0.015625\right)}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{2}} + \left(4 \cdot \frac{{\pi}^{5} \cdot \left(\left(f \cdot f\right) \cdot 0.00390625\right)}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{3}} + \left(0.5 \cdot \frac{\left(\left(f \cdot f\right) \cdot 0.00390625\right) \cdot {\pi}^{6}}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{4}} + \left(2 \cdot \frac{\left(\left(f \cdot f\right) \cdot -0.015625\right) \cdot {\pi}^{5}}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{3}} + \left(\frac{f \cdot \left(-0.25 \cdot {\pi}^{3}\right)}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{2}} \cdot 0.25 + \left(0.125 \cdot \frac{f \cdot {\pi}^{2}}{\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)} + \left(0.75 \cdot \frac{{\pi}^{4} \cdot \left(\left(f \cdot f\right) \cdot 0.0625\right)}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{2}} + \left(0.041666666666666664 \cdot \frac{{\pi}^{4} \cdot \left(\left(f \cdot f\right) \cdot -0.25\right)}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{2}} + \left(0.015625 \cdot \frac{{\pi}^{6} \cdot \left(\left(f \cdot f\right) \cdot -0.25\right)}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{4}} + \left(0.0234375 \cdot \frac{\left(f \cdot f\right) \cdot {\pi}^{3}}{\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)} + \left(\frac{f \cdot \left({\pi}^{3} \cdot 0.0625\right)}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{2}} + \left(\left(\log \left(\sqrt[3]{\frac{4}{\pi}}\right) + 2 \cdot \log \left(\sqrt[3]{\frac{4}{\pi}}\right)\right) + \left(0.03125 \cdot \frac{{\pi}^{6} \cdot \left(\left(f \cdot f\right) \cdot 0.0625\right)}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{4}} + \left(0.125 \cdot \frac{{\pi}^{3} \cdot \left(\left(f \cdot f\right) \cdot 0.0625\right)}{\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)} + \left(0.015625 \cdot \frac{\left(f \cdot f\right) \cdot {\pi}^{5}}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{3}} + 4 \cdot \frac{{\pi}^{6} \cdot \left(\left(f \cdot f\right) \cdot -0.0009765625\right)}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{4}}\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right) - \left(0.0625 \cdot \frac{f \cdot {\pi}^{3}}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{2}} + \left(0.5 \cdot \frac{{\pi}^{5} \cdot \left(\left(f \cdot f\right) \cdot 0.0625\right)}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{3}} + \left(0.0625 \cdot \frac{{\pi}^{5} \cdot \left(\left(f \cdot f\right) \cdot -0.25\right)}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{3}} + \left(0.001953125 \cdot \frac{\left(f \cdot f\right) \cdot {\pi}^{6}}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{4}} + \left(2 \cdot \frac{f \cdot \left({\pi}^{2} \cdot 0.0625\right)}{\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)} + \left(0.033854166666666664 \cdot \frac{{\pi}^{4} \cdot \left(f \cdot f\right)}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{2}} + \left(4 \cdot \frac{f \cdot \left(-0.015625 \cdot {\pi}^{3}\right)}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{2}} + \left(8.666666666666666 \cdot \frac{{\pi}^{4} \cdot \left(\left(f \cdot f\right) \cdot 0.00390625\right)}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{2}} + \left(\log f + \left(8 \cdot \frac{{\pi}^{6} \cdot \left(\left(f \cdot f\right) \cdot 0.000244140625\right)}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{4}} + \left(0.5 \cdot \frac{\left(\left(f \cdot f\right) \cdot -0.015625\right) \cdot {\pi}^{6}}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{4}} + \left(16 \cdot \frac{{\pi}^{5} \cdot \left(\left(f \cdot f\right) \cdot -0.0009765625\right)}{{\left(\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)\right)}^{3}} + \left(1.5 \cdot \frac{\left(\left(f \cdot f\right) \cdot -0.015625\right) \cdot {\pi}^{3}}{\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)} + 0.03125 \cdot \frac{{\pi}^{3} \cdot \left(\left(f \cdot f\right) \cdot -0.25\right)}{\pi \cdot 0.5 - 2 \cdot \left(\pi \cdot -0.25\right)}\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right) \cdot \frac{-4}{\pi}(FPCore (f)
: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)))))))))(FPCore (f)
:precision binary64
(*
(-
(+
(*
0.6666666666666666
(/
(* (pow PI 4.0) (* (* f f) -0.015625))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 2.0)))
(+
(*
4.0
(/
(* (pow PI 5.0) (* (* f f) 0.00390625))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 3.0)))
(+
(*
0.5
(/
(* (* (* f f) 0.00390625) (pow PI 6.0))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 4.0)))
(+
(*
2.0
(/
(* (* (* f f) -0.015625) (pow PI 5.0))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 3.0)))
(+
(*
(/
(* f (* -0.25 (pow PI 3.0)))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 2.0))
0.25)
(+
(* 0.125 (/ (* f (pow PI 2.0)) (- (* PI 0.5) (* 2.0 (* PI -0.25)))))
(+
(*
0.75
(/
(* (pow PI 4.0) (* (* f f) 0.0625))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 2.0)))
(+
(*
0.041666666666666664
(/
(* (pow PI 4.0) (* (* f f) -0.25))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 2.0)))
(+
(*
0.015625
(/
(* (pow PI 6.0) (* (* f f) -0.25))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 4.0)))
(+
(*
0.0234375
(/ (* (* f f) (pow PI 3.0)) (- (* PI 0.5) (* 2.0 (* PI -0.25)))))
(+
(/
(* f (* (pow PI 3.0) 0.0625))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 2.0))
(+
(+ (log (cbrt (/ 4.0 PI))) (* 2.0 (log (cbrt (/ 4.0 PI)))))
(+
(*
0.03125
(/
(* (pow PI 6.0) (* (* f f) 0.0625))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 4.0)))
(+
(*
0.125
(/
(* (pow PI 3.0) (* (* f f) 0.0625))
(- (* PI 0.5) (* 2.0 (* PI -0.25)))))
(+
(*
0.015625
(/
(* (* f f) (pow PI 5.0))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 3.0)))
(*
4.0
(/
(* (pow PI 6.0) (* (* f f) -0.0009765625))
(pow
(- (* PI 0.5) (* 2.0 (* PI -0.25)))
4.0))))))))))))))))))
(+
(*
0.0625
(/ (* f (pow PI 3.0)) (pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 2.0)))
(+
(*
0.5
(/
(* (pow PI 5.0) (* (* f f) 0.0625))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 3.0)))
(+
(*
0.0625
(/
(* (pow PI 5.0) (* (* f f) -0.25))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 3.0)))
(+
(*
0.001953125
(/
(* (* f f) (pow PI 6.0))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 4.0)))
(+
(*
2.0
(/ (* f (* (pow PI 2.0) 0.0625)) (- (* PI 0.5) (* 2.0 (* PI -0.25)))))
(+
(*
0.033854166666666664
(/
(* (pow PI 4.0) (* f f))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 2.0)))
(+
(*
4.0
(/
(* f (* -0.015625 (pow PI 3.0)))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 2.0)))
(+
(*
8.666666666666666
(/
(* (pow PI 4.0) (* (* f f) 0.00390625))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 2.0)))
(+
(log f)
(+
(*
8.0
(/
(* (pow PI 6.0) (* (* f f) 0.000244140625))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 4.0)))
(+
(*
0.5
(/
(* (* (* f f) -0.015625) (pow PI 6.0))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 4.0)))
(+
(*
16.0
(/
(* (pow PI 5.0) (* (* f f) -0.0009765625))
(pow (- (* PI 0.5) (* 2.0 (* PI -0.25))) 3.0)))
(+
(*
1.5
(/
(* (* (* f f) -0.015625) (pow PI 3.0))
(- (* PI 0.5) (* 2.0 (* PI -0.25)))))
(*
0.03125
(/
(* (pow PI 3.0) (* (* f f) -0.25))
(- (* PI 0.5) (* 2.0 (* PI -0.25)))))))))))))))))))
(/ -4.0 PI)))double code(double f) {
return -((1.0 / (((double) M_PI) / 4.0)) * log((exp((((double) M_PI) / 4.0) * f) + exp(-((((double) M_PI) / 4.0) * f))) / (exp((((double) M_PI) / 4.0) * f) - exp(-((((double) M_PI) / 4.0) * f)))));
}
double code(double f) {
return (((0.6666666666666666 * ((pow(((double) M_PI), 4.0) * ((f * f) * -0.015625)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 2.0))) + ((4.0 * ((pow(((double) M_PI), 5.0) * ((f * f) * 0.00390625)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 3.0))) + ((0.5 * ((((f * f) * 0.00390625) * pow(((double) M_PI), 6.0)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 4.0))) + ((2.0 * ((((f * f) * -0.015625) * pow(((double) M_PI), 5.0)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 3.0))) + ((((f * (-0.25 * pow(((double) M_PI), 3.0))) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 2.0)) * 0.25) + ((0.125 * ((f * pow(((double) M_PI), 2.0)) / ((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))))) + ((0.75 * ((pow(((double) M_PI), 4.0) * ((f * f) * 0.0625)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 2.0))) + ((0.041666666666666664 * ((pow(((double) M_PI), 4.0) * ((f * f) * -0.25)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 2.0))) + ((0.015625 * ((pow(((double) M_PI), 6.0) * ((f * f) * -0.25)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 4.0))) + ((0.0234375 * (((f * f) * pow(((double) M_PI), 3.0)) / ((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))))) + (((f * (pow(((double) M_PI), 3.0) * 0.0625)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 2.0)) + ((log(cbrt(4.0 / ((double) M_PI))) + (2.0 * log(cbrt(4.0 / ((double) M_PI))))) + ((0.03125 * ((pow(((double) M_PI), 6.0) * ((f * f) * 0.0625)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 4.0))) + ((0.125 * ((pow(((double) M_PI), 3.0) * ((f * f) * 0.0625)) / ((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))))) + ((0.015625 * (((f * f) * pow(((double) M_PI), 5.0)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 3.0))) + (4.0 * ((pow(((double) M_PI), 6.0) * ((f * f) * -0.0009765625)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 4.0)))))))))))))))))) - ((0.0625 * ((f * pow(((double) M_PI), 3.0)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 2.0))) + ((0.5 * ((pow(((double) M_PI), 5.0) * ((f * f) * 0.0625)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 3.0))) + ((0.0625 * ((pow(((double) M_PI), 5.0) * ((f * f) * -0.25)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 3.0))) + ((0.001953125 * (((f * f) * pow(((double) M_PI), 6.0)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 4.0))) + ((2.0 * ((f * (pow(((double) M_PI), 2.0) * 0.0625)) / ((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))))) + ((0.033854166666666664 * ((pow(((double) M_PI), 4.0) * (f * f)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 2.0))) + ((4.0 * ((f * (-0.015625 * pow(((double) M_PI), 3.0))) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 2.0))) + ((8.666666666666666 * ((pow(((double) M_PI), 4.0) * ((f * f) * 0.00390625)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 2.0))) + (log(f) + ((8.0 * ((pow(((double) M_PI), 6.0) * ((f * f) * 0.000244140625)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 4.0))) + ((0.5 * ((((f * f) * -0.015625) * pow(((double) M_PI), 6.0)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 4.0))) + ((16.0 * ((pow(((double) M_PI), 5.0) * ((f * f) * -0.0009765625)) / pow(((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))), 3.0))) + ((1.5 * ((((f * f) * -0.015625) * pow(((double) M_PI), 3.0)) / ((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))))) + (0.03125 * ((pow(((double) M_PI), 3.0) * ((f * f) * -0.25)) / ((((double) M_PI) * 0.5) - (2.0 * (((double) M_PI) * -0.25))))))))))))))))))) * (-4.0 / ((double) M_PI));
}



Bits error versus f
Results
Initial program 61.4
Simplified61.4
rmApplied flip--_binary6461.4
Simplified61.4
Taylor expanded around 0 2.2
Simplified2.2
rmApplied add-cube-cbrt_binary642.2
Applied log-prod_binary642.2
Simplified2.2
Simplified2.2
Final simplification2.2
herbie shell --seed 2020343
(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)))))))))