Displaying 14 results from an estimated 14 matches for "cospi".
Did you mean:
compi
2009 May 14
2
How to do a pretty panel plot?
...----------------------------------------------------------
M <- structure(list(date = structure(c(13634, 13665, 13695, 13726,
13757, 13787, 13818, 13848, 13879, 13910, 13939, 13970, 14000,
14031, 14061, 14092, 14123, 14153, 14184, 14214, 14245, 14276,
14304, 14335), class = "Date"), cospi = c(1987.31, 2033.37, 2140.13,
2120.66, 2427.09, 2917.7, 2915.28, 3262.06, 2616.26, 2617.75,
2277.69, 2538.13, 2374.09, 1911.22, 2063.73, 2081.28, 1813.58,
1304.96, 1219.73, 1361.74, 1299.2, 1242.74, 1339.18, 1557.29),
cospi.PE = c(19.2, 19.69, 20.13, 24.08, 27.61, 30.9, 30.69,
34.92,...
2016 Dec 01
1
Different results for cos,sin,tan and cospi,sinpi,tanpi
...TION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
It's not a very good example...
f0<-function(x,y)exp(complex(real=x,imag=y))
f1<-function(x,y)complex(real=exp(1)^x*cos(y),imag=exp(1)^x*sin(y))
f2<-function(x,y)complex(real=exp(1)^x*cospi(y/pi),imag=exp(1)^x*sinpi(y/pi))
f0(700,1.23)
f1(700,1.23)
f2(700,1.23)
f0(700,1.23e23)
f1(700,1.23e23)
f2(700,1.23e23)
Garbage number is required.
Thank you!
2016-12-01 18:31 GMT+09:00 Prof Brian Ripley <ripley at stats.ox.ac.uk>:
> Please note that you need to report your platforms...
2016 Dec 01
2
Different results for cos,sin,tan and cospi,sinpi,tanpi
Hi,
i try sin, cos, and tan.
> sapply(c(cos,sin,tan),function(x,y)x(y),1.23e45*pi)
[1] 0.5444181 0.8388140 1.5407532
However, *pi results the following
> sapply(c(cospi,sinpi,tanpi),function(x,y)x(y),1.23e45)
[1] 1 0 0
Please try whether the following becomes all right.
diff -ruN R-3.3.2.orig/src/nmath/cospi.c R-3.3.2/src/nmath/cospi.c
--- R-3.3.2.orig/src/nmath/cospi.c 2016-09-15 07:15:31.000000000 +0900
+++ R-3.3.2/src/nmath/cospi.c 2016-12-01 13:54:38....
2016 Dec 01
0
Different results for cos,sin,tan and cospi,sinpi,tanpi
Please note that you need to report your platforms (as per the posting
guide), as the C function starts
#ifdef HAVE_COSPI
#elif defined HAVE___COSPI
double cospi(double x) {
return __cospi(x);
}
And AFAICS the system versions on Solaris and OS X behave the same way
as R's substitute.
On 01/12/2016 09:12, Martin Maechler wrote:
>>>>>> Martin Maechler <maechler at stat.math.ethz.ch>...
2016 Sep 09
3
Different results for tan(pi/2) and tanpi(1/2)
As the subject line says, we get different results for tan(pi/2) and
tanpi(1/2), though this should not be the case:
> tan(pi/2)
[1] 1.633124e+16
> tanpi(1/2)
[1] NaN
Warning message:
In tanpi(1/2) : NaNs produced
By redefining tanpi with sinpi and cospi, we can get closer:
> tanpi <- function(x) sinpi(x) / cospi(x)
> tanpi(c(0, 1/2, 1, 3/2, 2))
[1] 0 Inf 0 -Inf 0
Hans Werner
2016 Dec 01
2
Different results for cos,sin,tan and cospi,sinpi,tanpi
...> on Thu, 1 Dec 2016 14:39:55 +0900 writes:
>> Hi,
>> i try sin, cos, and tan.
>>> sapply(c(cos,sin,tan),function(x,y)x(y),1.23e45*pi)
>> [1] 0.5444181 0.8388140 1.5407532
>> However, *pi results the following
>>> sapply(c(cospi,sinpi,tanpi),function(x,y)x(y),1.23e45)
>> [1] 1 0 0
>> Please try whether the following becomes all right.
> [..............................]
> Yes, it does -- the fix will be in all future versions of R.
oops.... not so quickly, Martin!
Of course, the resul...
2017 Feb 17
1
Wish List: Extensions to the derivatives table
...ll("/", D(expr[[2]], name), make.call("+", 1., expr[[2]])),
log2 = make.call("/", make.call("/", D(expr[[2]], name), expr[[2]]), quote(log(2)) ),
log10 = make.call("/", make.call("/", D(expr[[2]], name), expr[[2]]), quote(log(10)) ),
cospi = make.call("*", make.call("*", make.call("sinpi", expr[[2]]), make.call("-", D(expr[[2]], name))), quote(pi)),
sinpi = make.call("*", make.call("*", make.call("cospi", expr[[2]]), D(expr[[2]], name)), quote(pi)),
tanpi = mak...
2017 Feb 17
4
Wish List: Extensions to the derivatives table
...anguage. R is faster but less flexible, since that table is programmed in C. It would be useful if R provided a mechanism for extending the derivative table, or barring that, provided a broader table. Currently unsupported mathematical functions of one argument include expm1, log1p, log2, log10, cospi, sinpi, and tanpi.
While manual differentiation of these proposed additions is straight-forward, their absence complicates what otherwise could be much simpler, such as using deriv() or deriv3() to generate functions, for example to use as an nls model.
Thanks,
[[alternative HTML version delete...
2016 Sep 09
3
Different results for tan(pi/2) and tanpi(1/2)
...tanpi(1/2), though this should not be the case:
>>
>> > tan(pi/2)
>> [1] 1.633124e+16
>>
>> > tanpi(1/2)
>> [1] NaN
>> Warning message:
>> In tanpi(1/2) : NaNs produced
>>
>> By redefining tanpi with sinpi and cospi, we can get closer:
>>
>> > tanpi <- function(x) sinpi(x) / cospi(x)
>>
>> > tanpi(c(0, 1/2, 1, 3/2, 2))
>> [1] 0 Inf 0 -Inf 0
>>
>> Hans Werner
>>
>> ______________________________________________
>> R-devel...
2016 Sep 09
0
Different results for tan(pi/2) and tanpi(1/2)
...e case:
>>>
>>> > tan(pi/2)
>>> [1] 1.633124e+16
>>>
>>> > tanpi(1/2)
>>> [1] NaN
>>> Warning message:
>>> In tanpi(1/2) : NaNs produced
>>>
>>> By redefining tanpi with sinpi and cospi, we can get closer:
>>>
>>> > tanpi <- function(x) sinpi(x) / cospi(x)
>>>
>>> > tanpi(c(0, 1/2, 1, 3/2, 2))
>>> [1] 0 Inf 0 -Inf 0
>>>
>>> Hans Werner
>>>
>>> ___________________________...
2017 Feb 17
0
Wish List: Extensions to the derivatives table
...r but less
> flexible, since that table is programmed in C. It would be useful if R
> provided a mechanism for extending the derivative table, or barring that,
> provided a broader table. Currently unsupported mathematical functions of
> one argument include expm1, log1p, log2, log10, cospi, sinpi, and tanpi.
>
> While manual differentiation of these proposed additions is
> straight-forward, their absence complicates what otherwise could be much
> simpler, such as using deriv() or deriv3() to generate functions, for
> example to use as an nls model.
>
> Thanks,
&g...
2003 May 25
3
Vorbis vs Speex
Hi,
I have downloaded Vorbis and played with it, and I have downloaded
Speex but not yet played with it. My understanding is that Vorbis
is targetted at high-quality audio (music) while Speex is targetted
at speech quality audio (telephoney and such). So I have two questions
to ask the group:
1. Which would your experiences show is the better codec for recording
high quality speech such
2017 Aug 18
4
No rule to make target all.R, needed by compiler.rdb building R 3.4.1 from source, Scientific Linux release 6.9 (Carbon)
...library not
generating libtre.a:
*rm -rf libnmath.a*
*ar -cr libnmath.a mlutils.o d1mach.o i1mach.o fmax2.o fmin2.o fprec.o
fround.o ftrunc.o sign.o fsign.o imax2.o imin2.o chebyshev.o log1p.o
expm1.o lgammacor.o gammalims.o stirlerr.o bd0.o gamma.o lgamma.o
gamma_cody.o beta.o lbeta.o polygamma.o cospi.o bessel_i.o bessel_j.o
bessel_k.o bessel_y.o choose.o snorm.o sexp.o dgamma.o pgamma.o qgamma.o
rgamma.o dbeta.o pbeta.o qbeta.o rbeta.o dunif.o punif.o qunif.o runif.o
dnorm.o pnorm.o qnorm.o rnorm.o dlnorm.o plnorm.o qlnorm.o rlnorm.o df.o
pf.o qf.o rf.o dnf.o dt.o pt.o qt.o rt.o dnt.o dchisq.o...
2018 Feb 09
1
R Compilation gets stuck on Windows 64
Please note that building R on Windows is documented in "R Installation
and Administration", including links to external software. Particularly
there is a link to texinfo which is part of Rtools. The documentation is
maintained and it is a sufficient source of information for building R
on Windows.
https://cran.r-project.org/doc/manuals/r-release/R-admin.html