Send MinGW-Notify mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.osdn.me/mailman/listinfo/mingw-notify
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of MinGW-Notify digest..."


Please do not reply to this notification; the sender address is unable to 
accept incoming e-mail.  If you wish to unsubscribe you can do so at 
https://lists.osdn.me/mailman/listinfo/mingw-notify.



Today's Topics:

   1. [mingw] #41597: std::remquo does not yield the proper result
      for the quotient (MinGW Notification List)
   2. [mingw] #41597: std::remquo does not yield the proper result
      for the quotient (MinGW Notification List)
   3. [mingw] #41597: std::remquo does not yield the proper result
      for the quotient (MinGW Notification List)
   4. [mingw] #41597: std::remquo does not yield the proper result
      for the quotient (MinGW Notification List)
   5. [mingw] #41597: std::remquo does not yield the proper result
      for the quotient (MinGW Notification List)
   6. [mingw] #41597: std::remquo does not yield the proper result
      for the quotient (MinGW Notification List)


----------------------------------------------------------------------

Message: 1
Date: Mon, 22 Feb 2021 13:14:40 +0000
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #41597: std::remquo does not yield the
        proper result for the quotient
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

#41597: std::remquo does not yield the proper result for the quotient

  Open Date: 2021-02-17 21:25
Last Update: 2021-02-22 13:14

URL for this Ticket:
    https://osdn.net//projects/mingw/ticket/41597
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41597

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2021-02-22 13:14 Updated by: keith

Comment:

I've prepared the attached tentative patch, to resolve this issue; it appears 
to DTRT, testing under Wine with your example values, (and a few other 
multiples of 90.0, for the dividend).
I've also attached an updated copy of libmingwex.a, with the patch applied.  
Please install it, in place of your existing libmingwex.a, test, and confirm 
that it resolves the issue for you.

---------------------------------------------------------------------
Ticket Status:

      Reporter: avhaecke
         Owner: keith
          Type: Issues
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: (None)
     Component: WSL
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Context :
This problem was encountered with gcc on MinGW in the following version :
gcc.exe (MinGW.org GCC-6.3.0-1) 6.3.0
Description :
The following code :
 double numer = 90.1 ; double denom = 90 .0 ; int quot ; double result = 
std::remquo(numer, denom, &quot) ; std::cout << "result " << result << 
std::endl ; std::cout << "quot " << quot << std::endl;should yield :
result 0.1
quot 1
As is expected from std::remquo, quot has a magnitude which should be congruent 
(modulo 2 to the nth) to the magnitude of the integral quotient of x/y, n being 
greater or equal than 3.
However with gcc 6.3.0, on MinGW, the above instructions yield :
result 0.1
quot 0
On another version of gcc (gcc 4.9.1 2014), the expected behavior is 
encountered.

-- 
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN

Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/mingw/ticket/41597
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41597


------------------------------

Message: 2
Date: Mon, 22 Feb 2021 15:19:39 +0200
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #41597: std::remquo does not yield the
        proper result for the quotient
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

#41597: std::remquo does not yield the proper result for the quotient

  Open Date: 2021-02-17 23:25
Last Update: 2021-02-22 15:19

URL for this Ticket:
    https://osdn.net//projects/mingw/ticket/41597
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41597

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2021-02-22 15:19 Updated by: yaser_elkelany

Comment:

Good best

---------------------------------------------------------------------
Ticket Status:

      Reporter: avhaecke
         Owner: keith
          Type: Issues
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: (None)
     Component: WSL
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Context :
This problem was encountered with gcc on MinGW in the following version :
gcc.exe (MinGW.org GCC-6.3.0-1) 6.3.0
Description :
The following code :
 double numer = 90.1 ; double denom = 90 .0 ; int quot ; double result = 
