Re: [Rd] Different results for tan(pi/2) and tanpi(1/2)

2016-09-09 Thread Hans W Borchers
> TIBCO Software > wdunlap tibco.com > > On Fri, Sep 9, 2016 at 10:24 AM, Hans W Borchers > wrote: >> >> 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)

[Rd] Different results for tan(pi/2) and tanpi(1/2)

2016-09-09 Thread Hans W Borchers
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 close

[Rd] Strange behaviour of the ':' operator

2014-04-27 Thread Hans W Borchers
Is the following really intended behaviour of the ':' operator, > s <- pi - 3.0 + 1e-07 > x <- s:pi > x [1] 0.1415928 1.1415928 2.1415928 3.1415928 though the last entry in the range vector is greater than pi? > x[4] > pi; x[4] - pi [1] TRUE [1] 1e-07 and the same, o

Re: [Rd] Problem following an R bug fix to integrate()

2013-07-18 Thread Hans W Borchers
is example as they appear to work more reliably. Hans Werner On Wed, Jul 17, 2013 at 7:37 PM, Martyn Plummer wrote: > On Tue, 2013-07-16 at 13:55 +0200, Hans W Borchers wrote: >> I have been told by the CRAN administrators that the following code generated >> an error on 64-bit Fedo

[Rd] Problem following an R bug fix to integrate()

2013-07-16 Thread Hans W Borchers
nnection to a bug fix to integrate(), with NEWS item "integrate() reverts to the pre-2.12.0 behaviour. (PR#15219)", then I do not understand what this pre-2.12.0 behavior really means. Thanks for any help or a hint to what shall be changed. Hans W Borchers PS: This kind of tricky

[Rd] Task View on Numerical Analysis and Differential Equations

2012-03-08 Thread Hans W Borchers
I am wondering if it would be time to have a new Task View, this time for the subject of "Numerical Analysis and Differential Equations". The list of packages possibly appearing in such a task view is already quite long and could, for example, include: Numerical Analysis and Linear Algebra Bessel

[Rd] Numerical instability in new R Windows development version

2012-01-27 Thread Hans W Borchers
I have a question concerning the new Windows toolchain for R >= 2.14.2. When trying out my package 'pracma' on the win-builder development version it will stop with the following error message: > f3 <- function(x, y) sqrt((1 - (x^2 + y^2)) * (x^2 + y^2 <= 1)) > dblquad(f3, -1, 1, -1, 1) #

[Rd] R patched & devel versions as portable ZIP files

2009-08-07 Thread Hans W Borchers
I wonder if it would be possible to provide R patched and development versions for Windows as simple zip files without using any installers. There are more and more free and open source software projects providing such portable versions, among them Python (since V2.5), the new MikTex 2.8, OpenOffi

Re: [Rd] Inaccurate complex arithmetic of R (Matlab is accurate)

2009-08-04 Thread Hans W Borchers
> I suspect that, in general, you may be facing the limitations of machine > accuracy (more precisely, IEEE 754 arithmetics on [64-bit] doubles) in Dear Martin, I definitely do not agree with this. Consider your own proposal of writing the Rosenbrock function: rosen2 <- function(x) {

Re: [Rd] Inaccurate complex arithmetic of R (Matlab is accurate)

2009-08-03 Thread Hans W. Borchers
r and others, and they all return the same correct value up to 15 digits. Should we not expect that R is capable of doing the same? Hans W. Borchers Martin Becker mx.uni-saarland.de> writes: > > Dear Ravi, > > the inaccuracy seems to creep in when powers are calculated. Apparen