| Alternative 1 | |
|---|---|
| Error | 0.1 |
| Cost | 704 |
\[1 - x \cdot \left(\frac{x \cdot 0.4743083003952569}{3.952569169960474} + 0.253\right)
\]
(FPCore (x) :precision binary64 (- 1.0 (* x (+ 0.253 (* x 0.12)))))
(FPCore (x) :precision binary64 (- 1.0 (* (* (fma x 0.4743083003952569 1.0) x) 0.253)))
double code(double x) {
return 1.0 - (x * (0.253 + (x * 0.12)));
}
double code(double x) {
return 1.0 - ((fma(x, 0.4743083003952569, 1.0) * x) * 0.253);
}
function code(x) return Float64(1.0 - Float64(x * Float64(0.253 + Float64(x * 0.12)))) end
function code(x) return Float64(1.0 - Float64(Float64(fma(x, 0.4743083003952569, 1.0) * x) * 0.253)) end
code[x_] := N[(1.0 - N[(x * N[(0.253 + N[(x * 0.12), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_] := N[(1.0 - N[(N[(N[(x * 0.4743083003952569 + 1.0), $MachinePrecision] * x), $MachinePrecision] * 0.253), $MachinePrecision]), $MachinePrecision]
1 - x \cdot \left(0.253 + x \cdot 0.12\right)
1 - \left(\mathsf{fma}\left(x, 0.4743083003952569, 1\right) \cdot x\right) \cdot 0.253
Initial program 0.1
Applied egg-rr0.2
| Alternative 1 | |
|---|---|
| Error | 0.1 |
| Cost | 704 |
| Alternative 2 | |
|---|---|
| Error | 0.1 |
| Cost | 576 |
| Alternative 3 | |
|---|---|
| Error | 1.9 |
| Cost | 448 |
| Alternative 4 | |
|---|---|
| Error | 20.7 |
| Cost | 320 |
| Alternative 5 | |
|---|---|
| Error | 21.8 |
| Cost | 64 |
herbie shell --seed 2023033
(FPCore (x)
:name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, A"
:precision binary64
(- 1.0 (* x (+ 0.253 (* x 0.12)))))