std::remquo(numer, denom, &quot) ; std::cout << "result " << result << 
std::endl ; std::cout << "quot " << quot << std::endl;should yield :
result 0.1
quot 1
As is expected from std::remquo, quot has a magnitude which should be congruent 
(modulo 2 to the nth) to the magnitude of the integral quotient of x/y, n being 
greater or equal than 3.
However with gcc 6.3.0, on MinGW, the above instructions yield :
result 0.1
quot 0
On another version of gcc (gcc 4.9.1 2014), the expected behavior is 
encountered.

-- 
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN

Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/mingw/ticket/41597
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41597


------------------------------

Message: 3
Date: Mon, 22 Feb 2021 13:52:19 +0000
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #41597: std::remquo does not yield the
        proper result for the quotient
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

#41597: std::remquo does not yield the proper result for the quotient

  Open Date: 2021-02-17 21:25
Last Update: 2021-02-22 13:52

URL for this Ticket:
    https://osdn.net//projects/mingw/ticket/41597
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41597

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2021-02-22 13:52 Updated by: keith

Comment:

Reply To avhaecke
Context :
This problem was encountered with gcc on MinGW in the following version :
gcc.exe (MinGW.org GCC-6.3.0-1) 6.3.0
...
On another version of gcc (gcc 4.9.1 2014), the expected behavior is 
encountered.
Just to clarify: I assume that your GCC-4.9.1 is not a MinGW release?  I can 
find no evidence of any legitimate MinGW GCC release, of that version; the only 
GCC-4.9.x release, which we did publish, was GCC-4.9.3, (and I assume, given 
the vintage of the remquo() implementation in libmingwex.a, that our GCC-4.9.3 
release would have exhibited the same erroneous behaviour).

---------------------------------------------------------------------
Ticket Status:

      Reporter: avhaecke
         Owner: keith
          Type: Issues
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: (None)
     Component: WSL
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Context :
This problem was encountered with gcc on MinGW in the following version :
gcc.exe (MinGW.org GCC-6.3.0-1) 6.3.0
Description :
The following code :
 double numer = 90.1 ; double denom = 90 .0 ; int quot ; double result = 
std::remquo(numer, denom, &quot) ; std::cout << "result " << result << 
std::endl ; std::cout << "quot " << quot << std::endl;should yield :
result 0.1
quot 1
As is expected from std::remquo, quot has a magnitude which should be congruent 
(modulo 2 to the nth) to the magnitude of the integral quotient of x/y, n being 
greater or equal than 3.
However with gcc 6.3.0, on MinGW, the above instructions yield :
result 0.1
quot 0
On another version of gcc (gcc 4.9.1 2014), the expected behavior is 
encountered.

-- 
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN

Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/mingw/ticket/41597
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41597


------------------------------

Message: 4
Date: Mon, 22 Feb 2021 15:51:02 +0100
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #41597: std::remquo does not yield the
        proper result for the quotient
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

#41597: std::remquo does not yield the proper result for the quotient

  Open Date: 2021-02-17 22:25
Last Update: 2021-02-22 15:51

URL for this Ticket:
    https://osdn.net//projects/mingw/ticket/41597
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41597

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2021-02-22 15:51 Updated by: avhaecke

Comment:

To answer Keith's question :
Yes indeed, the version GCC-4.9.1 I mentioned in the original post was not a 
MinGW Release. It came (in 2014) from MinGW-build project as a binary package.
You can still find it online on source forge with MinGW-w64 project at :
https://sourceforge.net/projects/mingw-w64/files/
under :
Home / Toolchains targetting Win64 / Personal Builds / mingw-builds / 4.9.1 / 
threads-posix/ seh
I do not currently have access to the installation archive and cannot tell you 
more precisely which package it came from : I will be able to check next week.
Reply To keith
Reply To avhaecke
Context :
This problem was encountered with gcc on MinGW in the following version :
gcc.exe (MinGW.org GCC-6.3.0-1) 6.3.0
...
On another version of gcc (gcc 4.9.1 2014), the expected behavior is 
encountered.

