
(FPCore (a1 a2 th) :precision binary64 (let* ((t_1 (/ (cos th) (sqrt 2.0)))) (+ (* t_1 (* a1 a1)) (* t_1 (* a2 a2)))))
double code(double a1, double a2, double th) {
double t_1 = cos(th) / sqrt(2.0);
return (t_1 * (a1 * a1)) + (t_1 * (a2 * a2));
}
real(8) function code(a1, a2, th)
real(8), intent (in) :: a1
real(8), intent (in) :: a2
real(8), intent (in) :: th
real(8) :: t_1
t_1 = cos(th) / sqrt(2.0d0)
code = (t_1 * (a1 * a1)) + (t_1 * (a2 * a2))
end function
public static double code(double a1, double a2, double th) {
double t_1 = Math.cos(th) / Math.sqrt(2.0);
return (t_1 * (a1 * a1)) + (t_1 * (a2 * a2));
}
def code(a1, a2, th): t_1 = math.cos(th) / math.sqrt(2.0) return (t_1 * (a1 * a1)) + (t_1 * (a2 * a2))
function code(a1, a2, th) t_1 = Float64(cos(th) / sqrt(2.0)) return Float64(Float64(t_1 * Float64(a1 * a1)) + Float64(t_1 * Float64(a2 * a2))) end
function tmp = code(a1, a2, th) t_1 = cos(th) / sqrt(2.0); tmp = (t_1 * (a1 * a1)) + (t_1 * (a2 * a2)); end
code[a1_, a2_, th_] := Block[{t$95$1 = N[(N[Cos[th], $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, N[(N[(t$95$1 * N[(a1 * a1), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(a2 * a2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\cos th}{\sqrt{2}}\\
t\_1 \cdot \left(a1 \cdot a1\right) + t\_1 \cdot \left(a2 \cdot a2\right)
\end{array}
\end{array}
herbie shell --seed 2024345
(FPCore (a1 a2 th)
:name "Migdal et al, Equation (64)"
:precision binary64
:pre (TRUE)
(+ (* (/ (cos th) (sqrt 2.0)) (* a1 a1)) (* (/ (cos th) (sqrt 2.0)) (* a2 a2))))
Please file a bug report with this information.
| egglog executable not found in PATH | L | C | |
|---|---|---|---|
| run-egglog-single-extractor | /home/nightlies/herbie/aditya-egglog-single-extractor/src/core/egglog-herbie.rkt | 143 | 0 |
| simplify-batch | /home/nightlies/herbie/aditya-egglog-single-extractor/src/core/simplify.rkt | 23 | 0 |
| (unnamed) | /usr/share/racket/collects/racket/contract/private/arrow-higher-order.rkt | 379 | 33 |
| initial-simplify | /home/nightlies/herbie/aditya-egglog-single-extractor/src/core/preprocess.rkt | 60 | 0 |
| find-preprocessing | /home/nightlies/herbie/aditya-egglog-single-extractor/src/core/preprocess.rkt | 98 | 0 |
| run-improve! | /home/nightlies/herbie/aditya-egglog-single-extractor/src/core/mainloop.rkt | 46 | 0 |
| get-alternatives/report | /home/nightlies/herbie/aditya-egglog-single-extractor/src/api/sandbox.rkt | 186 | 0 |
| (unnamed) | /home/nightlies/herbie/aditya-egglog-single-extractor/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 |