Re: [Rd] Hyperbolic tangent different results on Windows and Mac

2017-04-07 Thread Ray Donnelly
On Mon, Mar 27, 2017 at 12:33 PM, Jeroen Ooms wrote: > For future reference: > https://sourceforge.net/p/mingw-w64/mailman/message/35747206/ > > On Wed, Mar 22, 2017 at 2:12 PM, Jeroen Ooms wrote: > > This looks like a bug in mingw-w64 CRT. The

Re: [Rd] Hyperbolic tangent different results on Windows and Mac

2017-03-27 Thread Jeroen Ooms
For future reference: https://sourceforge.net/p/mingw-w64/mailman/message/35747206/ On Wed, Mar 22, 2017 at 2:12 PM, Jeroen Ooms wrote: > This looks like a bug in mingw-w64 CRT. The problem can be produced > with C++ without R: > > #include > #include > #include >

Re: [Rd] Hyperbolic tangent different results on Windows and Mac

2017-03-22 Thread Jeroen Ooms
This looks like a bug in mingw-w64 CRT. The problem can be produced with C++ without R: #include #include #include int main(){ std::cout << std::fixed; std::complex z(356, 0); std::cout << "tanh" << z << " = " << std::tanh(z) << " (tanh(356) = " << std::tanh(356)

Re: [Rd] Hyperbolic tangent different results on Windows and Mac

2017-03-21 Thread Uwe Ligges
On 21.03.2017 10:54, Martin Maechler wrote: Rodrigo Zepeda on Fri, 17 Mar 2017 12:56:06 -0600 writes: > Dear all, > We seem to have found a "strange" behaviour in the hyperbolic tangent > function tanh on Windows. > When running tanh(356 + 0i) the

Re: [Rd] Hyperbolic tangent different results on Windows and Mac

2017-03-21 Thread Martin Maechler
> Rodrigo Zepeda > on Fri, 17 Mar 2017 12:56:06 -0600 writes: > Dear all, > We seem to have found a "strange" behaviour in the hyperbolic tangent > function tanh on Windows. > When running tanh(356 + 0i) the Windows result is NaN + 0.i while on

[Rd] Hyperbolic tangent different results on Windows and Mac

2017-03-17 Thread Rodrigo Zepeda
Dear all, We seem to have found a "strange" behaviour in the hyperbolic tangent function tanh on Windows. When running tanh(356 + 0i) the Windows result is NaN + 0.i while on Mac the result is 1 + 0i. It doesn't seem to be a floating point error because on Mac it is possible to run arbitrarily