
(FPCore (a b_2 c) :precision binary64 (/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))
double code(double a, double b_2, double c) {
return (-b_2 + sqrt(((b_2 * b_2) - (a * c)))) / a;
}
real(8) function code(a, b_2, c)
real(8), intent (in) :: a
real(8), intent (in) :: b_2
real(8), intent (in) :: c
code = (-b_2 + sqrt(((b_2 * b_2) - (a * c)))) / a
end function
public static double code(double a, double b_2, double c) {
return (-b_2 + Math.sqrt(((b_2 * b_2) - (a * c)))) / a;
}
def code(a, b_2, c): return (-b_2 + math.sqrt(((b_2 * b_2) - (a * c)))) / a
function code(a, b_2, c) return Float64(Float64(Float64(-b_2) + sqrt(Float64(Float64(b_2 * b_2) - Float64(a * c)))) / a) end
function tmp = code(a, b_2, c) tmp = (-b_2 + sqrt(((b_2 * b_2) - (a * c)))) / a; end
code[a_, b$95$2_, c_] := N[(N[((-b$95$2) + N[Sqrt[N[(N[(b$95$2 * b$95$2), $MachinePrecision] - N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-b\_2\right) + \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a}
\end{array}
herbie shell --seed 2024135
(FPCore (a b_2 c)
:name "quad2p (problem 3.2.1, positive)"
:precision binary64
:herbie-expected 10
:alt
(! :herbie-platform default (let ((sqtD (let ((x (* (sqrt (fabs a)) (sqrt (fabs c))))) (if (== (copysign a c) a) (* (sqrt (- (fabs b_2) x)) (sqrt (+ (fabs b_2) x))) (hypot b_2 x))))) (if (< b_2 0) (/ (- sqtD b_2) a) (/ (- c) (+ b_2 sqtD)))))
(/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))
Please file a bug report with this information.
| compile-specs: Unknown operator fma | L | C | |
|---|---|---|---|
| make-compiler | /home/nightlies/herbie/separate-sampling/src/correct-round.rkt | 117 | 0 |
| make-search-func | /home/nightlies/herbie/separate-sampling/src/ground-truth.rkt | 28 | 0 |
| eval-progs-real | /home/nightlies/herbie/separate-sampling/src/ground-truth.rkt | 81 | 0 |
| compute-local-errors | /home/nightlies/herbie/separate-sampling/src/core/localize.rkt | 70 | 0 |
| batch-localize-both | /home/nightlies/herbie/separate-sampling/src/core/localize.rkt | 37 | 0 |
| localize! | /home/nightlies/herbie/separate-sampling/src/mainloop.rkt | 201 | 0 |
| run-iter! | /home/nightlies/herbie/separate-sampling/src/mainloop.rkt | 73 | 0 |
| mutate! | /home/nightlies/herbie/separate-sampling/src/mainloop.rkt | 65 | 0 |
| run-improve! | /home/nightlies/herbie/separate-sampling/src/mainloop.rkt | 51 | 0 |
| get-alternatives/report | /home/nightlies/herbie/separate-sampling/src/sandbox.rkt | 171 | 0 |
| (unnamed) | /home/nightlies/herbie/separate-sampling/src/sandbox.rkt | 272 | 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 |