(FPCore (x eps) :precision binary64 (- (sin (+ x eps)) (sin x)))
double code(double x, double eps) {
return sin((x + eps)) - sin(x);
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = sin((x + eps)) - sin(x)
end function
public static double code(double x, double eps) {
return Math.sin((x + eps)) - Math.sin(x);
}
def code(x, eps): return math.sin((x + eps)) - math.sin(x)
function code(x, eps) return Float64(sin(Float64(x + eps)) - sin(x)) end
function tmp = code(x, eps) tmp = sin((x + eps)) - sin(x); end
code[x_, eps_] := N[(N[Sin[N[(x + eps), $MachinePrecision]], $MachinePrecision] - N[Sin[x], $MachinePrecision]), $MachinePrecision]
\sin \left(x + \varepsilon\right) - \sin x
Please include this information when filing a bug report:
herbie shell --seed 2023094
(FPCore (x eps)
:name "2sin (example 3.3)"
:precision binary64
:herbie-target
(* 2.0 (* (cos (+ x (/ eps 2.0))) (sin (/ eps 2.0))))
(- (sin (+ x eps)) (sin x)))
| match-define: no matching clause for '((x +.f64 (*.f64 (sin.f64 x) (cos.f64 eps)) (*.f64 (cos.f64 x) (sin.f64 eps)))) | L | C | |
|---|---|---|---|
| program-body | /home/nightlies/herbie/remove-change/src/programs.rkt | 21 | 0 |
| (unnamed) | /usr/share/racket/collects/racket/contract/private/arrow-higher-order.rkt | 379 | 33 |
| gen-rewrites! | /home/nightlies/herbie/remove-change/src/patch.rkt | 145 | 0 |
| patch-table-run | /home/nightlies/herbie/remove-change/src/patch.rkt | 296 | 0 |
| (unnamed) | /usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt | 486 | 18 |
| run-iter! | /home/nightlies/herbie/remove-change/src/mainloop.rkt | 267 | 0 |
| mutate! | /home/nightlies/herbie/remove-change/src/mainloop.rkt | 377 | 0 |
| run-improve! | /home/nightlies/herbie/remove-change/src/mainloop.rkt | 325 | 0 |
| run-herbie | /home/nightlies/herbie/remove-change/src/sandbox.rkt | 57 | 0 |
| (unnamed) | /home/nightlies/herbie/remove-change/src/sandbox.rkt | 133 | 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 |