Average Error: 0.2 → 0.1
Time: 8.1s
Precision: 64
$3.141592653000000012752934708259999752045 \cdot f - \left(y \cdot 6.283185307000000108246240415610373020172\right) \cdot f$
$3.141592653000000012752934708259999752045 \cdot f + \left(-6.283185307000000108246240415610373020172 \cdot \left(y \cdot f\right)\right)$
3.141592653000000012752934708259999752045 \cdot f - \left(y \cdot 6.283185307000000108246240415610373020172\right) \cdot f
3.141592653000000012752934708259999752045 \cdot f + \left(-6.283185307000000108246240415610373020172 \cdot \left(y \cdot f\right)\right)
double f(double f, double y) {
double r1289099 = 3.141592653;
double r1289100 = f;
double r1289101 = r1289099 * r1289100;
double r1289102 = y;
double r1289103 = 6.283185307;
double r1289104 = r1289102 * r1289103;
double r1289105 = r1289104 * r1289100;
double r1289106 = r1289101 - r1289105;
return r1289106;
}


double f(double f, double y) {
double r1289107 = 3.141592653;
double r1289108 = f;
double r1289109 = r1289107 * r1289108;
double r1289110 = 6.283185307;
double r1289111 = y;
double r1289112 = r1289111 * r1289108;
double r1289113 = r1289110 * r1289112;
double r1289114 = -r1289113;
double r1289115 = r1289109 + r1289114;
return r1289115;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.2

$3.141592653000000012752934708259999752045 \cdot f - \left(y \cdot 6.283185307000000108246240415610373020172\right) \cdot f$
2. Using strategy rm
3. Applied pow10.2

$\leadsto 3.141592653000000012752934708259999752045 \cdot f - \left(y \cdot 6.283185307000000108246240415610373020172\right) \cdot \color{blue}{{f}^{1}}$
4. Applied pow10.2

$\leadsto 3.141592653000000012752934708259999752045 \cdot f - \left(y \cdot \color{blue}{{6.283185307000000108246240415610373020172}^{1}}\right) \cdot {f}^{1}$
5. Applied pow10.2

$\leadsto 3.141592653000000012752934708259999752045 \cdot f - \left(\color{blue}{{y}^{1}} \cdot {6.283185307000000108246240415610373020172}^{1}\right) \cdot {f}^{1}$
6. Applied pow-prod-down0.2

$\leadsto 3.141592653000000012752934708259999752045 \cdot f - \color{blue}{{\left(y \cdot 6.283185307000000108246240415610373020172\right)}^{1}} \cdot {f}^{1}$
7. Applied pow-prod-down0.2

$\leadsto 3.141592653000000012752934708259999752045 \cdot f - \color{blue}{{\left(\left(y \cdot 6.283185307000000108246240415610373020172\right) \cdot f\right)}^{1}}$
8. Simplified0.1

$\leadsto 3.141592653000000012752934708259999752045 \cdot f - {\color{blue}{\left(y \cdot \left(6.283185307000000108246240415610373020172 \cdot f\right)\right)}}^{1}$
9. Using strategy rm
10. Applied sub-neg0.1

$\leadsto \color{blue}{3.141592653000000012752934708259999752045 \cdot f + \left(-{\left(y \cdot \left(6.283185307000000108246240415610373020172 \cdot f\right)\right)}^{1}\right)}$
11. Simplified0.1

$\leadsto 3.141592653000000012752934708259999752045 \cdot f + \color{blue}{\left(-6.283185307000000108246240415610373020172 \cdot \left(y \cdot f\right)\right)}$
12. Final simplification0.1

$\leadsto 3.141592653000000012752934708259999752045 \cdot f + \left(-6.283185307000000108246240415610373020172 \cdot \left(y \cdot f\right)\right)$

# Reproduce

herbie shell --seed 1
(FPCore (f y)
:name "3.141592653f - y * 6.283185307f"
:precision binary64
(- (* 3.141592653 f) (* (* y 6.2831853070000001) f)))