similar to: Euler identity with complex exp

Displaying 20 results from an estimated 3000 matches similar to: "Euler identity with complex exp"

2010 Mar 25
2
print(big+small*1i) -> big + 0i
Should both parts of a complex number be printed to the same precision? The imaginary part of 0 looks a bit odd when log10(real/imag) >=~ getOption("digits"), but I'm not sure it is awful. Some people might expect the same number of significant digits in the two parts. > 1e7+4i [1] 10000000+0i > 1e7+5i [1] 10000000+0i > 1e10 + 1000i [1] 1e+10+0e+00i >
2011 Jul 08
1
computing functions with Euler's number (e^n)
I am trying to create a set of wavelets in frequency space--namely Cauchy wavelets for an intensity analysis (von Tscharner, 2000). The wavelets are defined by the following formula: [(f/cf)^(cf*scale)]*[e^((-f/cf)+1)^(cf*scale)] where *f *is frequency of length *n*, *cf* is center frequency (defined below) and is an array of *j *columns and *n* row, and scale is a constant. cf = (1/scale)*(j
2005 Feb 16
3
real and complex vectors
The following caught me off-guard: R> z <- 1i + 1:10 R> z <- Re(z) R> z [1] 1 2 3 4 5 6 7 8 9 10 as expected. But look: R> z <- 1i + 1:10 R> make.real <- abs(z) < 1000 R> z[make.real] <- Re(z[make.real]) R> z [1] 1+0i 2+0i 3+0i 4+0i 5+0i 6+0i 7+0i 8+0i 9+0i 10+0i R> didn't make z a real vector, which is what I wanted.
2017 May 04
2
complex tests failure
For a while I have been getting that the complex tests fails on RHEL 6. The specific issue has to do with tanh (see below for full output from complex.Rout.fail). This is both with the stock compiler (GCC 4.4.7) and a compiler supplied through the conda project (GCC 4.8.5). The compiler supplied through conda ends up linking R to certain system files, so the binary is not completely independent
2013 Jun 18
1
eigen(symmetric=TRUE) for complex matrices
R-3.0.1 rev 62743, binary downloaded from CRAN just now; macosx 10.8.3 Hello, eigen(symmetric=TRUE) behaves strangely when given complex matrices. The following two lines define 'A', a 100x100 (real) symmetric matrix which theoretical considerations [Bochner's theorem] show to be positive definite: jj <- matrix(0,100,100) A <- exp(-0.1*(row(jj)-col(jj))^2) A's being
2008 Jul 11
1
Comparing complex numbers
Is there an easy way to compare complex numbers? Here is a small example: > (z1=polyroot(c(1,-.4,-.45))) [1] 1.111111-0i -2.000000+0i > (z2=polyroot(c(1,1,.25))) [1] -2+0i -2+0i > x=0 > if(any(identical(z1,z2))) x=99 > x [1] 0 # real and imaginary parts: > Re(z1); Im(z1) [1] 1.111111 -2.000000 [1] -8.4968e-21 8.4968e-21 > Re(z2); Im(z2) [1] -2
2016 May 05
1
Too many spaces in deparsed complex numbers with digits17 control option
If you set the "digits17" control option in deparse, you get a lot of unnecessary space in the representation of complex numbers. > deparse(0 + 0i) [1] "0+0i" > deparse(0 + 0i, control = "digits17") [1] "0 + 0i" As far as I can tell, the logic for this comes from this piece of /src/main/deparse.c: if (TYPEOF(vector) == CPLXSXP
2017 May 04
2
complex tests failure
Thanks. I assume there is no way to control this via. environment variables or configure settings? Obviously that would be great for something like this which affects tests and seems to be a known problem for older C standard libraries. Best, Kasper On Thu, May 4, 2017 at 9:12 AM, Tomas Kalibera <tomas.kalibera at gmail.com> wrote: > > As a quick fix, you can undefine HAVE_CTANH
2017 May 05
1
complex tests failure
Thanks for the report, handled in configure in 72661 (R-devel). I'll also port to R-patched. Best Tomas On 05/04/2017 03:49 PM, Tomas Kalibera wrote: > > There is no way to control this at runtime. > We will probably have to add a configure test. > > Best, > Tomas > > On 05/04/2017 03:23 PM, Kasper Daniel Hansen wrote: >> Thanks. >> >> I assume there
2002 Sep 26
3
error with complex solve (PR#2068)
Full_Name: John Peters Version: 1.5.1 OS: Windows 2000 Submission from: (NULL) (130.155.2.3) solve(a,b) with two arguments gives an error if a is complex and b is a vector: > a_matrix(c(1,2+3i,3,2),ncol=2) > a [,1] [,2] [1,] 1+0i 3+0i [2,] 2+3i 2+0i > b_c(2,2+1i) > solve(a,b) Error in solve.default(a, b) : A must be a complex matrix > is.complex(a) [1] TRUE >
2003 Oct 09
1
S4 group generic Complex not working (PR#4483)
The Complex group generic for S4 methods is not working: > setClass('foo', representation(z='complex')) [1] "foo" > setMethod('Complex', 'foo', function(z) callGeneric(z@z)) [1] "Complex" > Arg(new('foo', z=1+0i)) Error in Arg(new("foo", z = 1 + (0+0i))) : non-numeric argument to function > The fix is
2009 Dec 08
1
Modula Generators
Hi all, Is there function on R for calculating Modula generators? For example for primes above 100, e.g 157, i want to know which number generates the group under multiplication mod 157. i.e i want to find an element whose order is 156. The problem I occur is that modular arithmetic becomes inaccurate when dealing with large numbers. Thanks for any help given. Sam [[alternative HTML
2011 Sep 23
1
Cross Spectrum : Conversion of 2-D spectrum into a single complex array
Hi, I'm wondering why the spectrum() phase of quadrature couple isn't purely +/-pi. But mostly, I'm looking for a recommended way to take a 2-D spectrum and convert it into a single complex array. Kindly consider: # 10 Hz sine wave 10 seconds long sampled at 50 Hz deltaT = 1/50 t = seq(0, 10, deltaT) w = 2 * pi * 10 x = ts( sin( w * t ), deltat = deltaT ) y = ts( sin(
2016 May 28
1
complex NA's match(), etc: not back-compatible change proposal
On 'factor', I meant the case where 'levels' is not specified, where 'unique' is called. > factor(c(complex(real=NaN), complex(imaginary=NaN))) [1] NaN+0i <NA> Levels: NaN+0i Look at <NA> in the result above. Yes, it happens in earlier versions of R, too. On matching both NA and NaN, another consequence is that length(unique(.)) may depend on order.
2017 May 04
0
complex tests failure
As a quick fix, you can undefine HAVE_CTANH in complex.c, somewhere after including config.h An internal substitute, which is implemented inside complex.c, will be used. Best Tomas On 05/04/2017 02:57 PM, Kasper Daniel Hansen wrote: > For a while I have been getting that the complex tests fails on RHEL 6. > The specific issue has to do with tanh (see below for full output from >
2017 May 04
0
complex tests failure
There is no way to control this at runtime. We will probably have to add a configure test. Best, Tomas On 05/04/2017 03:23 PM, Kasper Daniel Hansen wrote: > Thanks. > > I assume there is no way to control this via. environment variables or > configure settings? Obviously that would be great for something like > this which affects tests and seems to be a known problem for older
2003 Apr 24
2
R-1.7.0 build feedback: NetBSD 1.6 (PR#2837)
R-1.7.0 built on NetBSD 1.6, but the validation test suite failed: Machinetype: Intel Pentium III (600 MHz); NetBSD 1.6 (GENERIC) Remote gcc version: gcc (GCC) 3.2.2 Remote g++ version: g++ (GCC) 3.2.2 Configure environment: CC=gcc CXX=g++ LDFLAGS=-Wl,-rpath,/usr/local/lib make[5]: Entering directory `/local/build/R-1.7.0/src/library' >>> Building/Updating
2018 Jul 06
4
join samba to an existing AD failed
Hello, I was trying to join a samba DC to an existing AD. But it failed when I used the command ‘samba-tool domain join euler.huawei.com DC ‘ to join it to the domain. Here’s the log: euler-2:/usr/custom # samba-tool domain join euler.huawei.com DC --option='idmap_ldb:use rfc2307 = yes' -U vdsadmin at euler.huawei.com Finding a writeable DC for domain 'euler.huawei.com'
2016 May 10
1
complex NA's match(), etc: not back-compatible change proposal
This is an RFC / announcement related to the 2nd part of PR#16885 https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16885 about complex NA's. The (somewhat rare) incompatibility in R's 3.3.0 match() behavior for the case of complex numbers with NA & NaN's {which has been fixed for R 3.3.0 patched in the mean time} triggered some more comprehensive "research". I
2010 Mar 27
3
Calculate variance/covariance with complex numbers
Anybody knows what functions can be used to calculate variance/covariance with complex numbers? var and cov don't seem to work: > a 1 V1 0.00810014+0.00169366i V2 0.00813054+0.00158251i V3 0.00805489+0.00163295i V4 0.00809141+0.00159533i V5 0.00813976+0.00161850i > var(a) 1 1 1.141556e-09 Warning message: In var(a) : imaginary parts discarded in