Average Error: 31.3 → 0
Time: 22.1s
Precision: 64
$3 \cdot \left(a - \left(a - {10}^{\left(-10\right)}\right)\right)$
$\frac{3}{10000000000}$
3 \cdot \left(a - \left(a - {10}^{\left(-10\right)}\right)\right)
\frac{3}{10000000000}
double f(double a) {
double r24493392 = 3.0;
double r24493393 = a;
double r24493394 = 10.0;
double r24493395 = -r24493394;
double r24493396 = pow(r24493394, r24493395);
double r24493397 = r24493393 - r24493396;
double r24493398 = r24493393 - r24493397;
double r24493399 = r24493392 * r24493398;
return r24493399;
}


double f(double __attribute__((unused)) a) {
double r24493400 = 3e-10;
return r24493400;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 31.3

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

$\leadsto \color{blue}{\frac{3}{10000000000}}$
3. Final simplification0

$\leadsto \frac{3}{10000000000}$

# Reproduce

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