[Mingw-w64-public] [PATCH] sqrt: Fix NaN propagation for IEEE Std 754-2008

2016-04-05 Thread Ray Donnelly
The R language has some hacks specifically for mingw-w64 that
were caused by our handling of NaNs in sqrt(x). R uses a
special valued NaN to mean 'Not Available' and expects it to
be retained through various calculations. Our sqrt(x) doesn't
do this, instead it normalises such a NaN (retaining sign).

From:

http://wwwf.imperial.ac.uk/~drmii/M3SC_2016/IEEE_2008_4610935.pdf

"6.2.3 NaN propagation

An operation that propagates a NaN operand to its result and
has a single NaN as an input should produce a NaN with the
payload of the input NaN if representable in the destination
format."

There might even be a slight speed-up from this too.

Thanks to Duncan Murdoch for finding the reference.
---
 mingw-w64-crt/math/sqrt.def.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/mingw-w64-crt/math/sqrt.def.h b/mingw-w64-crt/math/sqrt.def.h
index 2c5ed99..8e502ec 100644
--- a/mingw-w64-crt/math/sqrt.def.h
+++ b/mingw-w64-crt/math/sqrt.def.h
@@ -73,9 +73,8 @@ __FLT_ABI (sqrt) (__FLT_TYPE x)
   if (x_class == FP_ZERO)
return __FLT_CST (-0.0);
 
-  res = (signbit (x) ? -__FLT_NAN : __FLT_NAN);
-  __FLT_RPT_DOMAIN ("sqrt", x, 0.0, res);
-  return res;
+  __FLT_RPT_DOMAIN ("sqrt", x, 0.0, x);
+  return x;
 }
   else if (x_class == FP_ZERO)
 return __FLT_CST (0.0);
-- 
2.8.0


--
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] [PATCH] sqrt: Fix NaN propagation for IEEE Std 754-2008

2016-04-05 Thread Ray Donnelly
Here's the sqrt(x) NaN propgation patch again, this
time with a reference to the IEEE standard and as
a git patch.

If it's ok to commit, can someone go ahead?

Ray Donnelly (1):
  sqrt: Fix NaN propagation for IEEE Std 754-2008

 mingw-w64-crt/math/sqrt.def.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

-- 
2.8.0


--
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Which project are alive?

2016-04-05 Thread David Grayson
Julien:

MSYS2 is still very actively maintained.  You can download it from
https://msys2.github.io/ instead of SourceForge.

Here is some info about all the work done on MSYS2 in the last week:

https://github.com/Alexpux/MINGW-packages/pulse

--David Grayson

On Tue, Apr 5, 2016 at 10:38 AM, Julien Darthenay 
wrote:

> Hello,
>
> (I am not sure my message was sent because I forgot to activate my
> mailing-list subscription, so I sent it again. Pretty please, excuse me
> for the spam if you got this message twice).
>
> I have installed MinGW64 three years ago, it was something such as
> i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.
> This year I decided to update it, so I discovered the "new" website
> http://mingw-w64.org (not sure it is new, but if it was already there in
> 2013 I was not aware of it and never saw it).
>
> I tried to use Win-Builds. This seem a rather good stuff, installing a
> lot of usefull libraries, avoiding me the big pain in the ass to install
> them one by one, not even sure I could find all of them. But I realize
> this toolchain seems to be somewhat outdated compared to others, still
> stuck to MinGW-w64 3.3.0, and last update (1.5) was more than one year
> ago. I also got an very annoyous bug
>  with gmake
> 4.0 64-bit, so I am stuck with using GNU Make 3.82.90 from a previous
> installation. Also building 32bits target with Win-builds 64-bits does
> not work, so I had to install Win-builds 32-bits.
>
> I also tried to install MSys2, but I got very disappointed. First thing,
> the installer seems to install only for current user (at least it
> installed shortcut only for the user who launch installation) but
> requires Admin rights to install. This is truly a big flaw that have to
> be fixed. But my worst worry was Avast putting a lot of stuff in
> quarantine, and after I searched the with DuckDuckGo the messages from
> Avast it appears I was being delivered malwares by Soureceforge. So I
> immediately removed MSys2.
>
> At work for some project we are using TDM-GCC, but this tool is not even
> mentionned in your download section, this is not reasuring. Also last
> news in their website is from 2015 July 2nd.
>
> And Rubenv toolchain don't seem to be maintained any more.
>
> So, now that I have finished narrating my story, I have a few questions...
> Which of these tools are still alive?
> What would you recommend me to use?
> I have downloaded a Debian 8.2 32-bit virtual machine, may I use it to
> build my how Mingw-64 packages? (Actually I also downloaded the 64-bit
> one, but when I tried to run it VMWare insulted me and told me to stop
> dreaming, softwares can be very disrespectful nowadays)
> Will you do something about the Sourceforge's malwares issue?
> What to do if a MinGW package I need is only on Sourcforge?
>
> Sorry for my disturbing English, and if you have not fallen asleep yet,
> thanks for reading me.
>
> Julien Darthenay
>
> --
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
--
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] Which project are alive?

2016-04-05 Thread Julien Darthenay
Hello,

(I am not sure my message was sent because I forgot to activate my 
mailing-list subscription, so I sent it again. Pretty please, excuse me 
for the spam if you got this message twice).

I have installed MinGW64 three years ago, it was something such as 
i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.
This year I decided to update it, so I discovered the "new" website 
http://mingw-w64.org (not sure it is new, but if it was already there in 
2013 I was not aware of it and never saw it).

I tried to use Win-Builds. This seem a rather good stuff, installing a 
lot of usefull libraries, avoiding me the big pain in the ass to install 
them one by one, not even sure I could find all of them. But I realize 
this toolchain seems to be somewhat outdated compared to others, still 
stuck to MinGW-w64 3.3.0, and last update (1.5) was more than one year 
ago. I also got an very annoyous bug 
 with gmake 
4.0 64-bit, so I am stuck with using GNU Make 3.82.90 from a previous 
installation. Also building 32bits target with Win-builds 64-bits does 
not work, so I had to install Win-builds 32-bits.

I also tried to install MSys2, but I got very disappointed. First thing, 
the installer seems to install only for current user (at least it 
installed shortcut only for the user who launch installation) but 
requires Admin rights to install. This is truly a big flaw that have to 
be fixed. But my worst worry was Avast putting a lot of stuff in 
quarantine, and after I searched the with DuckDuckGo the messages from 
Avast it appears I was being delivered malwares by Soureceforge. So I 
immediately removed MSys2.

At work for some project we are using TDM-GCC, but this tool is not even 
mentionned in your download section, this is not reasuring. Also last 
news in their website is from 2015 July 2nd.

And Rubenv toolchain don't seem to be maintained any more.

So, now that I have finished narrating my story, I have a few questions...
Which of these tools are still alive?
What would you recommend me to use?
I have downloaded a Debian 8.2 32-bit virtual machine, may I use it to 
build my how Mingw-64 packages? (Actually I also downloaded the 64-bit 
one, but when I tried to run it VMWare insulted me and told me to stop 
dreaming, softwares can be very disrespectful nowadays)
Will you do something about the Sourceforge's malwares issue?
What to do if a MinGW package I need is only on Sourcforge?

Sorry for my disturbing English, and if you have not fallen asleep yet, 
thanks for reading me.

Julien Darthenay
--
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public