
(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 2025093
(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.
| result arity mismatch; expected number of values not received expected: 2 received: 1 in: local-binding form arguments...: '((0.031171667401438223 1.5136172060032393e-167) . #f) | L | C | |
|---|---|---|---|
| batch-prepare-points | /home/nightlies/herbie/random-cleanup/src/core/sampling.rkt | 123 | 0 |
| prepend-argument | /home/nightlies/herbie/random-cleanup/src/core/bsearch.rkt | 97 | 0 |
| hash-ref! | /usr/share/racket/collects/racket/private/more-scheme.rkt | 377 | 2 |
| pred | /home/nightlies/herbie/random-cleanup/src/core/bsearch.rkt | 140 | 4 |
| binary-search-floats | /home/nightlies/herbie/random-cleanup/src/core/bsearch.rkt | 69 | 0 |
| sindices->spoints | /home/nightlies/herbie/random-cleanup/src/core/bsearch.rkt | 121 | 0 |
| (unnamed) | /usr/share/racket/collects/racket/contract/private/arrow-higher-order.rkt | 379 | 33 |
| f11 | .../match/compiler.rkt | 559 | 40 |
| make-regime! | /home/nightlies/herbie/random-cleanup/src/core/mainloop.rkt | 262 | 0 |
| extract! | /home/nightlies/herbie/random-cleanup/src/core/mainloop.rkt | 61 | 0 |
| run-improve! | /home/nightlies/herbie/random-cleanup/src/core/mainloop.rkt | 37 | 0 |
| get-alternatives | /home/nightlies/herbie/random-cleanup/src/api/sandbox.rkt | 61 | 0 |
| (unnamed) | /home/nightlies/herbie/random-cleanup/src/api/sandbox.rkt | 193 | 6 |
| (unnamed) | /usr/share/racket/pkgs/profile-lib/main.rkt | 40 | 10 |
| profile-thunk | /usr/share/racket/pkgs/profile-lib/main.rkt | 9 | 0 |
| in-engine | /home/nightlies/herbie/random-cleanup/src/api/sandbox.rkt | 209 | 2 |
| (unnamed) | /usr/share/racket/collects/racket/engine.rkt | 42 | 24 |