Average Error: 31.3 → 0
Time: 12.2s
Precision: 64
$3 \cdot \left(x - \left(x - {10}^{\left(-10\right)}\right)\right)$
${10}^{\left(-10\right)} \cdot 3$
3 \cdot \left(x - \left(x - {10}^{\left(-10\right)}\right)\right)
{10}^{\left(-10\right)} \cdot 3
double f(double x) {
double r21602885 = 3.0;
double r21602886 = x;
double r21602887 = 10.0;
double r21602888 = -r21602887;
double r21602889 = pow(r21602887, r21602888);
double r21602890 = r21602886 - r21602889;
double r21602891 = r21602886 - r21602890;
double r21602892 = r21602885 * r21602891;
return r21602892;
}


double f(double __attribute__((unused)) x) {
double r21602893 = 10.0;
double r21602894 = -r21602893;
double r21602895 = pow(r21602893, r21602894);
double r21602896 = 3.0;
double r21602897 = r21602895 * r21602896;
return r21602897;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 31.3

$3 \cdot \left(x - \left(x - {10}^{\left(-10\right)}\right)\right)$
2. Simplified0

$\leadsto \color{blue}{3 \cdot {10}^{\left(-10\right)}}$
3. Final simplification0

$\leadsto {10}^{\left(-10\right)} \cdot 3$

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "3*(x-(x-pow(10,-10)))"
(* 3.0 (- x (- x (pow 10.0 (- 10.0))))))