
(FPCore (re im) :precision binary64 (* (* 0.5 (cos re)) (- (exp (- 0.0 im)) (exp im))))
double code(double re, double im) {
return (0.5 * cos(re)) * (exp((0.0 - im)) - exp(im));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = (0.5d0 * cos(re)) * (exp((0.0d0 - im)) - exp(im))
end function
public static double code(double re, double im) {
return (0.5 * Math.cos(re)) * (Math.exp((0.0 - im)) - Math.exp(im));
}
def code(re, im): return (0.5 * math.cos(re)) * (math.exp((0.0 - im)) - math.exp(im))
function code(re, im) return Float64(Float64(0.5 * cos(re)) * Float64(exp(Float64(0.0 - im)) - exp(im))) end
function tmp = code(re, im) tmp = (0.5 * cos(re)) * (exp((0.0 - im)) - exp(im)); end
code[re_, im_] := N[(N[(0.5 * N[Cos[re], $MachinePrecision]), $MachinePrecision] * N[(N[Exp[N[(0.0 - im), $MachinePrecision]], $MachinePrecision] - N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.5 \cdot \cos re\right) \cdot \left(e^{0 - im} - e^{im}\right)
\end{array}
herbie shell --seed 2024196
(FPCore (re im)
:name "math.sin on complex, imaginary part"
:precision binary64
:alt
(! :herbie-platform default (if (< (fabs im) 1) (- (* (cos re) (+ im (* 1/6 im im im) (* 1/120 im im im im im)))) (* (* 1/2 (cos re)) (- (exp (- 0 im)) (exp im)))))
(* (* 0.5 (cos re)) (- (exp (- 0.0 im)) (exp im))))
Please file a bug report with this information.
| vector-set!: contract violation expected: exact-nonnegative-integer? given: -1 argument position: 2nd first argument...: '#(#f #t #f #f #f #f #f #f #f #f #f) | L | C | |
|---|---|---|---|
| backward-pass | /home/nightlies/rival/main/eval/adjust.rkt | 8 | 0 |
| rival-machine-adjust | /home/nightlies/rival/main/eval/run.rkt | 98 | 0 |
| rival-machine-full | /home/nightlies/rival/main/eval/main.rkt | 16 | 0 |
| rival-apply | /home/nightlies/rival/main/eval/main.rkt | 56 | 0 |
| (unnamed) | /usr/local/racket/collects/racket/contract/private/arrow-val-first.rkt | 486 | 18 |
| (unnamed) | /home/nightlies/herbie/zane-odyssey-timeline/src/sampling.rkt | 159 | 4 |
| ival-eval | /home/nightlies/herbie/zane-odyssey-timeline/src/sampling.rkt | 153 | 0 |
| <eval-prog-real> | /home/nightlies/herbie/zane-odyssey-timeline/src/sampling.rkt | 188 | 2 |
| predict-errors | /home/nightlies/herbie/zane-odyssey-timeline/src/explain.rkt | 86 | 0 |
| explain | /home/nightlies/herbie/zane-odyssey-timeline/src/explain.rkt | 736 | 0 |
| explain! | /home/nightlies/herbie/zane-odyssey-timeline/src/mainloop.rkt | 339 | 0 |
| mutate! | /home/nightlies/herbie/zane-odyssey-timeline/src/mainloop.rkt | 62 | 0 |
| run-improve! | /home/nightlies/herbie/zane-odyssey-timeline/src/mainloop.rkt | 48 | 0 |
| get-alternatives/report | /home/nightlies/herbie/zane-odyssey-timeline/src/sandbox.rkt | 167 | 0 |
| (unnamed) | /home/nightlies/herbie/zane-odyssey-timeline/src/sandbox.rkt | 261 | 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 |