Excuse me, Is there anything to do to improve this patch?
Thanks.
On 2015年03月25日 15:46, YongHao Hu wrote:
Try 3:
- Superseded Patch 109456.
- Use appropriate win32 types instead of typedef. (Thanks Dmitry Timoshkov)
Try 2:
- Superseded Patch 109432
- Use typedef instead of C99 types
- Delete useless #ifndef
- Add memset to test
Try1:
- Fix bug https://bugs.winehq.org/show_bug.cgi?id=37913 .
- The Dragon4 algorithm implementation is based on
http://www.ryanjuckett.com/programming/printing-floating-point-numbers/.
dlls/msvcrt/dragon4.h | 668 ++++++++++++++++++++++++++++++++++++++++++ dlls/msvcrt/printf.h | 43 +-- dlls/msvcrt/tests/printf.c | 96 ++++++ dlls/msvcrt/wine_printfloat.h | 246 ++++++++++++++++ 4 files changed, 1036 insertions(+), 17 deletions(-) create mode 100644 dlls/msvcrt/dragon4.h create mode 100644 dlls/msvcrt/wine_printfloat.h
Hi,
On 03/30/15 10:28, YongHao Hu wrote:
Excuse me, Is there anything to do to improve this patch?
I'm simply not sure what to think about this patch. Printf with this patch is not always producing the same output as native dll. You can see the difference calling printf with big precision (as far as I remember native never displays more than 18 digits and fills the rest with '0'). Because of that I'm not sure if this algorithm is really needed here.
The bug with different rounding can be probably fixed by printing the double with bigger precision and doing the rounding our self. On the other hand there are some advantages of making it not depending on host system standard library.
Thanks, Piotr
Good point. I will have a try. Thank you for your reply. :)
On 2015年03月30日 19:10, Piotr Caban wrote:
Hi,
On 03/30/15 10:28, YongHao Hu wrote:
Excuse me, Is there anything to do to improve this patch?
The bug with different rounding can be probably fixed by printing the double with bigger precision and doing the rounding our self. On the other hand there are some advantages of making it not depending on host system standard library.