
(FPCore (x c s) :precision binary64 (/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))
double code(double x, double c, double s) {
return cos((2.0 * x)) / (pow(c, 2.0) * ((x * pow(s, 2.0)) * x));
}
real(8) function code(x, c, s)
real(8), intent (in) :: x
real(8), intent (in) :: c
real(8), intent (in) :: s
code = cos((2.0d0 * x)) / ((c ** 2.0d0) * ((x * (s ** 2.0d0)) * x))
end function
public static double code(double x, double c, double s) {
return Math.cos((2.0 * x)) / (Math.pow(c, 2.0) * ((x * Math.pow(s, 2.0)) * x));
}
def code(x, c, s): return math.cos((2.0 * x)) / (math.pow(c, 2.0) * ((x * math.pow(s, 2.0)) * x))
function code(x, c, s) return Float64(cos(Float64(2.0 * x)) / Float64((c ^ 2.0) * Float64(Float64(x * (s ^ 2.0)) * x))) end
function tmp = code(x, c, s) tmp = cos((2.0 * x)) / ((c ^ 2.0) * ((x * (s ^ 2.0)) * x)); end
code[x_, c_, s_] := N[(N[Cos[N[(2.0 * x), $MachinePrecision]], $MachinePrecision] / N[(N[Power[c, 2.0], $MachinePrecision] * N[(N[(x * N[Power[s, 2.0], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
\end{array}
herbie shell --seed 2023271
(FPCore (x c s)
:name "mixedcos"
:precision binary64
(/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))
Please file a bug report with this information.
| length: contract violation expected: list? given: 8000 | L | C | |
|---|---|---|---|
| (unnamed) | /home/nightlies/herbie/arb-support/egg-herbie/main.rkt | 111 | 2 |
| egraph-run | /home/nightlies/herbie/main/src/core/egg-herbie.rkt | 502 | 0 |
| egraph-run-rules | /home/nightlies/herbie/main/src/core/egg-herbie.rkt | 559 | 0 |
| run-egg | /home/nightlies/herbie/main/src/core/egg-herbie.rkt | 288 | 0 |
| simplify-batch | /home/nightlies/herbie/main/src/core/simplify.rkt | 15 | 0 |
| (unnamed) | /usr/share/racket/collects/racket/contract/private/arrow-higher-order.rkt | 379 | 33 |
| find-preprocessing | /home/nightlies/herbie/main/src/preprocess.rkt | 11 | 0 |
| run-improve! | /home/nightlies/herbie/main/src/mainloop.rkt | 325 | 0 |
| get-alternatives/report | /home/nightlies/herbie/main/src/sandbox.rkt | 149 | 0 |
| (unnamed) | /home/nightlies/herbie/main/src/sandbox.rkt | 245 | 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 |