On Wed, 31 Jul 2019, sisyphus wrote:
Martin,
I couldn't locate mingw-w64-crt/math/x86/pow.def.h on the internet (URL ?),
Here it is:
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-crt/math/x86/pow.def.h
but I assume the patch is concerned with raising a NaN to a po
On Wed, 31 Jul 2019, Liu Hao wrote:
---
BTW:
+ if (signbit(x))
+ return -HUGE_VAL;
+ else
+ return HUGE_VAL;
If I were you I would write it as
return copysign(HUGE_VAL, x);
anyway the difference is trivial.
Good po
在 2019/7/31 下午1:44, Liu Hao 写道:
> 1) `pow(x, 0.0)` returns `0.0`, no matter what `x` is.
>
Sorry for the typo. The second `0.0` should be `1.0`.
--
Best regards,
LH_Mouse
signature.asc
Description: OpenPGP digital signature
___
Mingw-w64-public mail
在 2019/7/31 下午1:13, sisyphus 写道:
> Martin,
> Thanks for all your work.
> I couldn't locate mingw-w64-crt/math/x86/pow.def.h on the internet (URL ?),
> but I assume the patch is concerned with raising a NaN to a power.
> Given that raising an input NaN to a power does not always result in a NaN,
> i
Martin,
Thanks for all your work.
I couldn't locate mingw-w64-crt/math/x86/pow.def.h on the internet (URL ?),
but I assume the patch is concerned with raising a NaN to a power.
Given that raising an input NaN to a power does not always result in a NaN,
it seems a little suspicious that this has com
在 2019/7/31 上午5:07, Martin Storsjö 写道:
> Signed-off-by: Martin Storsjö
> ---
> mingw-w64-crt/math/lgammaf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
Thanks for your impressive work. These patches look good to me.
---
BTW:
> + if (signbit(x))
> +
Instead provide local wrappers that handle edge cases according to
C99, where msvcrt.dll's functions don't.
Signed-off-by: Martin Storsjö
---
mingw-w64-crt/Makefile.am | 12
mingw-w64-crt/lib-common/msvcrt.def.in | 8 ++--
mingw-w64-crt/math/arm-common/logb.c | 1
Signed-off-by: Martin Storsjö
---
mingw-w64-crt/math/lgammaf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mingw-w64-crt/math/lgammaf.c b/mingw-w64-crt/math/lgammaf.c
index 8c527dffc..b6a0581d5 100644
--- a/mingw-w64-crt/math/lgammaf.c
+++ b/mingw-w64-crt/math/lgammaf.c
@@
Signed-off-by: Martin Storsjö
---
mingw-w64-crt/math/erfl.c | 12
mingw-w64-crt/math/fp_constsl.c | 5 +
mingw-w64-crt/math/lgammal.c| 11 ++-
mingw-w64-crt/math/tgammal.c| 10 +-
4 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/mingw
While UCRT does provide long double variants of certain functions
(as required by C99), UCRT's long double is equivalent to regular
double (as in MSVC), while mingw uses 80 bit long doubles on x86.
There's probably ones that I have missed, but this at least fixes my,
at this point fairly extensive
The implementations of the long double versions use a few hardcoded
constants that assume that long double is 80 bit.
Signed-off-by: Martin Storsjö
---
mingw-w64-crt/math/coshl.c | 10 ++
mingw-w64-crt/math/sinhl.c | 11 ++-
mingw-w64-crt/math/tanhl.c | 11 ++-
3 files ch
Signed-off-by: Martin Storsjö
---
mingw-w64-crt/math/coshl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mingw-w64-crt/math/coshl.c b/mingw-w64-crt/math/coshl.c
index 4aaaf6e21..c5aaa73ec 100644
--- a/mingw-w64-crt/math/coshl.c
+++ b/mingw-w64-crt/math/coshl.c
@@ -30,7 +30
The mingw lgamma functions set the signgam variable (which provides
information about the last lgamma call, thread-unsafely though), which
the UCRT ones don't provide (and obviously doesn't touch the one
provided by libmingwex).
As this is an interface provided by mingw lgamma so far, we shouldn't
Setting e.g. the rounding mode with fesetround doesn't seem to set
the FPU control word for rounding, which means that other math
functions implemented in libmingwex don't round in the right direction.
Additionally it doesn't actually seem to have any effect on e.g.
UCRT's *rint* family of function
On ARM/ARM64, long double is 64 bit. The __INFL constant is defined
as a bit pattern which only works for the x86 80 bit long floats.
Instead return INFINITY, which the compiler can convert properly to
whichever length long double happens to have.
This was the only function where __INFL is refere
As long double is the same size as double on arm/arm64, just redirect
these functions to the normal unsuffixed version.
Signed-off-by: Martin Storsjö
---
.../lib-common/api-ms-win-crt-math-l1-1-0.def.in | 10 ++
mingw-w64-crt/lib-common/msvcrt.def.in | 10 ++
While the C99 standard doesn't explicitly require this, the standard
says it is recommended (F.9.13).
Signed-off-by: Martin Storsjö
---
mingw-w64-crt/math/arm-common/remquo.c | 4
mingw-w64-crt/math/arm-common/remquof.c | 4
mingw-w64-crt/math/erfl.c | 3 +++
mingw-w6
For zero, it should return HUGE_VAL (INFINITY), for negative integers,
it should return NAN.
Signed-off-by: Martin Storsjö
---
mingw-w64-crt/math/tgamma.c | 12 ++--
mingw-w64-crt/math/tgammaf.c | 11 +--
mingw-w64-crt/math/tgammal.c | 12 ++--
3 files changed, 29 insert
> 0) complexifies comparison of thread IDs without obvious benefits, and
The reverse argument is also true: using IDs would complexify everything else
with the only benefit of simplifying the equal primitive.
> 1) does not work reliably because handles can be duplicated, and
That's pure FUD.
>
19 matches
Mail list logo