
(FPCore (x) :precision binary64 (* (fmod (exp x) (sqrt (cos x))) (exp (- x))))
double code(double x) {
return fmod(exp(x), sqrt(cos(x))) * exp(-x);
}
real(8) function code(x)
real(8), intent (in) :: x
code = mod(exp(x), sqrt(cos(x))) * exp(-x)
end function
def code(x): return math.fmod(math.exp(x), math.sqrt(math.cos(x))) * math.exp(-x)
function code(x) return Float64(rem(exp(x), sqrt(cos(x))) * exp(Float64(-x))) end
code[x_] := N[(N[With[{TMP1 = N[Exp[x], $MachinePrecision], TMP2 = N[Sqrt[N[Cos[x], $MachinePrecision]], $MachinePrecision]}, Mod[Abs[TMP1], Abs[TMP2]] * Sign[TMP1]], $MachinePrecision] * N[Exp[(-x)], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right) \cdot e^{-x}
\end{array}
herbie shell --seed 2023271
(FPCore (x)
:name "expfmod (used to be hard to sample)"
:precision binary64
(* (fmod (exp x) (sqrt (cos x))) (exp (- 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 |