
(FPCore (a b c) :precision binary64 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
double code(double a, double b, double c) {
return (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
real(8) function code(a, b, c)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (-b + sqrt(((b * b) - ((4.0d0 * a) * c)))) / (2.0d0 * a)
end function
public static double code(double a, double b, double c) {
return (-b + Math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
def code(a, b, c): return (-b + math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a)
function code(a, b, c) return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))) / Float64(2.0 * a)) end
function tmp = code(a, b, c) tmp = (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a); end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\end{array}
herbie shell --seed 2024146
(FPCore (a b c)
:name "Quadratic roots, full range"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
Please file a bug report with this information.
| application: not a procedure; expected a procedure that can be applied to arguments given: #f | L | C | |
|---|---|---|---|
| backward-pass | /home/nightlies/herbie/jackson-mergable-platform-changes/src/correct-round.rkt | 146 | 0 |
| compiled-spec | /home/nightlies/herbie/jackson-mergable-platform-changes/src/correct-round.rkt | 27 | 2 |
| compiled-spec | /home/nightlies/herbie/jackson-mergable-platform-changes/src/correct-round.rkt | 143 | 2 |
| compiled-spec | /home/nightlies/herbie/jackson-mergable-platform-changes/src/correct-round.rkt | 27 | 2 |
| compiled-spec | /home/nightlies/herbie/jackson-mergable-platform-changes/src/ground-truth.rkt | 31 | 2 |
| ival-eval | /home/nightlies/herbie/jackson-mergable-platform-changes/src/ground-truth.rkt | 55 | 0 |
| <eval-prog-real> | /home/nightlies/herbie/jackson-mergable-platform-changes/src/ground-truth.rkt | 86 | 2 |
| compute-local-errors | /home/nightlies/herbie/jackson-mergable-platform-changes/src/core/localize.rkt | 75 | 0 |
| batch-localize-errors | /home/nightlies/herbie/jackson-mergable-platform-changes/src/core/localize.rkt | 61 | 0 |
| localize! | /home/nightlies/herbie/jackson-mergable-platform-changes/src/mainloop.rkt | 201 | 0 |
| run-iter! | /home/nightlies/herbie/jackson-mergable-platform-changes/src/mainloop.rkt | 73 | 0 |
| mutate! | /home/nightlies/herbie/jackson-mergable-platform-changes/src/mainloop.rkt | 65 | 0 |
| run-improve! | /home/nightlies/herbie/jackson-mergable-platform-changes/src/mainloop.rkt | 51 | 0 |
| get-alternatives/report | /home/nightlies/herbie/jackson-mergable-platform-changes/src/sandbox.rkt | 169 | 0 |
| (unnamed) | /home/nightlies/herbie/jackson-mergable-platform-changes/src/sandbox.rkt | 263 | 6 |
| (unnamed) | /usr/local/racket/share/pkgs/profile-lib/main.rkt | 40 | 10 |
| profile-thunk | /usr/local/racket/share/pkgs/profile-lib/main.rkt | 9 | 0 |
| (unnamed) | /usr/local/racket/collects/racket/engine.rkt | 42 | 24 |