Just to clarify: I assume that your GCC-4.9.1 is not a MinGW release?  I can 
find no evidence of any legitimate MinGW GCC release, of that version; the only 
GCC-4.9.x release, which we did publish, was GCC-4.9.3, (and I assume, given 
the vintage of the remquo() implementation in libmingwex.a, that our GCC-4.9.3 
release would have exhibited the same erroneous behaviour).
Reply To keith
Reply To avhaecke
Context :
This problem was encountered with gcc on MinGW in the following version :
gcc.exe (MinGW.org GCC-6.3.0-1) 6.3.0
...
On another version of gcc (gcc 4.9.1 2014), the expected behavior is 
encountered.

Just to clarify: I assume that your GCC-4.9.1 is not a MinGW release?  I can 
find no evidence of any legitimate MinGW GCC release, of that version; the only 
GCC-4.9.x release, which we did publish, was GCC-4.9.3, (and I assume, given 
the vintage of the remquo() implementation in libmingwex.a, that our GCC-4.9.3 
release would have exhibited the same erroneous behaviour).

---------------------------------------------------------------------
Ticket Status:

      Reporter: avhaecke
         Owner: keith
          Type: Issues
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: (None)
     Component: WSL
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Context :
This problem was encountered with gcc on MinGW in the following version :
gcc.exe (MinGW.org GCC-6.3.0-1) 6.3.0
Description :
The following code :
 double numer = 90.1 ; double denom = 90 .0 ; int quot ; double result = 
std::remquo(numer, denom, &quot) ; std::cout << "result " << result << 
std::endl ; std::cout << "quot " << quot << std::endl;should yield :
result 0.1
quot 1
As is expected from std::remquo, quot has a magnitude which should be congruent 
(modulo 2 to the nth) to the magnitude of the integral quotient of x/y, n being 
greater or equal than 3.
However with gcc 6.3.0, on MinGW, the above instructions yield :
result 0.1
quot 0
On another version of gcc (gcc 4.9.1 2014), the expected behavior is 
encountered.

-- 
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN

Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/mingw/ticket/41597
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41597


------------------------------

Message: 5
Date: Mon, 22 Feb 2021 16:30:56 +0100
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #41597: std::remquo does not yield the
        proper result for the quotient
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

#41597: std::remquo does not yield the proper result for the quotient

  Open Date: 2021-02-17 22:25
Last Update: 2021-02-22 16:30

URL for this Ticket:
    https://osdn.net//projects/mingw/ticket/41597
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41597

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2021-02-22 16:30 Updated by: avhaecke

Comment:

Reply To keith
I've prepared the attached tentative patch, to resolve this issue; it appears 
to DTRT, testing under Wine with your example values, (and a few other 
multiples of 90.0, for the dividend).

I've also attached an updated copy of libmingwex.a, with the patch applied.  
Please install it, in place of your existing libmingwex.a, test, and confirm 
that it resolves the issue for you.
Thank you for your patch (and your support).
However, I cannot link with your new libmingwex.a library as it appears to have 
the following symbols as Undefined (U) :
_impmsvcrt_realloc
_impmsvcrt_free
Those 2 symbols do not appear in the libmingwex library that came from the 
installer.
As a consequence, when I try to link with the new libmingwex.a, I get the 3 
following errors :
\home\keith\builds\mingw\mingw-wsl\build\mingwrt\..\..\mingwrt\mingwex\memalign.c
 : 645: undefined reference to '_impmsvcrt_free'
\home\keith\builds\mingw\mingw-wsl\build\mingwrt\..\..\mingwrt\mingwex\memalign.c
 : 557: undefined reference to '_impmsvcrt_realloc'
\home\keith\builds\mingw\mingw-wsl\build\mingwrt\..\..\mingwrt\mingwex\memalign.c
 : 582: undefined reference to '_impmsvcrt_realloc'


---------------------------------------------------------------------
Ticket Status:

      Reporter: avhaecke
         Owner: keith
          Type: Issues
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: (None)
     Component: WSL
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Context :
This problem was encountered with gcc on MinGW in the following version :
gcc.exe (MinGW.org GCC-6.3.0-1) 6.3.0
Description :
The following code :
 double numer = 90.1 ; double denom = 90 .0 ; int quot ; double result = 
