(FPCore (a b) :precision binary64 (- (+ (pow (+ (* a a) (* b b)) 2.0) (* 4.0 (* b b))) 1.0))
double code(double a, double b) {
return (pow(((a * a) + (b * b)), 2.0) + (4.0 * (b * b))) - 1.0;
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((((a * a) + (b * b)) ** 2.0d0) + (4.0d0 * (b * b))) - 1.0d0
end function
public static double code(double a, double b) {
return (Math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (b * b))) - 1.0;
}
def code(a, b): return (math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (b * b))) - 1.0
function code(a, b) return Float64(Float64((Float64(Float64(a * a) + Float64(b * b)) ^ 2.0) + Float64(4.0 * Float64(b * b))) - 1.0) end
function tmp = code(a, b) tmp = ((((a * a) + (b * b)) ^ 2.0) + (4.0 * (b * b))) - 1.0; end
code[a_, b_] := N[(N[(N[Power[N[(N[(a * a), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(4.0 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]
\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1
Please include this information when filing a bug report:
herbie shell --seed 2023094
(FPCore (a b)
:name "Bouland and Aaronson, Equation (26)"
:precision binary64
(- (+ (pow (+ (* a a) (* b b)) 2.0) (* 4.0 (* b b))) 1.0))
| match-define: no matching clause for '((x +.f64 (*.f64 (pow.f64 (hypot.f64 a b) 2) (*.f64 b b)) (*.f64 (pow.f64 (hypot.f64 a b) 2) (*.f64 a a)))) | 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 |