ni...@lysator.liu.se (Niels Möller) writes:
For mpn_set_d, I think it would make some sense to have it return a
base-2 exponent, and write the mantissa to a few limbs. Number of limbs
would be a constant, part of the ABI, similar to LIMBS_PER_DOUBLE but
renamed for external use.
On Thu, 6 Feb 2014, Niels Möller wrote:
ni...@lysator.liu.se (Niels Möller) writes:
For mpn_set_d, I think it would make some sense to have it return a
base-2 exponent, and write the mantissa to a few limbs. Number of limbs
would be a constant, part of the ABI, similar to LIMBS_PER_DOUBLE but
Marc Glisse marc.gli...@inria.fr writes:
Why not return int, since int is what we use for _mp_size?
int would be sufficient for all known float formats I guess. I choose
long because that was the signed type closest to mp_bit_cnt_t.
Is 53 really safe for non-IEEE double? Maybe something based
On 2014-02-06 11:54:04 +0100, Niels Möller wrote:
Marc Glisse marc.gli...@inria.fr writes:
+ ASSERT (d != 0.5*d); /* Exclude infinities */
That excludes more than infinities, it might also exclude
FLT_TRUE_MIN, no?
I would have expected that FLT_TRUE_MIN * 0.5 == 0.0. And then it's
Vincent Lefevre vinc...@vinc17.net writes:
In rounding mode toward +inf (FE_UPWARD), FLT_TRUE_MIN * 0.5 gives
FLT_TRUE_MIN.
I see.
You may need:
ASSERT (d - d == 0);
That should exclude both infinities and NaN:s, right?
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is
On 2014-02-06 12:46:05 +0100, Niels Möller wrote:
Vincent Lefevre vinc...@vinc17.net writes:
You may need:
ASSERT (d - d == 0);
That should exclude both infinities and NaN:s, right?
Yes. If you want to differentiate between NaN and infinities:
d != d is true only for NaN.
--
Vincent
Vincent Lefevre vinc...@vinc17.net writes:
Yes. If you want to differentiate between NaN and infinities:
d != d is true only for NaN.
I'm looking at the definition of DOUBLE_NAN_INF_ACTION in gmp-impl.h.
Maybe it could be simplified to a single, unconditional, definition
#define
On Thu, 6 Feb 2014, Niels Möller wrote:
Vincent Lefevre vinc...@vinc17.net writes:
Yes. If you want to differentiate between NaN and infinities:
d != d is true only for NaN.
I'm looking at the definition of DOUBLE_NAN_INF_ACTION in gmp-impl.h.
Maybe it could be simplified to a single,
Marc Glisse marc.gli...@inria.fr writes:
On Thu, 6 Feb 2014, Niels Möller wrote:
I'm looking at the definition of DOUBLE_NAN_INF_ACTION in gmp-impl.h.
Maybe it could be simplified to a single, unconditional, definition
Note that there exist standard functions like isfinite.
But so far, we
On Thu, 6 Feb 2014, Niels Möller wrote:
Marc Glisse marc.gli...@inria.fr writes:
Note that there exist standard functions like isfinite.
But so far, we don't use any libm functions in gmp.
True.
* no slower then the _GMP_IEEE_FLOATS definition (which extracts the
exponent via a
ni...@lysator.liu.se (Niels Möller) writes:
Below is a patch to do this (and return value is long, not mp_bitcnt_t,
since it needs to be signed).
What do you think?
I'm to busy to make an educated analysis.
Why isn't __gmp_extract_double's style OK for mpn_set_d? Is its
conventions
11 matches
Mail list logo