std::remquo(numer, denom, &quot) ; std::cout << "result " << result << 
std::endl ; std::cout << "quot " << quot << std::endl;should yield :
result 0.1
quot 1
As is expected from std::remquo, quot has a magnitude which should be congruent 
(modulo 2 to the nth) to the magnitude of the integral quotient of x/y, n being 
greater or equal than 3.
However with gcc 6.3.0, on MinGW, the above instructions yield :
result 0.1
quot 0
On another version of gcc (gcc 4.9.1 2014), the expected behavior is 
encountered.

-- 
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN

Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/mingw/ticket/41597
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41597


------------------------------

Message: 6
Date: Mon, 22 Feb 2021 17:40:48 +0000
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #41597: std::remquo does not yield the
        proper result for the quotient
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

#41597: std::remquo does not yield the proper result for the quotient

  Open Date: 2021-02-17 21:25
Last Update: 2021-02-22 17:40

URL for this Ticket:
    https://osdn.net//projects/mingw/ticket/41597
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41597

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2021-02-22 17:40 Updated by: keith

Comment:

Reply To avhaecke
Reply To keith
I've prepared the attached tentative patch, to resolve this issue; it appears 
to DTRT, testing under Wine with your example values, (and a few other 
multiples of 90.0, for the dividend).

I've also attached an updated copy of libmingwex.a, with the patch applied.  
Please install it, in place of your existing libmingwex.a, test, and confirm 
that it resolves the issue for you.

Thank you for your patch (and your support).

However, I cannot link with your new libmingwex.a library as it appears to have 
the following symbols as Undefined (U) :

_imp____msvcrt_realloc
_imp____msvcrt_free
  Those 2 symbols do not appear in the libmingwex library that came from the 
installer.
Okay.  Then your mingwrt/w32api installation is too old; did you follow 
apodtele's advice, and upgrade to GCC-9.2.0?  In conjunction with that, you 
should also be using up-to-date versions of the MinGW runtime, and W32API 
libraries — it simply isn't practical for me to continue backporting to those 
versions of the same vintage as GCC-6.3.0; the attached replacement 
libmingwex.a is compatible with version 5.4.x runtime libraries, (and maybe 
also 5.3.x), but probably not with anything older.
Furthermore, if you are using a mingw-get installer which suggests that 
GCC-6.3.0 is the latest release, then it is still referring to the (defunct) 
SourceForge FRS; please refer to this mailing-list post, for advice on ensuring 
that you can continue to receive upates.


---------------------------------------------------------------------
Ticket Status:

      Reporter: avhaecke
         Owner: keith
          Type: Issues
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: (None)
     Component: WSL
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Context :
This problem was encountered with gcc on MinGW in the following version :
gcc.exe (MinGW.org GCC-6.3.0-1) 6.3.0
Description :
The following code :
 double numer = 90.1 ; double denom = 90 .0 ; int quot ; double result = 
std::remquo(numer, denom, &quot) ; std::cout << "result " << result << 
std::endl ; std::cout << "quot " << quot << std::endl;should yield :
result 0.1
quot 1
As is expected from std::remquo, quot has a magnitude which should be congruent 
(modulo 2 to the nth) to the magnitude of the integral quotient of x/y, n being 
greater or equal than 3.
However with gcc 6.3.0, on MinGW, the above instructions yield :
result 0.1
quot 0
On another version of gcc (gcc 4.9.1 2014), the expected behavior is 
encountered.

-- 
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN

Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/mingw/ticket/41597
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41597


------------------------------

Subject: Digest Footer

_______________________________________________
MinGW-Notify mailing list
[email protected]
https://lists.osdn.me/mailman/listinfo/mingw-notify


------------------------------

End of MinGW-Notify Digest, Vol 41, Issue 14
********************************************

Reply via email to