
(FPCore (x) :precision binary64 (- 1.0 (sqrt (* 0.5 (+ 1.0 (/ 1.0 (hypot 1.0 x)))))))
double code(double x) {
return 1.0 - sqrt((0.5 * (1.0 + (1.0 / hypot(1.0, x)))));
}
public static double code(double x) {
return 1.0 - Math.sqrt((0.5 * (1.0 + (1.0 / Math.hypot(1.0, x)))));
}
def code(x): return 1.0 - math.sqrt((0.5 * (1.0 + (1.0 / math.hypot(1.0, x)))))
function code(x) return Float64(1.0 - sqrt(Float64(0.5 * Float64(1.0 + Float64(1.0 / hypot(1.0, x)))))) end
function tmp = code(x) tmp = 1.0 - sqrt((0.5 * (1.0 + (1.0 / hypot(1.0, x))))); end
code[x_] := N[(1.0 - N[Sqrt[N[(0.5 * N[(1.0 + N[(1.0 / N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}
\end{array}
herbie shell --seed 2024288
(FPCore (x)
:name "Given's Rotation SVD example, simplified"
:precision binary64
(- 1.0 (sqrt (* 0.5 (+ 1.0 (/ 1.0 (hypot 1.0 x)))))))
Please file a bug report with this information.
| error: contract violation expected: string? given: 'hypot.f64 | L | C | |
|---|---|---|---|
| f407 | .../match/compiler.rkt | 559 | 40 |
| loop | .../private/map.rkt | 40 | 19 |
| loop | .../private/map.rkt | 40 | 19 |
| loop | .../private/map.rkt | 40 | 19 |
| compile-expr | /home/nightlies/herbie/bhargav-log-space/src/core/explain.rkt | 84 | 0 |
| explain | /home/nightlies/herbie/bhargav-log-space/src/core/explain.rkt | 713 | 0 |
| explain! | /home/nightlies/herbie/bhargav-log-space/src/core/mainloop.rkt | 323 | 0 |
| run-improve! | /home/nightlies/herbie/bhargav-log-space/src/core/mainloop.rkt | 45 | 0 |
| get-alternatives/report | /home/nightlies/herbie/bhargav-log-space/src/api/sandbox.rkt | 186 | 0 |
| (unnamed) | /home/nightlies/herbie/bhargav-log-space/src/api/sandbox.rkt | 282 | 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 |