[R] BUG: atan(1i) / 5 = NaN+Infi ?

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Thu Sep 5 23:40:53 CEST 2024


On 2024-09-05 4:23 p.m., Leo Mada via R-help wrote:
> Dear R Users,
> 
> Is this desired behaviour?
> I presume it's a bug.
> 
> atan(1i)
> # 0+Infi
> 
> tan(atan(1i))
> # 0+1i
> 
> atan(1i) / 5
> # NaN+Infi

There's no need to involve atan() and tan() in this:

 > (0+Inf*1i)/5
[1] NaN+Infi

Why do you think this is a bug?

Duncan Murdoch



More information about the R-help mailing list