
(FPCore (re im) :precision binary64 (atan2 im re))
double code(double re, double im) {
return atan2(im, re);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = atan2(im, re)
end function
public static double code(double re, double im) {
return Math.atan2(im, re);
}
def code(re, im): return math.atan2(im, re)
function code(re, im) return atan(im, re) end
function tmp = code(re, im) tmp = atan2(im, re); end
code[re_, im_] := N[ArcTan[im / re], $MachinePrecision]
\tan^{-1}_* \frac{im}{re}
Please include this information when filing a bug report:
herbie shell --seed 2023241
(FPCore (re im)
:name "math.arg on complex"
:precision binary64
(atan2 im re))
| inexact?: contract violation expected: number? given: (ival (bf "-2.098578716467387692404358116883839070632e323228496") (bf "2.098578716467387692404358116883839070632e323228496")) | L | C | |
|---|---|---|---|
| real->bigfloat | /usr/share/racket/pkgs/math-lib/math/private/bigfloat/mpfr.rkt | 470 | 0 |
| ...row-higher-order.rkt:375:33 | /usr/share/racket/collects/racket/contract/private/arrow-higher-order.rkt | 375 | 33 |
| arg->precision | /home/nightlies/herbie/arb-support/src/programs.rkt | 138 | 11 |
| f | /home/nightlies/herbie/arb-support/src/programs.rkt | 190 | 2 |
| (unnamed) | /home/nightlies/herbie/arb-support/src/ground-truth.rkt | 23 | 2 |
| search-step | /home/nightlies/herbie/arb-support/src/searchreals.rkt | 37 | 0 |
| find-intervals | /home/nightlies/herbie/arb-support/src/searchreals.rkt | 87 | 0 |
| make-sampler | /home/nightlies/herbie/arb-support/src/sampling.rkt | 94 | 0 |
| sample-points | /home/nightlies/herbie/arb-support/src/ground-truth.rkt | 64 | 0 |
| setup-context! | /home/nightlies/herbie/arb-support/src/mainloop.rkt | 293 | 0 |
| get-alternatives/report | /home/nightlies/herbie/arb-support/src/sandbox.rkt | 148 | 0 |
| (unnamed) | /home/nightlies/herbie/arb-support/src/sandbox.rkt | 247 | 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 |