\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)}\sqrt{0.5 + \frac{0.5}{\sqrt{1 + \frac{2 \cdot \ell}{Om} \cdot \left(\frac{2 \cdot \ell}{Om} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)\right)}}}(FPCore (l Om kx ky)
:precision binary64
(sqrt
(*
(/ 1.0 2.0)
(+
1.0
(/
1.0
(sqrt
(+
1.0
(*
(pow (/ (* 2.0 l) Om) 2.0)
(+ (pow (sin kx) 2.0) (pow (sin ky) 2.0))))))))))(FPCore (l Om kx ky)
:precision binary64
(sqrt
(+
0.5
(/
0.5
(sqrt
(+
1.0
(*
(/ (* 2.0 l) Om)
(* (/ (* 2.0 l) Om) (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0))))))))))double code(double l, double Om, double kx, double ky) {
return sqrt((1.0 / 2.0) * (1.0 + (1.0 / sqrt(1.0 + (pow(((2.0 * l) / Om), 2.0) * (pow(sin(kx), 2.0) + pow(sin(ky), 2.0)))))));
}
double code(double l, double Om, double kx, double ky) {
return sqrt(0.5 + (0.5 / sqrt(1.0 + (((2.0 * l) / Om) * (((2.0 * l) / Om) * (pow(sin(kx), 2.0) + pow(sin(ky), 2.0)))))));
}



Bits error versus l



Bits error versus Om



Bits error versus kx



Bits error versus ky
Results
Initial program 0.9
Simplified0.9
rmApplied unpow2_binary640.9
Applied associate-*l*_binary640.7
Final simplification0.7
herbie shell --seed 2020232
(FPCore (l Om kx ky)
:name "Toniolo and Linder, Equation (3a)"
:precision binary64
(sqrt (* (/ 1.0 2.0) (+ 1.0 (/ 1.0 (sqrt (+ 1.0 (* (pow (/ (* 2.0 l) Om) 2.0) (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0))))))))))