Average Error: 0 → 0
Time: 8.0s
Precision: 64
$\left(\left(lenAsq + lenBsq\right) - lenCsq\right) \cdot 0.5$
$\left(\left(lenAsq + lenBsq\right) - lenCsq\right) \cdot 0.5$
\left(\left(lenAsq + lenBsq\right) - lenCsq\right) \cdot 0.5
\left(\left(lenAsq + lenBsq\right) - lenCsq\right) \cdot 0.5
double f(double lenAsq, double lenBsq, double lenCsq) {
double r1597092 = lenAsq;
double r1597093 = lenBsq;
double r1597094 = r1597092 + r1597093;
double r1597095 = lenCsq;
double r1597096 = r1597094 - r1597095;
double r1597097 = 0.5;
double r1597098 = r1597096 * r1597097;
return r1597098;
}


double f(double lenAsq, double lenBsq, double lenCsq) {
double r1597099 = lenAsq;
double r1597100 = lenBsq;
double r1597101 = r1597099 + r1597100;
double r1597102 = lenCsq;
double r1597103 = r1597101 - r1597102;
double r1597104 = 0.5;
double r1597105 = r1597103 * r1597104;
return r1597105;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0

$\left(\left(lenAsq + lenBsq\right) - lenCsq\right) \cdot 0.5$
2. Final simplification0

$\leadsto \left(\left(lenAsq + lenBsq\right) - lenCsq\right) \cdot 0.5$

# Reproduce

herbie shell --seed 1
(FPCore (lenAsq lenBsq lenCsq)
:name "(lenAsq + lenBsq - lenCsq) * 0.5"
:precision binary32
(* (- (+ lenAsq lenBsq) lenCsq) 0.5))