
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (+ (pow (* a (cos t_0)) 2.0) (pow (* b (sin t_0)) 2.0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return pow((a * cos(t_0)), 2.0) + pow((b * sin(t_0)), 2.0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return Math.pow((a * Math.cos(t_0)), 2.0) + Math.pow((b * Math.sin(t_0)), 2.0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return math.pow((a * math.cos(t_0)), 2.0) + math.pow((b * math.sin(t_0)), 2.0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64((Float64(a * cos(t_0)) ^ 2.0) + (Float64(b * sin(t_0)) ^ 2.0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((a * cos(t_0)) ^ 2.0) + ((b * sin(t_0)) ^ 2.0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(a * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
{\left(a \cdot \cos t\_0\right)}^{2} + {\left(b \cdot \sin t\_0\right)}^{2}
\end{array}
\end{array}
herbie shell --seed 2025093
(FPCore (a b angle)
:name "ab-angle->ABCF C"
:precision binary64
(+ (pow (* a (cos (* PI (/ angle 180.0)))) 2.0) (pow (* b (sin (* PI (/ angle 180.0)))) 2.0)))
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...: '((1.223127513574181e-161 2.478552375011218e+41 4.775482055808602e+61 6.326408619393826e-18) . #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 |