similar to: Different results for cos,sin,tan and cospi,sinpi,tanpi

Displaying 20 results from an estimated 600 matches similar to: "Different results for cos,sin,tan and cospi,sinpi,tanpi"

2016 Dec 01
2
Different results for cos,sin,tan and cospi,sinpi,tanpi
>>>>> Martin Maechler <maechler at stat.math.ethz.ch> >>>>> on Thu, 1 Dec 2016 09:36:10 +0100 writes: >>>>> Ei-ji Nakama <nakama at ki.rim.or.jp> >>>>> 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)
2016 Dec 01
1
Different results for cos,sin,tan and cospi,sinpi,tanpi
hi, my environment... > sessionInfo() R version 3.3.2 (2016-10-31) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 8 (jessie) locale: [1] LC_CTYPE=ja_JP.UTF-8 LC_NUMERIC=C [3] LC_TIME=ja_JP.UTF-8 LC_COLLATE=ja_JP.UTF-8 [5] LC_MONETARY=ja_JP.UTF-8 LC_MESSAGES=ja_JP.UTF-8 [7] LC_PAPER=ja_JP.UTF-8 LC_NAME=C [9] LC_ADDRESS=C
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
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))
2016 Sep 09
3
Different results for tan(pi/2) and tanpi(1/2)
The same argument would hold for tan(pi/2). I don't say the result 'NaN' is wrong, but I thought, tan(pi*x) and tanpi(x) should give the same result. Hans Werner On Fri, Sep 9, 2016 at 8:44 PM, William Dunlap <wdunlap at tibco.com> wrote: > It should be the case that tan(pi*x) != tanpi(x) in many cases - that is why > it was added. The limits from below and below of the
2016 Sep 09
0
Different results for tan(pi/2) and tanpi(1/2)
If pi were stored and computed to infinite precision then yes we would expect tan(pi/2) to be NaN, but computers in general and R specifically don't store to infinite precision (some packages allow arbitrary (but still finite) precision) and irrational numbers cannot be stored exactly. So you take the value of the built in variable pi, which is close to the theoretical value, but not exactly
2017 Feb 17
1
Wish List: Extensions to the derivatives table
The issue is that without an extensible derivative table or the proposed extensions, it is not possible to automatically produce (without manual modification of the deriv3 output) a function that avoids catastrophic cancellation regardless of the working range. Manual modification is not onerous as a one-time exercise, but can be time consuming when it must be done numerous times, for example
2017 Feb 17
4
Wish List: Extensions to the derivatives table
The derivative table resides in the function D. In S+ that table is extensible because it is written in the S language. 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,
2017 Feb 17
0
Wish List: Extensions to the derivatives table
Hi. Unless I'm misremembering, log, exp, sin, cos, and tan are all handled in deriv3. The functions listed are specially coded slightly more accurate versions but can be substituted with native ones for which deriv/deriv3 will work automatically. I believe that if you write your functions using log(a + 1) instead of log1p(a) or log(x) / log(2) instead of log2(x) deriv3 will work fine.
2009 May 14
2
How to do a pretty panel plot?
The pretty picture that I saw at: http://chartsgraphs.wordpress.com/2009/02/09/r-panel-chart-beats-excel-chart/#more-1096 inspired me to try something similar. The code that I wrote is: ------snipsnip--------------------------------------------------------------------- M <- structure(list(date = structure(c(13634, 13665, 13695, 13726, 13757, 13787, 13818, 13848, 13879, 13910, 13939, 13970,
2015 Jul 01
5
additional leap second
hi, Index: leap_second/src/library/base/R/zdatetime.R =================================================================== --- leap_second/src/library/base/R/zdatetime.R (revision 68608) +++ leap_second/src/library/base/R/zdatetime.R (working copy) @@ -24,7 +24,8 @@ "1979-12-31", "1981-6-30", "1982-6-30", "1983-6-30",
2009 Feb 19
2
Build R-2.8.1 on AIX5.3
Hi R users, I want to build R-2.8.1 on AIX5.3, but I got following error message: Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/rnd/homes/jixu/tmp/R-2.8.1/library/stats/libs/stats.so': rtld: 0712-001 Symbol d1mach was referenced from module /rnd/homes/jixu/tmp/R-2.8.1/library/stats/libs/stats.so(), but a runtime definition of
2014 Oct 14
1
[Fwd: Re: AIX-5.3 Issue installing Matrix Package]
Hi, Please help. Regards, Shivali ---------------------------- Original Message ---------------------------- Subject: Re: [Rd] AIX-5.3 Issue installing Matrix Package From: shivali at mail.ncmrwf.gov.in Date: Wed, October 8, 2014 3:31 pm To: "Ei-ji Nakama" <nakama at ki.rim.or.jp> Cc: "Martin Maechler" <maechler at stat.math.ethz.ch>
2009 Mar 16
6
R with MKL
Hi, I have seen a lot of problems from people trying to compile R with MKL. So I am writing my experience in case it helps and to ask one question. I installed R-2.8.1.patched in Ubuntu 9.04 (gcc 4.3.3) using MKL 10.1.1.019. I configured correctly (following MKL userguide) with : sudo ./configure --with-blas="-I/opt/intel/mkl/10.1.1.019/include -L/opt/intel/mkl/10.1.1.019/lib/em64t
2009 Mar 16
6
R with MKL
Hi, I have seen a lot of problems from people trying to compile R with MKL. So I am writing my experience in case it helps and to ask one question. I installed R-2.8.1.patched in Ubuntu 9.04 (gcc 4.3.3) using MKL 10.1.1.019. I configured correctly (following MKL userguide) with : sudo ./configure --with-blas="-I/opt/intel/mkl/10.1.1.019/include -L/opt/intel/mkl/10.1.1.019/lib/em64t
2005 Dec 14
1
R-beta on AIX5.2
I build R-beta on AIX5.2 is failed. make[3]: Entering directory `/home/nakama/Rbeta/R-beta/src/nmath' xlc_r -I. -I../../src/include -I../../src/include -I/usr/local/include -I/opt/freeware/include -DHAVE_CONFIG_H -q64 -I/usr/local/include -I/opt/freeware/include -O2 -D_ALL_SOURCE -D_LINUX_SOURCE_COMPAT -c mlutils.c -o mlutils.o "nmath.h", line 50.9: 1506-213 (S) Macro name calloc
2006 Apr 14
5
UTF8 letters are imaged incorrectly (PR#8770)
Full_Name: Mikhail Bocharov Version: 2.2.1 OS: Linux Submission from: (NULL) (62.148.130.28) Cyrillic UTF8 letters are imaged incorrectly Sorry, but English is not my native language My operating system is Gentoo-linux. Now i want get the gparhics with russian title for example: plot(1:20, type='l', main='&#1059;&#1090;&#1077;&#1095;&#1082;&#1072;')
2005 May 26
3
Buidling R on Linux (Itanium) fails (PR#7897)
Full_Name: Reinhold Bader Version: 2.1.0 OS: SLES 9 Submission from: (NULL) (129.187.48.1) I tried to build R using the Intel compilers (icc, ifort) and the Math Kernel Libraries for BLAS/LAPACK Optimizations used were -O3, and the FPICFLAGS="-fpic" was exported. The build failed with the following error message: ... dumping R code in package 'methods' Saving namespace image
2010 Dec 04
1
SurviveGotoBLAS2 for Win64 (human sacrifice release)
Hi, I put below Rblas.dll(GotoBLAS2 for Win64). http://prs.ism.ac.jp/~nakama/SurviveGotoBLAS2/binary/windows/x64/Rblas.dll It's a tryal phase. -- EI-JI Nakama? <nakama (a) ki.rim.or.jp> "\u4e2d\u9593\u6804\u6cbb"? <nakama (a) ki.rim.or.jp>
2007 Jun 24
2
problem gsub in the locale of CP932 and SJIS (PR#9751)
Full_Name: Ei-ji Nakama Version: R-2.5.0 OS: any Submission from: (NULL) (219.117.236.5) problem by operation of gsub in the locale of CP932 and SJIS. The inconvenient character code which used 0x5c after the first byte. --- R-2.5.0.orig/src/main/character.c 2007-04-03 11:05:05.000000000 +0900 +++ R-2.5.0/src/main/character.c 2007-06-24 22:31:06.000000000 +0900 @@ -986,6 +986,17 @@