similar to: BUG: atan(1i) / 5 = NaN+Infi ?

Displaying 20 results from an estimated 1000 matches similar to: "BUG: atan(1i) / 5 = NaN+Infi ?"

2024 Sep 06
1
BUG: atan(1i) / 5 = NaN+Infi ?
G.5.1 para 2 can be found in the C17 standard -- I actually have the final draft not the published standard. It's in earlier standards, I just didn't check earlier standards. Complex arithmetic was not in the first C standard (C89) but was in C99. The complex numbers do indeed form a field, and Z*W invokes an operation in that field when Z and W are both complex numbers. Z*R and R*Z,
2024 Sep 05
0
BUG: atan(1i) / 5 = NaN+Infi ?
On 2024-09-05 6:12 p.m., Leo Mada wrote: > Dear Duncan, > > Here is also the missing information: > R version 4.4.1 (2024-06-14 ucrt) > Platform: x86_64-w64-mingw32/x64 > Running under: Windows 10 x64 (build 19045) > > Regarding the results: > atan(1i) > #?0+Infi > Re(atan(1i)) > # 0 > Im(atan(1i)) > #? Inf > > 0 + Inf i is a valid complex number:
2024 Sep 05
1
BUG: atan(1i) / 5 = NaN+Infi ?
Dear Bert, These behave like real divisions/multiplications: complex(re=Inf, im = Inf) * 5 # Inf+Infi complex(re=-Inf, im = Inf) * 5 # -Inf+Infi The real division / multiplication should be faster and also is well behaved. I was expecting R to do the real division/multiplication on a complex number. Which R actually does for these very particular cases; but not when only Im(x) is Inf.
2024 Sep 05
2
BUG: atan(1i) / 5 = NaN+Infi ?
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 were some changes in handling of complex numbers. But it looks like a bug. Sincerely, Leonard [[alternative HTML version deleted]]
2024 Sep 06
1
BUG: atan(1i) / 5 = NaN+Infi ?
I expect that atan(1i) = (0 + infinity i) and that atan(1i)/5 = (0 + infinity i)/5 = (0 + infinity i). Here's what I get in C: (0,1) = (0, 1) atan((0,1)) = (0, inf) atan((0,1))/5 = (0, inf) Note the difference between I*infinity = (0,1)*infinity = (0*infinity,1*infinity) = (NaN,infinity) and (0,infinity)/5 = (0/5,infinity/5) = (0,infinity). The former involves multiplying 0 by infinity, which
2024 Sep 05
1
BUG: atan(1i) / 5 = NaN+Infi ?
> complex(real = 0, imaginary = Inf) [1] 0+Infi > Inf*1i [1] NaN+Infi >> complex(real = 0, imaginary = Inf)/5 [1] NaN+Infi See the Note in ?complex for the explanation, I think. Duncan can correct if I'm wrong. -- Bert On Thu, Sep 5, 2024 at 3:20?PM Leo Mada <leo.mada at syonic.eu> wrote: > Dear Bert, > > These behave like real divisions/multiplications: >
2024 Sep 05
3
BUG: atan(1i) / 5 = NaN+Infi ?
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
2024 Sep 05
2
BUG: atan(1i) / 5 = NaN+Infi ?
Perhaps > Inf*1i [1] NaN+Infi clarifies why it is *not* a bug. (Boy, did that jog some long dusty math memories :-) ) -- Bert On Thu, Sep 5, 2024 at 2:48?PM Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > 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. > >
2024 Sep 06
1
BUG: atan(1i) / 5 = NaN+Infi ?
On 2024-09-06 12:44 a.m., Richard O'Keefe wrote: > I expect that atan(1i) = (0 + infinity i) and that atan(1i)/5 = (0 + > infinity i)/5 = (0 + infinity i). > Here's what I get in C: > (0,1) = (0, 1) > atan((0,1)) = (0, inf) > atan((0,1))/5 = (0, inf) > > Note the difference between I*infinity = (0,1)*infinity = > (0*infinity,1*infinity) = (NaN,infinity) > and
2024 Sep 06
1
BUG: atan(1i) / 5 = NaN+Infi ?
>>>>> Richard O'Keefe >>>>> on Fri, 6 Sep 2024 17:24:07 +1200 writes: > The thing is that real*complex, complex*real, and complex/real are not > "complex arithmetic" in the requisite sense. > The complex numbers are a vector space over the reals, Yes, but they _also_ are field (and as others have argued mathematically only
2024 Sep 06
1
BUG: atan(1i) / 5 = NaN+Infi ?
The thing is that real*complex, complex*real, and complex/real are not "complex arithmetic" in the requisite sense. The complex numbers are a vector space over the reals, and complex*real and real*complex are vector*scalar and scalar*vector. For example, in the Ada programming language, we have function "*" (Left, Right : Complex) return Complex; function "*" (Left :
2024 Sep 05
2
BUG: atan(1i) / 5 = NaN+Infi ?
atan(1i) -> 0 + Inf i complex(1/5) -> 0.2 + 0i atan(1i) -> (0 + Inf i) * (0.2 + 0i) -> 0*0.2 + 0*0i + Inf i * 0.2 + Inf i * 0i infinity times zero is undefined -> 0 + 0i + Inf i + NaN * i^2 -> 0 + 0i + Inf i - NaN -> NaN + Inf i I am not sure how complex arithmetic could arrive at another answer. I advise against messing with infinities... use atan2() if you don't
2006 Mar 28
2
atan2(1,1i)
Hi ?atan2 says that atan2(y,x)=atan(y/x) for x and y numeric or complex vectors. Well, I would expect atan2(1,1i) to be equal to atan(-1i), but > atan2(1,1i) Error in atan2(y, x) : Non-numeric argument to mathematical function > R.version _ platform powerpc-apple-darwin8.5.0 arch powerpc os darwin8.5.0 system powerpc, darwin8.5.0
2006 Mar 28
2
atan2(1,1i)
Hi ?atan2 says that atan2(y,x)=atan(y/x) for x and y numeric or complex vectors. Well, I would expect atan2(1,1i) to be equal to atan(-1i), but > atan2(1,1i) Error in atan2(y, x) : Non-numeric argument to mathematical function > R.version _ platform powerpc-apple-darwin8.5.0 arch powerpc os darwin8.5.0 system powerpc, darwin8.5.0
2005 May 16
1
branch cuts of atan()
Hi the following gave me a shock: > atan(2) [1] 1.107149 > atan(2+0i) [1] -0.4636476+0i > or, perhaps more of a gotcha: > atan(1.0001+0i) [1] -0.7853482+0i > atan(0.9999+0i) [1] 0.7853482+0i > evidently atan()'s branch cuts aren't where I thought they were. Where do I look for documentation on this? -- Robin Hankin Uncertainty Analyst National
2004 Jan 21
2
derivative of atan(x) and similar functions
Dear R experts. 'D()' function recognizes some of the analitical functions, such as sin, cos, etc. But I'd like to take analytical derivatives from asin, atan etc. functions. Are there any R packages providing that features? Thanks. -- Timur.
1997 Apr 23
1
R-beta: Version 0.49 Released
The newest version of R for Unix (version 0.49) is now available (or soon will be) from the following sites. NORTH AMERICA: http://lib.stat.cmu.edu/R/Alpha EUROPE: ftp://ftp.stat.math.ethz.ch/R/ ftp://statlab.uni-heidelberg.de/pub/mirrors/auckland/R/ JAPAN: ftp://ftp.u-aizu.ac.jp/pub/lang/R/ NEW ZEALAND: ftp://stat.auckland.ac.nz/pub/R/ Please
1997 Apr 23
1
R-beta: Version 0.49 Released
The newest version of R for Unix (version 0.49) is now available (or soon will be) from the following sites. NORTH AMERICA: http://lib.stat.cmu.edu/R/Alpha EUROPE: ftp://ftp.stat.math.ethz.ch/R/ ftp://statlab.uni-heidelberg.de/pub/mirrors/auckland/R/ JAPAN: ftp://ftp.u-aizu.ac.jp/pub/lang/R/ NEW ZEALAND: ftp://stat.auckland.ac.nz/pub/R/ Please
1997 Apr 23
1
R-beta: Version 0.49 Released
The newest version of R for Unix (version 0.49) is now available (or soon will be) from the following sites. NORTH AMERICA: http://lib.stat.cmu.edu/R/Alpha EUROPE: ftp://ftp.stat.math.ethz.ch/R/ ftp://statlab.uni-heidelberg.de/pub/mirrors/auckland/R/ JAPAN: ftp://ftp.u-aizu.ac.jp/pub/lang/R/ NEW ZEALAND: ftp://stat.auckland.ac.nz/pub/R/ Please
2011 Feb 25
0
R 2.12.2 is released
I've rolled up R-2.12.2.tar.gz a short while ago. This is an update release, which fixes a number of mostly minor issues, and one major issue in which complex arithmetic was being messed up on some compiler platform. You can get it from http://cran.r-project.org/src/base/R-2/R-2.12.2.tar.gz or wait for it to be mirrored at a CRAN site nearer to you. Binaries for various platforms will