(FPCore (x eps) :precision binary64 (- (pow (+ x eps) 5.0) (pow x 5.0)))
double code(double x, double eps) {
return pow((x + eps), 5.0) - pow(x, 5.0);
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = ((x + eps) ** 5.0d0) - (x ** 5.0d0)
end function
public static double code(double x, double eps) {
return Math.pow((x + eps), 5.0) - Math.pow(x, 5.0);
}
def code(x, eps): return math.pow((x + eps), 5.0) - math.pow(x, 5.0)
function code(x, eps) return Float64((Float64(x + eps) ^ 5.0) - (x ^ 5.0)) end
function tmp = code(x, eps) tmp = ((x + eps) ^ 5.0) - (x ^ 5.0); end
code[x_, eps_] := N[(N[Power[N[(x + eps), $MachinePrecision], 5.0], $MachinePrecision] - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]
{\left(x + \varepsilon\right)}^{5} - {x}^{5}
Please include this information when filing a bug report:
herbie shell --seed 2022203
(FPCore (x eps)
:name "ENA, Section 1.4, Exercise 4b, n=5"
:precision binary64
:pre (and (and (<= -1000000000.0 x) (<= x 1000000000.0)) (and (<= -1.0 eps) (<= eps 1.0)))
(- (pow (+ x eps) 5.0) (pow x 5.0)))
| hash-ref: no value found for key key: '~ | L | C | |
|---|---|---|---|
| get-parametric-operator | /data/pavpan/nightlies/herbie/enumo-rat/src/syntax/syntax.rkt | 218 | 0 |
| f336 | .../match/compiler.rkt | 548 | 40 |
| expand-parametric | /data/pavpan/nightlies/herbie/enumo-rat/src/syntax/sugar.rkt | 62 | 0 |
| (unnamed) | /data/pavpan/nightlies/herbie/enumo-rat/src/syntax/rules.rkt | 176 | 8 |
| generate-rules-for | /data/pavpan/nightlies/herbie/enumo-rat/src/syntax/rules.rkt | 161 | 0 |
| generate-missing-rules | /data/pavpan/nightlies/herbie/enumo-rat/src/syntax/rules.rkt | 187 | 0 |
| (unnamed) | /data/pavpan/nightlies/herbie/enumo-rat/src/syntax/rules.rkt | 29 | 26 |
| get-swaps | /data/pavpan/nightlies/herbie/enumo-rat/src/symmetry.rkt | 6 | 0 |
| connected-components | /data/pavpan/nightlies/herbie/enumo-rat/src/symmetry.rkt | 17 | 0 |
| run-improve! | /data/pavpan/nightlies/herbie/enumo-rat/src/mainloop.rkt | 296 | 0 |
| (unnamed) | /data/pavpan/nightlies/herbie/enumo-rat/src/sandbox.rkt | 55 | 6 |
| (unnamed) | /usr/share/racket/pkgs/profile-lib/main.rkt | 40 | 10 |
| profile-thunk | /usr/share/racket/pkgs/profile-lib/main.rkt | 9 | 0 |
| (unnamed) | /usr/share/racket/collects/racket/engine.rkt | 42 | 24 |