
(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 2024186 -o setup:simplify
(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.
| application: not a procedure; expected a procedure that can be applied to arguments given: #f | L | C | |
|---|---|---|---|
| compiled-spec | /home/nightlies/herbie/artem-popl-eval/src/baseline.rkt | 83 | 2 |
| compiled-spec | /home/nightlies/herbie/artem-popl-eval/src/baseline.rkt | 53 | 2 |
| ival-eval-baseline | /home/nightlies/herbie/artem-popl-eval/src/baseline.rkt | 22 | 0 |
| batch-prepare-points | /home/nightlies/herbie/artem-popl-eval/src/sampling.rkt | 186 | 0 |
| sample-points | /home/nightlies/herbie/artem-popl-eval/src/sampling.rkt | 248 | 0 |
| setup-context! | /home/nightlies/herbie/artem-popl-eval/src/mainloop.rkt | 45 | 0 |
| get-alternatives/report | /home/nightlies/herbie/artem-popl-eval/src/sandbox.rkt | 166 | 0 |
| (unnamed) | /home/nightlies/herbie/artem-popl-eval/src/sandbox.rkt | 260 | 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 |