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