\sqrt{x - 1} \cdot \sqrt{x}\sqrt{x - 1} \cdot \sqrt{x}(FPCore (x) :precision binary64 (* (sqrt (- x 1.0)) (sqrt x)))
(FPCore (x) :precision binary64 (* (sqrt (- x 1.0)) (sqrt x)))
double code(double x) {
return sqrt(x - 1.0) * sqrt(x);
}
double code(double x) {
return sqrt(x - 1.0) * sqrt(x);
}
























Bits error versus x
Results
| Alternative 1 | |
|---|---|
| Error | 1.4 |
| Cost | 58688 |
| Alternative 2 | |
|---|---|
| Error | 1.3 |
| Cost | 45632 |
| Alternative 3 | |
|---|---|
| Error | 1.3 |
| Cost | 45632 |
| Alternative 4 | |
|---|---|
| Error | 1.3 |
| Cost | 45376 |
| Alternative 5 | |
|---|---|
| Error | 0.8 |
| Cost | 39232 |
| Alternative 6 | |
|---|---|
| Error | 0.5 |
| Cost | 39104 |
| Alternative 7 | |
|---|---|
| Error | 0.7 |
| Cost | 32576 |
| Alternative 8 | |
|---|---|
| Error | 0.7 |
| Cost | 32576 |
| Alternative 9 | |
|---|---|
| Error | 0.9 |
| Cost | 32576 |
| Alternative 10 | |
|---|---|
| Error | 0.8 |
| Cost | 32448 |
| Alternative 11 | |
|---|---|
| Error | 0.7 |
| Cost | 32448 |
| Alternative 12 | |
|---|---|
| Error | 22.3 |
| Cost | 25984 |
| Alternative 13 | |
|---|---|
| Error | 4.9 |
| Cost | 25920 |
| Alternative 14 | |
|---|---|
| Error | 32.6 |
| Cost | 6784 |
| Alternative 15 | |
|---|---|
| Error | 32.6 |
| Cost | 6720 |
| Alternative 16 | |
|---|---|
| Error | 0.4 |
| Cost | 448 |
| Alternative 17 | |
|---|---|
| Error | 0.6 |
| Cost | 192 |
| Alternative 18 | |
|---|---|
| Error | 1.3 |
| Cost | 64 |
| Alternative 19 | |
|---|---|
| Error | 60.6 |
| Cost | 64 |
| Alternative 20 | |
|---|---|
| Error | 62.6 |
| Cost | 64 |
| Alternative 21 | |
|---|---|
| Error | 63.3 |
| Cost | 64 |

Initial program 0.5
Simplified0.5
Final simplification0.5
herbie shell --seed 2021022
(FPCore (x)
:name "sqrt times"
:precision binary64
(* (sqrt (- x 1.0)) (sqrt x)))