Re: [Mingw-w64-public] sinl/cosl/tanl accuracy problem

2016-09-08 Thread NightStrike
What does gcc's __builtin_sinl() do? On Wed, Sep 7, 2016 at 11:37 PM, lhmouse wrote: > If performance is the problem there are a number of solutions such as > inline assembly, static lookup tables, etc. `fsinl()` is apparently not one > of them. > But yes, I am all ears > >

Re: [Mingw-w64-public] sinl/cosl/tanl accuracy problem

2016-09-08 Thread lhmouse
It is merely a function guaranteed to be declared implicitly (thus requires no ) and has the same semantics with the standard function `sinl()`. The GCC optimizer can perform certain types of optimization such as constant folding and inlining only if `fsinl()` is supposed to do the same thing as

[Mingw-w64-public] `fma()` functions are completely wrong in mingw-w64

2016-09-08 Thread lhmouse
Reading `mingw-w64/mingw-w64-crt/math/fmal.c`: long double fmal ( long double _x, long double _y, long double _z) { return ((_x * _y) + _z); } This implementation is completely wrong. https://en.wikipedia.org/wiki/Multiply–accumulate_operation#Fused_multiply.E2.80.93add

Re: [Mingw-w64-public] sinl/cosl/tanl accuracy problem

2016-09-08 Thread Thomas Bickel
On 07.09.2016 17:21, lhmouse wrote: (I don't write AT assembly so I am unable to make a patch. Nevertheless I hope someone who writes AT assembly could fix it.) I don't have time to write a patch but I can donate some code that AFAIK does what you need for the sin functions. >gcc -m32

Re: [Mingw-w64-public] sinl/cosl/tanl accuracy problem

2016-09-08 Thread lhmouse
Thanks for such nice work! I hope someone would accept it. Kai has been away for days. -- Best regards, lh_mouse 2016-09-08 - 发件人:Thomas Bickel 发送日期:2016-09-08 21:01

[Mingw-w64-public] [PATCH] Added standard-conforming fmaf(), fma() and fmal() functions.

2016-09-08 Thread lhmouse
--- mingw-w64-crt/Makefile.am | 4 ++-- mingw-w64-crt/math/fma.S | 42 mingw-w64-crt/math/fma.c | 12 ++ mingw-w64-crt/math/fmaf.S | 43 - mingw-w64-crt/math/fmaf.c | 10 mingw-w64-crt/math/fmal.c | 61

Re: [Mingw-w64-public] [PATCH] Added standard-conforming fmaf(), fma() and fmal() functions.

2016-09-08 Thread lhmouse
Oops. Are there any volunteers to implement `fma()` functions for ARM ? -- Best regards, lh_mouse 2016-09-08 -- ___

Re: [Mingw-w64-public] [PATCH 1/4] winstorecompat: Add a GetStartupInfo stub

2016-09-08 Thread Hugo Beauzée-Luyssen
On 09/08/2016 07:21 PM, David Wohlferd wrote: > On 9/7/2016 2:19 PM, Hugo Beauzée-Luyssen wrote: >>> Is this to deal with the fact that __tmainCRTStartup uses it? >> Exactly. In the end, the function won't be used since __tmainCRTStartup >> won't be used for a windows store app, but we still need

Re: [Mingw-w64-public] [PATCH 1/4] winstorecompat: Add a GetStartupInfo stub

2016-09-08 Thread David Wohlferd
On 9/8/2016 10:36 AM, Hugo Beauzée-Luyssen wrote: > This only happens when building with -lwindowsapp (see another patch of > mine). When building with the default -lkernel32, all is good, since > kernel32.lib contains GetStartupInfo. > windowsapp.lib, on the other hand, doesn't; which makes sense

Re: [Mingw-w64-public] [PATCH 1/4] winstorecompat: Add a GetStartupInfo stub

2016-09-08 Thread David Wohlferd
On 9/7/2016 2:19 PM, Hugo Beauzée-Luyssen wrote: >> Is this to deal with the fact that __tmainCRTStartup uses it? > Exactly. In the end, the function won't be used since __tmainCRTStartup > won't be used for a windows store app, but we still need the configure > scripts to be able to compile

[Mingw-w64-public] Wrong output from %La specifier in printf()?

2016-09-08 Thread lhmouse
When the `%La` specifier is used in `printf()` to format the C99 hexdecimal floating point value `0x5p-80l`, a wrong result is generated, as shown in this example: E:\Desktop>cat test.c extern int __mingw_printf(const char *, ...); int main(){ __mingw_printf("%La\n",