(FPCore (a b c d) :precision binary64 (* a (+ (+ b c) d)))
double code(double a, double b, double c, double d) {
return a * ((b + c) + d);
}
real(8) function code(a, b, c, d)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: d
code = a * ((b + c) + d)
end function
public static double code(double a, double b, double c, double d) {
return a * ((b + c) + d);
}
def code(a, b, c, d): return a * ((b + c) + d)
function code(a, b, c, d) return Float64(a * Float64(Float64(b + c) + d)) end
function tmp = code(a, b, c, d) tmp = a * ((b + c) + d); end
code[a_, b_, c_, d_] := N[(a * N[(N[(b + c), $MachinePrecision] + d), $MachinePrecision]), $MachinePrecision]
a \cdot \left(\left(b + c\right) + d\right)
Please include this information when filing a bug report:
herbie shell --seed 2023096
(FPCore (a b c d)
:name "Expression, p14"
:precision binary64
:pre (and (and (and (and (<= 56789.0 a) (<= a 98765.0)) (and (<= 0.0 b) (<= b 1.0))) (and (<= 0.0 c) (<= c 0.0016773))) (and (<= 0.0 d) (<= d 0.0016773)))
:herbie-target
(+ (* a b) (* a (+ c d)))
(* a (+ (+ b c) d)))
| match-define: no matching clause for '((x +.f64 (*.f64 a d) (*.f64 a (+.f64 b c)))) | 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 |