x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)\left(\left(x1 + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 + \left(\left(\frac{\left(\left(2 \cdot x1\right) \cdot \left(\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1\right)\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right)}{x1 \cdot x1 + 1} + \left(\left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot x1\right) \cdot x1\right) + \left(x1 \cdot x1\right) \cdot \left(-6\right)\right) \cdot \left(x1 \cdot x1 + 1\right)\right)\right) + \left(x1 \cdot x1\right) \cdot \left(x1 + \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 3\right)double f(double x1, double x2) {
double r41797 = x1;
double r41798 = 2.0;
double r41799 = r41798 * r41797;
double r41800 = 3.0;
double r41801 = r41800 * r41797;
double r41802 = r41801 * r41797;
double r41803 = x2;
double r41804 = r41798 * r41803;
double r41805 = r41802 + r41804;
double r41806 = r41805 - r41797;
double r41807 = r41797 * r41797;
double r41808 = 1.0;
double r41809 = r41807 + r41808;
double r41810 = r41806 / r41809;
double r41811 = r41799 * r41810;
double r41812 = r41810 - r41800;
double r41813 = r41811 * r41812;
double r41814 = 4.0;
double r41815 = r41814 * r41810;
double r41816 = 6.0;
double r41817 = r41815 - r41816;
double r41818 = r41807 * r41817;
double r41819 = r41813 + r41818;
double r41820 = r41819 * r41809;
double r41821 = r41802 * r41810;
double r41822 = r41820 + r41821;
double r41823 = r41807 * r41797;
double r41824 = r41822 + r41823;
double r41825 = r41824 + r41797;
double r41826 = r41802 - r41804;
double r41827 = r41826 - r41797;
double r41828 = r41827 / r41809;
double r41829 = r41800 * r41828;
double r41830 = r41825 + r41829;
double r41831 = r41797 + r41830;
return r41831;
}
double f(double x1, double x2) {
double r41832 = x1;
double r41833 = 3.0;
double r41834 = r41833 * r41832;
double r41835 = r41834 * r41832;
double r41836 = 2.0;
double r41837 = x2;
double r41838 = r41836 * r41837;
double r41839 = r41835 - r41838;
double r41840 = r41839 - r41832;
double r41841 = r41832 * r41832;
double r41842 = 1.0;
double r41843 = r41841 + r41842;
double r41844 = r41840 / r41843;
double r41845 = r41833 * r41844;
double r41846 = r41832 + r41845;
double r41847 = r41836 * r41832;
double r41848 = r41835 + r41838;
double r41849 = r41848 - r41832;
double r41850 = r41847 * r41849;
double r41851 = r41849 / r41843;
double r41852 = r41851 - r41833;
double r41853 = r41850 * r41852;
double r41854 = r41853 / r41843;
double r41855 = 4.0;
double r41856 = r41855 * r41851;
double r41857 = r41856 * r41832;
double r41858 = r41857 * r41832;
double r41859 = r41854 + r41858;
double r41860 = 6.0;
double r41861 = -r41860;
double r41862 = r41841 * r41861;
double r41863 = r41859 + r41862;
double r41864 = r41863 * r41843;
double r41865 = r41832 + r41864;
double r41866 = r41846 + r41865;
double r41867 = r41851 * r41833;
double r41868 = r41832 + r41867;
double r41869 = r41841 * r41868;
double r41870 = r41866 + r41869;
return r41870;
}



Bits error versus x1



Bits error versus x2
Results
Initial program 0.5
Simplified0.5
rmApplied sub-neg0.5
Applied distribute-lft-in0.5
Applied associate-+r+0.5
Simplified0.5
rmApplied associate-*r*0.5
rmApplied associate-*r/0.5
Applied associate-*l/0.5
Final simplification0.5
herbie shell --seed 2020003
(FPCore (x1 x2)
:name "Rosa's FloatVsDoubleBenchmark"
:precision binary64
(+ x1 (+ (+ (+ (+ (* (+ (* (* (* 2 x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) (- (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) 3)) (* (* x1 x1) (- (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) 6))) (+ (* x1 x1) 1)) (* (* (* 3 x1) x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)))) (* (* x1 x1) x1)) x1) (* 3 (/ (- (- (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))))))