similar to: atan2(1,1i)

Displaying 20 results from an estimated 1000 matches similar to: "atan2(1,1i)"

2006 Mar 28
1
Help understanding behavior of apply vs sapply
Hi, I was surprised that apply and sapply don't return the same results in the example below. Can someone tell me what I'm missing? > zls <- function(x) character(0) > m <- matrix(0, nrow=2, ncol=2) > apply(m, 1, zls) character(0) > sapply(m, zls) [[1]] character(0) [[2]] character(0) [[3]] character(0) [[4]] character(0) > R.version _
2005 Apr 14
1
Strange behavior of atan2
Dear all, I've got a problem with the function atan2. For a couple of coordinates x and y, This function returns the angle between the vector of coordinates (x, y) and the abscissa axis, i.e. it is the same as atan(y/x) (as indicated on the help page). If we consider the vector with coordinates x = 0 and y = 0, we have the following result: > atan(0/0) [1] NaN This is expected.
2007 Nov 27
3
[LLVMdev] Other Intrinsics?
> > Do you have plans to add other intrinsics? I'm curious as to why there > > is an llvm.sin intrinsic and an llvm.cos intrinsic, but no llvm.atan > > intrinsic. Why is there an llvm.pow intrinsic but no llvm.log > > intrinsic? > > Intrinsics get added on demand. Generally there has to be a good reason > to add them. llvm.sin was implemented (for
2007 Nov 27
0
[LLVMdev] Other Intrinsics?
On Tue, Nov 27, 2007 at 10:50:03AM -0700, Jon Sargeant wrote: > > > Do you have plans to add other intrinsics? I'm curious as to why there > > > is an llvm.sin intrinsic and an llvm.cos intrinsic, but no llvm.atan > > > intrinsic. Why is there an llvm.pow intrinsic but no llvm.log > > > intrinsic? > > > > Intrinsics get added on demand.
2010 Jul 19
5
par("uin") ?
I inherited a function written either for an older version of R or SPlus to draw a brace, "{", in a graph. It uses par("uin") to determine the scaling of the quarter circles that make up segments of the brace, but that setting doesn't exist in current R. I'm guessing that, in the function below, ux, uy can be defined from par("usr") and
2007 Feb 01
3
Need help writing a faster code
Hi, I apologize for this repeat posting, which I first posted yesterday. I would appreciate any hints on solving this problem: I have two matrices A (m x 2) and B (n x 2), where m and n are large integers (on the order of 10^4). I am looking for an efficient way to create another matrix, W (m x n), which can be defined as follows: for (i in 1:m){ for (j in 1:n) { W[i,j] <-
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
2007 Jan 01
4
if ... problem with compound instructions
I am having problems with the 'if' syntax. I have an n x 4 matrix, X say. The first two columns hold x, y values and I am attempting to fill the second two columns with the quadrant in which the datapoint (x, y) is and with the heading angle. So I have two problems 1) how to do this elegantly (at which I've failed as I can't seem to vectorize the problem) and 2) how to
2003 Aug 20
2
Weighted circular mean
Hello, Once again, I posted a message without a subject line. Sorry.... here is the question again. Is there a simple way to modify the circ.mean function in the CircStats package to include a vector of weights to obtain a weighted average angle? Thanks! Martin -- Martin Biuw Sea Mammal Research Unit Gatty Marine Laboratory, University of St Andrews St Andrews, Fife KY16 8PA Scotland Ph:
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
2004 Dec 16
3
Qyery on bark equation in floor0 code
Hi All, I need some clarifications regarding the mismatch I found in the code and the specification. (a) In the specification, the bark(x) equation is given as: bark(x) = 13.1 atan(.00074x) + 2.24 atan(.0000000158(x^2)) + .0001x whereas in the code it is given as: #define toBARK(n) (13.1f*atan(.00074f*(n))+2.24f*atan((n)*(n)*1.85e-8f)+1e-4f*(n)) Which one of these is the proper one ? (b)
2000 Nov 26
2
References for the BARK/MEL stuff
Could someone point me to the BARK/MEL tables that these macros (from vorbis/scales.h) are trying to approximate? #define toBARK(f) (13.1*atan(.00074*(f))+2.24*atan((f)*(f)*1.85e-8)+1e-4*(f)) #define fromBARK(z) (102.*(z)-2.*pow(z,2.)+.4*pow(z,3)+pow(1.46,z)-1.) #define toMEL(f) (log(1.+(f)*.001)*1442.695) #define fromMEL(m) (1000.*exp((m)/1442.695)-1000.) I was wondering if I could come
2009 Sep 23
1
Numerical integration problem
Hi there I'm trying to construct a model of mortality risk in 2D space that requires numerical integration of a hazard function, for which I'm using the integrate function. I'm occasionally encountering parameter combinations that cause integrate to terminate with error "Error in integrate... the integral is probably divergent", which I'm not sure how to interpret. The
2006 Mar 11
5
500 Internal Server error
Sort of new at all this... I installed Ruby on Rails on my Mac according to the instructions on HiveLogic''s blog. I can run the server and even create my database schema automatically. But when I try to open up my results, I end up getting a 500 Internal Server error on my browser. My Unix terminal reads the following: dyld: NSLinkModule() error dyld: Symbol not found:
2006 Mar 29
1
write.table and segment fault?
Hi, I'm experiencing R segmentation faults on multiple versions of R when writing out a particular data.frame: ## dd is a 44 by 3 data.frame load(url("http://stat.bell-labs.com/RS-DBI/download/dd.rda")) write.table(dd, file = "dd.csv", sep = ",", row.names = FALSE) this occurs on > sessionInfo() R version 2.2.0, 2005-10-06, i686-pc-linux-gnu
2007 Jan 19
3
integrate and quadratic forms
Hi all. I'm trying to numerically invert the characteristic function of a quadratic form following Imhof's (1961, Biometrika 48) procedure. The parameters are: lambda=c(.6,.3,.1) h=c(2,2,2) sigma=c(0,0,0) q=3 I've implemented Imhof's procedure two ways that, for me, should give the same answer: #more legible integral1 = function(u) {
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
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.