
(FPCore (re im) :precision binary64 (* (exp re) (cos im)))
double code(double re, double im) {
return exp(re) * cos(im);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = exp(re) * cos(im)
end function
public static double code(double re, double im) {
return Math.exp(re) * Math.cos(im);
}
def code(re, im): return math.exp(re) * math.cos(im)
function code(re, im) return Float64(exp(re) * cos(im)) end
function tmp = code(re, im) tmp = exp(re) * cos(im); end
code[re_, im_] := N[(N[Exp[re], $MachinePrecision] * N[Cos[im], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{re} \cdot \cos im
\end{array}
herbie shell --seed 2024257
(FPCore (re im)
:name "math.exp on complex, real part"
:precision binary64
(* (exp re) (cos im)))
Please file a bug report with this information.
| first: contract violation expected: (and/c list? (not/c empty?)) given: #f | L | C | |
|---|---|---|---|
| run-egg | /home/nightlies/herbie/eclass-test-rev/src/core/egg-herbie.rkt | 1179 | 0 |
| simplify-batch | /home/nightlies/herbie/eclass-test-rev/src/core/simplify.rkt | 21 | 0 |
| (unnamed) | /usr/local/racket/collects/racket/contract/private/arrow-higher-order.rkt | 379 | 33 |
| final-simplify! | /home/nightlies/herbie/eclass-test-rev/src/core/mainloop.rkt | 362 | 0 |
| extract! | /home/nightlies/herbie/eclass-test-rev/src/core/mainloop.rkt | 77 | 0 |
| run-improve! | /home/nightlies/herbie/eclass-test-rev/src/core/mainloop.rkt | 43 | 0 |
| get-alternatives/report | /home/nightlies/herbie/eclass-test-rev/src/api/sandbox.rkt | 187 | 0 |
| (unnamed) | /home/nightlies/herbie/eclass-test-rev/src/api/sandbox.rkt | 283 | 6 |
| (unnamed) | /usr/local/racket/share/pkgs/profile-lib/main.rkt | 40 | 10 |
| profile-thunk | /usr/local/racket/share/pkgs/profile-lib/main.rkt | 9 | 0 |
| (unnamed) | /usr/local/racket/collects/racket/engine.rkt | 42 | 24 |