\frac{a2 + a2 \cdot a2}{\left({\left(\left(nh \cdot a2 - nh\right) \cdot nh + 1\right)}^{2} \cdot \left(\left(lh \cdot lh\right) \cdot 3 + lh\right)\right) \cdot \left(nh \cdot 0.75 + 0.25\right)}\frac{a2 + a2 \cdot a2}{\left({\left(\left(nh \cdot a2 - nh\right) \cdot nh + 1\right)}^{2} \cdot \left(\left(lh \cdot lh\right) \cdot 3 + lh\right)\right) \cdot \left(nh \cdot 0.75 + 0.25\right)}double code(double a2, double nh, double lh) {
return ((double) (((double) (a2 + ((double) (a2 * a2)))) / ((double) (((double) (((double) pow(((double) (((double) (((double) (((double) (nh * a2)) - nh)) * nh)) + 1.0)), 2.0)) * ((double) (((double) (((double) (lh * lh)) * 3.0)) + lh)))) * ((double) (((double) (nh * 0.75)) + 0.25))))));
}
double code(double a2, double nh, double lh) {
return ((double) (((double) (a2 + ((double) (a2 * a2)))) / ((double) (((double) (((double) pow(((double) (((double) (((double) (((double) (nh * a2)) - nh)) * nh)) + 1.0)), 2.0)) * ((double) (((double) (((double) (lh * lh)) * 3.0)) + lh)))) * ((double) (((double) (nh * 0.75)) + 0.25))))));
}



Bits error versus a2



Bits error versus nh



Bits error versus lh
Results
Initial program 15.4
Final simplification15.4
herbie shell --seed 2020153
(FPCore (a2 nh lh)
:name "(/ (+ a2 (* a2 a2)) (* (* (pow (+ (* (- (* nh a2) nh) nh) 1) 2) (+ (* (* lh lh) 3) lh)) (+ (* nh 0.75) 0.25)))"
:precision binary64
(/ (+ a2 (* a2 a2)) (* (* (pow (+ (* (- (* nh a2) nh) nh) 1.0) 2.0) (+ (* (* lh lh) 3.0) lh)) (+ (* nh 0.75) 0.25))))