Displaying 20 results from an estimated 30000 matches similar to: "R-beta: Version 0.49 Released"
2024 Sep 06
0
BUG: atan(1i) / 5 = NaN+Infi ?
It seems to me that the documentation of R's complex class & R's atan function do not tell us what to expect, so (as others have suggested), some additional notes are needed. I think that mathematically atan(1i) should be NA_complex_, but R seems not to use any mathematically standard compactification of the complex plane (and I'm not sure that IEEE does either).
Incidentally, the
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 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 ?
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
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 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 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
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 ?
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 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 ?
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 :
2017 Mar 21
0
Hyperbolic tangent different results on Windows and Mac
>>>>> Rodrigo Zepeda <rzepeda17 at gmail.com>
>>>>> on Fri, 17 Mar 2017 12:56:06 -0600 writes:
> Dear all,
> We seem to have found a "strange" behaviour in the hyperbolic tangent
> function tanh on Windows.
> When running tanh(356 + 0i) the Windows result is NaN + 0.i while on Mac
> the result is 1 + 0i. It
1997 Nov 06
0
R-beta: graphics: ``gamma correction'' -- state / feedback ?
In 'CHANGES' of 0.49, you find among "NEW FEATURES"
o There is a new graphical parameter "gamma" which is designed to
let users apply a ``gamma'' correction for their graphics
displays. Most monitors produce a color intensity which is
related to voltage by the equation
intensity = voltage ^ gamma
with gamma about 2.5 for most PC monitors.
2010 May 05
1
testInstalledBasic question
Hi,
I'm currently in the process of writing an R-installation SOP for my
company. As part of that process I'm using the recommendations from the 'R
Installation and Administration' document, section 3.2, "Testing an
installation". This is done on an XP machine, using the latest binary of
2.11.0.
The binary is downloaded and then installed from the installer. I then
1997 Jun 07
1
R-beta: Encapsulated Postscript output with R-0.49
I've noticed that the postscript files produced by R-0.49
come up inverted in my postscript previewer. Also, they
do not behave like encapsulated postscript files so they
can't be imported into LaTeX documents. If I remove lines
with page-oriented commands like "%%Page", "%%Orientation",
"\bp" and "\ep", the resulting files seem to behave like
1997 Apr 24
0
R-beta: Re: R-0.49 -- '1 bit' patch for postscript bug
Since it is now deep night in NZ, and the two R&R's did not yet send it to
this list :
!!>> The postscript bug mentioned in 0.49 has a "1 bit" patch:
Replace '0' by '1' in one place of the source and recompile, i.e.,
type 'make' again in $RHOME, i.e. the directory which should end in .../R-0.49
>> Date: Thu, 24 Apr 1997 21:35:41 +1200
1997 Apr 24
0
R-beta: Device: PostScript v. 0.49
On Wed, 23 Apr 1997, Janusz Kawczak Wrote:
>I have a problem with opening the postscript device in the newly
>compiled R (v. 0.49). This problem was not present in 0.16.1 version.
>
>After entering:
><R>postscript("try.ps")
>I get:
>Error in device("postscript", as.character(c(file, paper, family, bg, : unable
>to start device postscript
>
2006 Aug 30
1
setMethod() and log()
Hi
I am having difficulty with setMethod(). I have a "brob" class of
objects whose
representation has two slots: "x" and "positive". Slot "x" (double)
holds the log
of a number and slot "positive" (logical) its sign. The idea is
that large numbers
can be handled.
I'm trying to implement a log() method using an analogue of the
2011 Jun 29
0
Error in testInstalledBasic
Hi,
I am running R 2.13.0 on a Windows 7 machine.
I ran the script:
testInstalledBasic('devel')
and received the following warning message:
running tests of consistency of as/is.*
creating ?isas-tests.R?
running code in ?isas-tests.R?
comparing ?isas-tests.Rout? to ?isas-tests.Rout.save? ...running tests of random deviate generation -- fails occasionally
running code in
2010 Sep 21
2
Need help for EM algorithm ASAP !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I created a EM algorithm for Generalized hyperbolic distribution.
I want to estimate mutheldaplus, sigmatheldaplus, betasigmaplus in my code.
After getting use these value , then my iteration have to be begin of this code.
But I can not to do iteration part.
Can you help me use my code and get iteration ?
Do know any useful code for EM algorithm for Generalized Hyperbolic
library(QRMlib)