search for: imaginary

Displaying 20 results from an estimated 370 matches for "imaginary".

2009 Aug 02
1
Inaccurate complex arithmetic of R (Matlab is accurate)
...:(n-1)] sum(100*(x1-x2^2)^2 + (1-x2)^2) } x0 <- c(0.0094, 0.7146, 0.2179, 0.6883, 0.5757, 0.9549, 0.7136, 0.0849, 0.4147, 0.4540) h <- c(1.e-15*1i, 0, 0, 0, 0, 0, 0, 0, 0, 0) xh <- x0 + h rx <- rosen(xh) Re(rx) Im (rx) # rx = 190.3079796814885 - 12.13915588266717e-15 i # incorrect imaginary part in R However, the imaginary part of the above answer is inaccurate. The correct imaginary part (from Matlab) is: 190.3079796814886 - 4.66776376640000e-15 i # correct imaginary part from Matlab This inaccuracy is serious enough to affect the acuracy of the compex-step gradient drastically....
2024 Mar 25
4
as.complex()
Needing a < , > comparison for imaginary numbers
2006 Jan 18
1
function 'eigen' (PR#8503)
...(NULL) (132.204.120.81) I am reporting the mis-behaviour of the function 'eigen' in 'base', for the following input matrix: A <- matrix(c(2,3,4,-1,3,1,1,-2,0),3,3) eigen(A) I obtain the following results, which are incorrect for eigenvalues and eigenvectors 2 and 3 (incorrect imaginary portions): $values [1] 3+0.000000e+00i 1+1.869518e-08i 1-1.869518e-08i $vectors [,1] [,2] [,3] [1,] -0.5345225+0i 4.720910e-17+2.643897e-09i 4.720910e-17-2.643897e-09i [2,] -0.2672612+0i 7.071068e-01+0.000000e+00i 7.071068e-01+0.000000e+00i...
2013 Sep 18
1
getParseData() for imaginary numbers
Hi, The imaginary unit is gone in the 'text' column in the returned data frame from getParseData(), e.g. in the example below, perhaps the text should be 1i instead of 1: > p=parse(text='1i') > getParseData(p) line1 col1 line2 col2 id parent token terminal text 1 1 1 1 2 1...
2010 Dec 13
2
1.8.1: playing imaginary sound files
............ -- Executing [s at incoming-pstn-line:5] VoiceMail("DAHDI/4-1", "100 at default,u") in new stack -- <DAHDI/4-1> Playing '/var/spool/asterisk/voicemail/default/100/unavail.gsm' (language 'en') .......... But there is no /var/spool/asterisk/voicemail/default/100/unavail.gsm', indeed no unavail.gsm on the machine. [asterisk at
2023 Apr 14
1
Possible inconsistency between `as.complex(NA_real_)` and the docs
Hi all, Surprisingly (at least to me), `as.complex(NA_real_)` results in `complex(real = NA_real_, imaginary = 0)` rather than `NA_complex_`. It seems to me that this goes against the docs of `as.complex()`, which say this in the Details section: "Up to R versions 3.2.x, all forms of NA and NaN were coerced to a complex NA, i.e., the NA_complex_ constant, for which both the real and imaginary parts...
2010 Oct 07
1
Forecasting with R/Need Help. Steps shown below with the imaginary data
1. This is an imaginary data on monthly outcomes of 2 years and I want to forecast the outcome for next 12 months of next year. data Data1; input Yr Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec; datalines; 2008 12 13 12 14 13 12 11 15 10 12 12 12 2009 12 13 12 14 13 12 11 15 10 12 12 12 ; run; I converted the abo...
2010 Aug 16
3
parkcall: How to remove announcement.
Hello all, I want to park calls using the callpark application, but I don't want to hear the saydigit when the called is parked. To resolve this issue I use the following instruction in the dialplan: exten => _8XX,1,ParkAndAnnounce(|1000|local/10 at default|) Because local/10 at default is not defined to a peer I get a lot of warnings. :( Is there a better way to resolve this
2012 Feb 07
2
Help need
...to try and output values which i have named spectrum. However, I cannot seem to get the answers to come out as a vector which is what i need. They come out as separate values which I am then unable to join together. Thank you for(f in seq(0,0.5,0.1)) { sigmasqaured <- 1 i = complex(real = 0, imaginary = 1) spectrum <- (sigmasqaured)/(abs(1-2.7607*exp(2*pi*i*f)+3.8106*exp(4*pi*i*f)-2.6535*exp(6*pi*i*f)+0.9258*exp(8*pi*i*f))^2) print(spectrum) } [[alternative HTML version deleted]]
2008 Sep 30
1
fft inverse display help
...s 'fi'. Now if I try some filtering and select a few frequencies: ff <- complex(length(fs)) sei <- order(e) ff[sei[1:40]] <- fs[sei[1:40]] fi <- fft(ff, inverse=TRUE) / length(ff) plot(fi, main = "After filter") Now I ge the x-asis as the real component and y-axis as imaginary component. When does the display switch? How many frequencies do I select before I get the 'Time' axis back? From the above I am selecting 40 (out of 1500). Thank you. Kevin
2007 Sep 01
5
Friday question: negative zero
...1/y [1] -Inf The other day I came across one in complex numbers, and it took me a while to figure out that negative zero was what was happening: > x <- complex(real = -1) > x [1] -1+0i > 1/x [1] -1+0i > x^(1/3) [1] 0.5+0.8660254i > (1/x)^(1/3) [1] 0.5-0.8660254i (The imaginary part of 1/x is negative zero.) As a Friday question: are there other ways to create and detect negative zero in R? And another somewhat more serious question: is the behaviour of negative zero consistent across platforms? (The calculations above were done in Windows in R-devel.) Duncan Mur...
2006 Oct 31
1
ZFS thinks my 7-disk pool has imaginary disks
Hi all, I recently created a RAID-Z1 pool out of a set of 7 SCSI disks, using the following command: # zpool create magicant raidz c5t0d0 c5t1d0 c5t2d0 c5t3d0 c5t4d0 c5t5d0 c5t6d0 It worked fine, but I was slightly confused by the size yield (99 GB vs the 116 GB I had on my other RAID-Z1 pool of same-sized disks). I thought one of the disks might have been to blame, so I tried swapping it out
2019 Aug 29
2
Complex proposal v2
...ing floating point types - Made complex a special aggregate - Specified literal syntax - Added special index values "real" and "imag" for insertvalue/extractvalue of complex - Added czip intrinsic to create vector of complex from vectors of real/imaginary - Added extractreal and extractimag intrinsics for vectors of complex - Added masked vector intrinsics Abstract -------- Several vendors and individuals have proposed first-class complex support in LLVM. Goals of this proposal include better optimization, diagnostics and general user e...
2019 Jul 01
14
RFC: Complex in LLVM
...ture types containing two scalar fields, for example {double, double}. Consequently, arrays of complex type are represented as, for example, [8 x {double, double}]. This has consequences for how clang converts complex operations to LLVM IR. In general, clang emits loads of the individual real and imaginary parts and feeds them into arithmetic operations. Vectorization results in many shufflevector operations to massage the data into sequences suitable for vector arithmetic. All of the real/imaginary data manipulation obscures the underlying arithmetic. It makes it difficult to reason about the alg...
2003 Jan 09
1
fft(x, inv=TRUE)
I started out with a real vector b and then obtained its Fourier transform thus B<-fft(b) When I did F<-fft(B, inv=TRUE) I expected that F would be the inverse FT of B but it still has imaginary components. Should the inverse FT not be purely real? Am I missing something? Thanks, Peter.
2011 Feb 22
1
regsubsets {leaps}
Hi, I'd like to run regsubsets for model selection by exhaustive search. I have a list with 20 potential explanatory variables, which represent the real and the imaginary parts of 10 "kinds" of complex numbers: x <- list(r1=r1, r2=r2, r3=r3, ..., r10=r10, i1=i1, i2=i2, i3=i3, ..., i10=i10) Is there an easy way to constrain the model search so that "r"s and "i"s are treated as pairs that should always appear together in the models?...
2013 Aug 15
1
format bug and patch
...some bug fixes. The first bug I tried to solve was https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15411 I have attached a patch with the fix to the bug and would love to hear comments about its quality. Also, while testing this bug I found another related issue: > format(complex(real=10, imaginary=4), digits = 1); [1] "10+0i" I think this should've been "10+4i". I have entered this as a bug #15427. But a patch for formatComplex() would be a bigger change, than the patch for formatReal() I made. So, before I start, I would like to gauge your opinion. Do you agree it...
2010 Mar 27
3
Calculate variance/covariance with complex numbers
...iance 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 coercion > cov(a) 1 1 1.141556e-09 Warning message: In cov(a) : imaginary parts discarded in coercion Thanks in advance, Gang
2020 Nov 18
2
Complex proposal v3 + roundtable agenda
Krzysztof Parzyszek via llvm-dev <llvm-dev at lists.llvm.org> writes: > Examples of complex instructions? Sorry, I was referring specifically to this statement: >> Without intrinsics it may be hard to use such instructions especially >> because of the arithmetic simplifications. I was asking the question in the context of intrinsics vs. a first-class complex type.
2016 Dec 13
0
LLD status update and performance chart
...e only goal. I believe this has clearly been put *ahead* the other design aspects I mentioned, isn’t it? > Medhi, please tell how you would *actually* layer linkers with fine-grained components. That’s not a bait I’m gonna bite. > You are just saying that the current LLD is worse than an imaginary super-beautiful linker. Using superlative and trying to qualify what I’m writing with "imaginary super-beautiful linker” is just caricatural and diverting the whole point. LLVM is quite far from an "imaginary super-beautiful compiler framework”, yet it is modular and usable as a library....