Average Error: 0.0 → 0.0
Time: 7.8s
Precision: 64
$\left(1 - a\right) \cdot \left(1 - b\right)$
$\left(1 - a\right) \cdot \left(1 - b\right)$
\left(1 - a\right) \cdot \left(1 - b\right)
\left(1 - a\right) \cdot \left(1 - b\right)
double f(double a, double b) {
double r238117 = 1.0;
double r238118 = a;
double r238119 = r238117 - r238118;
double r238120 = b;
double r238121 = r238117 - r238120;
double r238122 = r238119 * r238121;
return r238122;
}


double f(double a, double b) {
double r238123 = 1.0;
double r238124 = a;
double r238125 = r238123 - r238124;
double r238126 = b;
double r238127 = r238123 - r238126;
double r238128 = r238125 * r238127;
return r238128;
}



Try it out

Results

 In Out
Enter valid numbers for all inputs

Derivation

1. Initial program 0.0

$\left(1 - a\right) \cdot \left(1 - b\right)$
2. Final simplification0.0

$\leadsto \left(1 - a\right) \cdot \left(1 - b\right)$

Reproduce

herbie shell --seed 1
(FPCore (a b)
:name "(1-a)*(1-b)"
:precision binary64
(* (- 1 a) (- 1 b)))