Re: [Mingw-w64-public] [PATCH] Change formatting of double precision floating-points in hexadecimal to match glibc.

2021-09-12 Thread Patrick Northon via Mingw-w64-public
On dimanche 12 septembre 2021 17 h 08 min 56 s EDT Martin Storsj� wrote: > With your implementation, this prints: > > 0x0.8p-1022 > 0x1p-1022 > > However with glibc, this prints: > > 0x0.8p-1022 > 0x0p-1022 > > This looks wrong to me though, and I'd say your version is correct. > Surprisingly t

[Mingw-w64-public] [PATCH] Change formatting of double precision floating-points in hexadecimal to match glibc.

2021-09-10 Thread Patrick Northon via Mingw-w64-public
Finally, here's the patch to change double formatting in hexadecimal. As you can see, I managed to find a way to fix it with little changes. Only a few minor adjustments needed. As for for formatting long doubles as doubles when their size is the same, the evidence for it is in glibc's code: i

Re: [Mingw-w64-public] [PATCH] Fix exponent when formatting long double in hexadecimal.

2021-09-09 Thread Patrick Northon via Mingw-w64-public
On jeudi 9 septembre 2021 17 h 13 min 17 s EDT Martin Storsjö wrote: > On Tue, 7 Sep 2021, Patrick Northon wrote: > > Take number 2. I moved the adjustment to the exponent into > > __pformat_xldouble. > > Thanks for this attempt. Now I've poked the implementation to follow it a > bit better to see

[Mingw-w64-public] [PATCH] Fix exponent when formatting long double in hexadecimal.

2021-09-07 Thread Patrick Northon via Mingw-w64-public
Take number 2. I moved the adjustment to the exponent into __pformat_xldouble.>From b5a399f21cb15f5d3a38b312c7889adede225ff6 Mon Sep 17 00:00:00 2001 From: Patrick Northon Date: Tue, 7 Sep 2021 12:11:20 -0400 Subject: [PATCH] Fix exponent when formatting long double in hexadecimal. Some denormali

Re: [Mingw-w64-public] [PATCH] Fix exponent when formatting long double in hexadecimal.

2021-09-07 Thread Patrick Northon via Mingw-w64-public
Actually, nevermind, I got confused when I pulled changes but part of my patch was overwritten. I'll make another patch with the new proper indentation. ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforg

Re: [Mingw-w64-public] [PATCH] Fix exponent when formatting long double in hexadecimal.

2021-09-07 Thread Patrick Northon via Mingw-w64-public
On lundi 6 septembre 2021 16 h 15 min 57 s EDT Martin Storsj? wrote: > Yes - hopefully someone will approve it soon, and I'd land it, then you > can reapply your changes on top of that. As for why git didn't manage to > apply your patch from the attachment, I don't quite know though. I think you m

Re: [Mingw-w64-public] [PATCH] Fix exponent when formatting long double in hexadecimal.

2021-09-06 Thread Patrick Northon via Mingw-w64-public
On lundi 6 septembre 2021 06 h 59 min 40 s EDT Martin Storsj? wrote: > But I feel a little uneasy about the patch - why would we unconditionally > do a "value.__pformat_fpreg_exponent -= 3;" at the start of > __pformat_emit_xfloat? I don't see the corresponding adjustment in > __pformat_xldouble fo

Re: [Mingw-w64-public] [PATCH] Fix exponent when formatting long double in hexadecimal.

2021-09-06 Thread Patrick Northon via Mingw-w64-public
On lundi 6 septembre 2021 06 h 59 min 40 s EDT Martin Storsj? wrote: > On Sun, 5 Sep 2021, Patrick Northon via Mingw-w64-public wrote: > > Hi, here's a patch to fix another problem with formatting long doubles in > > > hexadecimal. I found a failing case with a denormali

[Mingw-w64-public] [PATCH] Fix exponent when formatting long double in hexadecimal.

2021-09-05 Thread Patrick Northon via Mingw-w64-public
Hi, here's a patch to fix another problem with formatting long doubles in hexadecimal. I found a failing case with a denormalized value: printf("0x2.0p-16385l : %La\n", 0x2.0p-16385l); Complete tests: #include #include #include int main(int argc, char **argv) { puts( " ---

Re: [Mingw-w64-public] [PATCH] Fix hexadecimal formatting of long doubles.

2021-08-31 Thread Patrick Northon via Mingw-w64-public
, 28 Aug 2021, Patrick Northon via Mingw-w64-public wrote: As requested, and after further digging and testing, here's a patch that fix a few problems that I have found with long double formatting in hexadecimal. I have more coming for doubles in a much revised form. It fixes: - Wrong exp

Re: [Mingw-w64-public] [PATCH] Fix hexadecimal formatting of long doubles.

2021-08-28 Thread Patrick Northon via Mingw-w64-public
I apologize, I'm wrestling with my mail client. Here's the c file, but not as an attachment. Does the mailing list block .c files? #include #include #include int main(int argc, char **argv) { puts( " --- Long doubles ---\n"); char buf[100]; snprintf(buf, siz

Re: [Mingw-w64-public] [PATCH] Fix hexadecimal formatting of long doubles.

2021-08-28 Thread Patrick Northon via Mingw-w64-public
Here the c test file. I can see it was attached in my sent folder, but it's not there on the maillist? ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

[Mingw-w64-public] [PATCH] Fix hexadecimal formatting of long doubles.

2021-08-28 Thread Patrick Northon via Mingw-w64-public
As requested, and after further digging and testing, here's a patch that fix a few problems that I have found with long double formatting in hexadecimal. I have more coming for doubles in a much revised form. It fixes: - Wrong exponent was set for denormalized long doubles. - It remove normaliza

Re: [Mingw-w64-public] [PATCH] Implement formatting function for hexadecimal double.

2021-08-19 Thread Patrick Northon via Mingw-w64-public
On 2021-08-19 02 h 16, Martin Storsjö wrote: On Thu, 19 Aug 2021, Patrick Northon via Mingw-w64-public wrote: The behavior should match glibc and format double floating-points in hexadecimal in normalized form. Also fix a problem where an exponent of zero wasn't printed. Can you

[Mingw-w64-public] [PATCH] Implement formatting function for hexadecimal double.

2021-08-18 Thread Patrick Northon via Mingw-w64-public
The behavior should match glibc and format double floating-points in hexadecimal in normalized form. Also fix a problem where an exponent of zero wasn't printed. From fc5dca78def4aea92c991d78170b7919b7248572 Mon Sep 17 00:00:00 2001 From: Patrick Northon Date: Mon, 16 Aug 2021 21:06:33 -0400 Sub