\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)}(FPCore (g h a) :precision binary64 (+ (cbrt (* (/ 1.0 (* 2.0 a)) (+ (- g) (sqrt (- (* g g) (* h h)))))) (cbrt (* (/ 1.0 (* 2.0 a)) (- (- g) (sqrt (- (* g g) (* h h))))))))
double code(double g, double h, double a) {
return cbrt((1.0 / (2.0 * a)) * (-g + sqrt((g * g) - (h * h)))) + cbrt((1.0 / (2.0 * a)) * (-g - sqrt((g * g) - (h * h))));
}
Please include this information when filing a bug report:
herbie shell --seed 2021067
(FPCore (g h a)
:name "2-ancestry mixing, positive discriminant"
:precision binary64
(+ (cbrt (* (/ 1.0 (* 2.0 a)) (+ (- g) (sqrt (- (* g g) (* h h)))))) (cbrt (* (/ 1.0 (* 2.0 a)) (- (- g) (sqrt (- (* g g) (* h h))))))))
| simplify-batch: contract violation expected keyword argument #:precompute in: (-> (listof (or/c (listof any/c) symbol? value? real?)) #:precompute boolean? #:rules (listof rule?) (listof (listof (or/c (listof any/c) symbol? value? real?)))) contract from: (function simplify-batch) blaming: <pkgs>/herbie/core/simplify.rkt (assuming the contract is correct) at: <pkgs>/herbie/core/simplify.rkt:68.18 | L | C | |
|---|---|---|---|
| raise-blame-error | /opt/racket-7.9/collects/racket/contract/private/blame.rkt | 347 | 0 |
| for-loop | /opt/racket-7.9/collects/racket/contract/private/arrow-higher-order.rkt | 508 | 13 |
| kwd-checker | /opt/racket-7.9/collects/racket/contract/private/arrow-higher-order.rkt | 496 | 11 |
| connected-components | /data/pavpan/nightlies/herbie/egg-interface-fixes/src/symmetry.rkt | 17 | 0 |
| run-improve | /data/pavpan/nightlies/herbie/egg-interface-fixes/src/mainloop.rkt | 387 | 0 |
| (unnamed) | /data/pavpan/nightlies/herbie/egg-interface-fixes/src/sandbox.rkt | 54 | 6 |
| run | /opt/racket-7.9/share/pkgs/profile-lib/main.rkt | 39 | 2 |
| profile-thunk | /opt/racket-7.9/share/pkgs/profile-lib/main.rkt | 9 | 0 |
| (unnamed) | /opt/racket-7.9/collects/racket/engine.rkt | 42 | 24 |