ike valgrind don't complain.
And there are also thread-safety issues; currently GMP leaves all such
problems to the provided allocation function, while a cache would need
some thread-local storage (or locks, but I guess that's highly
undesirable if the idea is to gain performance).
Regards,
/Niels
--
as case (2), and the allocated storage will leak. But I think it
is acceptable to have some random bad things happen on misuse.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
___
ay be needed; I think both abort and raise are ANSI
C, but I suspect SIGFPE isn't.
Depending on pthreads functions is undesirable.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government
roval procedure at work.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel
of elements and terminate.
// Compute full products. If practical, high limb first with early
// termination.
return sgn (a d - b c)
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
___
e. Couldn't find a howto for contributors on the website,
> would've sent a patch directly otherwise.
Please send patches to this list. For non-trivial changes, we ask for a
Free Software Foundation copyright assignment.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Key
ault handler. Still tricky
to safely use a handler which doesn't terminate the program, but at
least cleaner and more portable than using signal handlers. In
particular, mixing signals and longjmp really makes me uneasy...
Not sure what the other developers think?
Regards,
/Niels
--
Niels Möller. PG
ndefined behaviour.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel
t;
> [1] https://gmplib.org/repo/gmp/
Maybe there's something wrong with the mirroring to the public repo?
It's missing my checkin and a previous one of Torbjörn's, compared to
what I see with ssh access to shell.gmplib.org/var/hg/gmp.
Regards,
/Niels
--
Niels Möller. PGP-encrypted emai
gh precision per-process cpu time.
And it's news to me that the old clock function uses the same timers in
recent glibc. But it sounds nice. What's the value of CLOCKS_PER_SEC?
Does it match the actual resolution?
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26
to try to merge my old bdiv changes? I don't even
recall the details, but IIRC, the log message is "New bdiv convention, R
B^{qn} = U + Q D", and I think the bdiv return value is also the carry
out from that addition.
In ~nisse/hack/gmp-bdiv on shell.
Regards,
/Niels
--
Niels
reak.
I think the autoconf manual recommends an explicit include of config.h
(guarded by HAVE_CONFIG_H) first in every C file. We don't have to do it
that way of course, just be aware that we depart from that convention.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid
an integer",
and treated as one.
/nisse
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel
far as I can see, and most recently mentioned in
ChangeLog back in 2002.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-deve
nput characters are considered to terminate the input.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-devel@gmplib.org
htt
Extending support up to base == 62 sounds reasonable to me.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel
riable, use a separate int res.
> gmp_free (buf);
> /* 0 on error else number of characters read excluding null-terminator */
Drop " excluding...", or change "null-" to "NUL ".
> return (c == -1 ? 0 : nread);
> }
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel
support for base == 0 for the
mini-gmp version of mpz_inp_str, if that makes things simpler.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
___
gmp-devel
ld make more sense to me to treat that as an error.
> else
> {
> base = -base;
> if (base > 36)
>return NULL;
>}
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government sur
e to add such checks in GMP code?
It's not that hard to add new assembly files. You need to know some
assembly, of course. And be aware that gmp uses m4 to preprocess
assembly source files.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subj
tach an alternative patch. Please revise it.
Looks good. Only detail I don't quite like is the variable name
"lowercaseoffset". Maybe "value_of_a" (since it's the value of the
digit 'a')? Or at least add an underscore or two, lowercase_offset.
Thanks,
/Niels
--
Niels Möller. PGP
with shift should be
equivalent to the current mpz code, maybe mine too (it essentially
combines the shift with the addmul_1 call).
> Is it worth doing?
I think it's desirable to eliminate the dependency on mpz. How important
it is not change the seed --> sequence mapping, I don't know
ul wins over repated mul_1.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel
> its length in limbs is not smaller than the length of B.
Maybe the way mpn_gcdext handles this can be more or less unchanged. But
we shouldn't have to zeropad the input.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale gove
ni...@lysator.liu.se (Niels Möller) writes:
> Is this 6 year old post still valid?
Hmm, here's a related gcc bug with is marked as fixed,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51880, also marked as a dup
of the old bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19520 Ian
ref
e, which would be an issue
if we have lots of "protected" symbols, and IIRC, I think Ian said that
glibc's ld.so was poorly optimized for this case, so protected symbols
could make library load slower than using "default" visibility.
/Niels
--
Niels Möller. PGP-encrypted emai
prefer to not have
any version number here. And if a program needs to test for a particular
gmp feature, I *strongly* recommend doing traditional autoconf-style
functional tests for the features that are actually needed.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E
lag saying "ignore hidden"? Or simply collect the object files
into a static library.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mail
se are needed if using shared
libraries installed in some location not included in the default ld.so
search path. E.g., say I configure gmp with --prefix=/pkg/gmp/6.1.1/x86_64,
without adding the corresponding lib directory to /etc/ld.so.conf or
similar.
Regards,
/Niels
--
Niels Möller. PGP-e
; I have a very
fuzzy understanding of the details).
And if the code is expected to be pic and sharable at loadtime, neither
reloc type should be used in the text or rodata segment; while
R_X86_64_64 is perfectly fine for tables placed in the data segment.
Regards,
/Niels
--
Niels Möller. PGP-encrypt
.
At this point in time, I think use-cases involving static libgmp.a (or
libnettle.a) are somewhat obscure.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
_
maybe something is broken.
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel
currently causes some trouble in
> configure).
>
> Note that I do not care about security in either case.
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-
//gmplib.org/devel/incompatibility.html
Agreed, and it's not obvious what's the right interface either.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-
bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226)
[sender=3.1.2]
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government survei
to think about whether we should
make a "mini-gmp release" with bug-fixes, or just send out an
announcement.
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
const mpz_t u, unsigned long v)
{
! if (GMP_ABS (u->_mp_size) > 1)
return 1;
! else
! return GMP_CMP (mpz_get_ui (u), v);
}
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
ich could if it now passes? The
LD_LIBRARY_PATH fixes?
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.or
st inputs and validation of results
somehow suits my taste better, but I have no good rational motivation
for that.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
__
nd).
It won't save much for the computation, only the final copy. But it's
also a gain to clarity if callers don't have to pass in dummy, unused,
result arguments.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale
is that it should work also for compound
initialization, like
struct { int x; mpz_t y; } foo = { 1, MPZ_INITIALIZER; };
I think it might be useful to eventually make public too.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subj
ter range. E.g, low 48 bits of 100*tv_sec +
tv_usec would wraparound in almost 9 years, and tv_sec + tv_usec << 28
would also fill 48 bits and collide rarely.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
I
R_BUILD)" EXTRA_CFLAGS="-g -I../.." check
+ CC="$(CC)" EXTRA_CFLAGS="$(CFLAGS) -g -I../.." check
clean-mini-gmp:
if [ -d mini-gmp/tests ] ; then \
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Ke
n that's bad.
I agree. Is there any easy way to use GNU make only for make
check-mini-gmp? Either in test scripts, or automatically in that target
(the make used for the target itself doens't matter, it's the recursive
make, currently using $(MAKE), that really needs GNU make.
/Niels
--
Niels
t-gcd
So this one isn't clang only.
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/lis
e problems, please strike the
> entire item by using Please also clean up the
> ~gmp/gmp/check/failure report files.
How, more precisely? Just delete the corresponding files? E.g,
shell.gmplib.org-dyn-gcc49-g++49:64.txt
shell.gmplib.org-dyn-gcc49-g++49:64.txt.gz
/Niels
--
Ni
on shell fails with
connection refused). And this failure was on the non-virtualized host
sky, right, not on one of the vms?
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel
t...@gmplib.org (Torbjörn Granlund) writes:
> ni...@lysator.liu.se (Niels Möller) writes:
> I don't think so. But I think the right way is to simply add $(CFLAGS)
> to the linker command line. That's the usual way to use it, right? And
> omitting it in the linking rule in mi
t-signed.c:93:8: runtime error: signed integer overflow: -1 +
-9223372036854775808 cannot be represented in type 'long int'
FAIL: t-signed
It would make sense to test both gmp and mini-gmp with
-fsanitize=undefined.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid
t...@gmplib.org (Torbjörn Granlund) writes:
> ni...@lysator.liu.se (Niels Möller) writes:
>
> I tried to mark the mini-gmp t-limbs section with , but saving my
> changes from emacs failed,
>
> My bad, please try now.
Worked better now.
> How, more p
like.
For mini-gmp, I hope running the testsuite with a large number of random
seeds should give good coverage, so we don't need any additional
framework.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale g
ni...@lysator.liu.se (Niels Möller) writes:
> Anyway, I can now repro locally, by running
>
> make check CFLAGS="-O -Wall -g -fsanitize=undefined -fno-sanitize-recover"
>
> in the mini-gmp/tests source directory. This fails with
>
> t-signed.c:93:8: runtime err
d, t-powm and t-div) were all
caused by the bug in mpn_invert_3by2, so hopefully fixed now. Or have
you seen any new failures for those?
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale governme
e what the behaviour is without that, if the program might complete
normally with just logging of problems, or if detected problems still
makes it exit with non-zero status.
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government survei
, e.g., HAVE_GETPID and
HAVE_GETTIMEOFDAY.
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel
we should have a separate macro for the
initializer (and preferably point to some shared read-only limb). Or
make mpz_init inline?
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
__
d and 3-operand variants.
> The old macros checked res3 even when it was not part of the
> computation, exhibiting possibly undefined behaviour.
>
> OK with you to commit?
Looks good to me, go aehad.
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet em
(NULL, y, t, y, x);
> mpz_gcdext (NULL, s, x, x, y); mpz_gcdext (NULL, x, t, y, x);
> mpz_gcdext (NULL, NULL, y, x, y); mpz_gcdext (NULL, x, NULL, x, y);
^
> mpz_gcdext (NULL, NULL, x, x, y); mpz_gcdext (NULL, y, NULL, x, y); ?
^
Maybe, except for the abov
Marc Glisse <marc.gli...@inria.fr> writes:
> On Sat, 3 Dec 2016, Niels Möller wrote:
>
>> Hmm, you changed the code to not only allow G to be NULL, but allow NULL
>> S too?
>
> That was already the case before my patch.
Sorry for the confusin, I had forgotten
s,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel
mini-gmp test.
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel
ni...@lysator.liu.se (Niels Möller) writes:
> In the case
>
> mpn_gcdext(G, S, NULL, A, B)
>
> with size(A) < size(B), IIRC we currently handle that by swapping
> arguments, calling mpn_gcdext to compute T (even though the caller
> didn't need that, and produce S with
.c" or
"a.out" files in my gmp tree. Please also provide the additional
information requested in the Bug reporting instructions in the manual.
For what it's worth,
TESTS_ENVIROMENT=valgrind make check
works fine in my gmp build.
Regards,
/Niels
--
Niels Möller. PGP-encrypted
eed to either keep
MPZ_REALLOC, or check for that special case. So I'm afraid the reuse
test doesn't hit this corner...
Regards, and Happy New Year,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
_
Emmanuel Thomé <emmanuel.th...@inria.fr> writes:
> On Wed, Jan 04, 2017 at 03:08:57PM +0100, Niels Möller wrote:
>> I'm also a bit puzzled. And after a quick look, I can't find any
>> lshift_com function in mul_fft.c (or anywhere else but acinclude.m4).
>
> It's
ers to the initial values of these variables. Which can be
accumulated into the final product.
But it still won't beat the plain version on any machine with a
reasonable mul-instruction.
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 36
t...@gmplib.org (Torbjörn Granlund) writes:
> ni...@lysator.liu.se (Niels Möller) writes:
>
> Hi, I'm considering adding no-overlap asserts to mini-gmp's mpn_mul
> function. Any reason not to? If we do it by copying the MPN_OVERLAP_P
> macro, we should add a GMP_-prefi
t...@gmplib.org (Torbjörn Granlund) writes:
> These date back to 68020 and 80386. I.e., quite obsolete. :-)
Gone now.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveilla
11 bits */
One could save an instruction with using just
l(a) = (a >> GMP_NUMB_BITS - 20)
and adjusting the tables accordingly. You'd get a larger multiply, but
limiting to 16x16 is probably not a saving on relevant platforms.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email
as the additional advantage that more
of the evaluation work is loop-invariant, and we could also jump to
separate innerloops depending on the carry bits from evaluation.
Perhaps this is still crazy, and useful only for machines with very slow
multiplication.
Regards,
/Niels
--
Niels Möller. PGP-e
t...@gmplib.org (Torbjörn Granlund) writes:
> ni...@lysator.liu.se (Niels Möller) writes:
> we might also try doing addmul_2 using toom32, which
> would save 1/3 of the mul instructions. Toom32 is nice because we can
> use the four easiest evaluation points: 0, infini
rk to first take out powers of two, and then rewrite
multiplies as squares like
n (n-2) = (n-1)^2 - 1
n (n-2)(n-4)(n-6) = [(n-3)^2 - 5]^2 - 25
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholes
y more smooth, since it's going to be huge
compared to n, but still can't have any prime factors larger than n. But
we can still have lots of prime factors in the range k < p <= n.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wh
ar combination a <-- k a + m b (like the "accelerated gcd"
by Ken Weber, and with some need to handle spurious factors).
One can gain one bit by using signed values, though, and choose q so
that |q| < 2^{k-1}). Putting k = 3 (as you suggest) and |q| < 4 might
give a speedup o
icated random numbers is out-of-scope for
mini-gmp.
> and finally mpz_dump.
Hmm. It seems this function is declared in gmp.h, but not mentioned in
the manual, and with a discouraging comment at the top of mpz/dump.c.
Any reason you can't switch to always use mpz_out_str instead?
Regards,
/Niel
be? The only
"releases" of mini-gmp are gmp releases, should we adopt that, and then
have no well-defined version number for mini-gmp between gmp releases?
I'm afraid I'm still a bit confused, and I don't quite understand what
problem you are aiming to solve with additional defines in min
nice, but it's also massive overkill.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel
d) - l;
+ if (r > 0)
+ s -= 2*r;
+ d = s;
weight /= MP_BASE_AS_DOUBLE;
if (weight == 0)
break;
> 3) Drop the generic path. It hasn't passed the testsuite for a long
> time, can't be that important.
If we keep it, we'd need to (i) fix
Marc Glisse <marc.gli...@inria.fr> writes:
> On Sat, 28 Oct 2017, Niels Möller wrote:
>
>> It would be nice if we could find a portable way to add two floating
>> point values without rounding up. Would something like this work?
>>
>> s = a + b; /*
e
q = divappr_2(...);
submul_1 + adjustment
}
Left to do is strict analysis of the case d0 == 0, the code seems to
work fine without any special case for that, even the computation of r1
(based on the assumption that d0 > 0) is off by one in this case.
Regards,
/Niels
--
we would get for the correct quotient. I.e., that the
qh return values from div and divappr always match. Seems particularly
unlikely for the mu divappr, which can have an error larger than 1 unit.
Not sure how to come up with an example, though.
Regards,
/Niels
--
Niels Möller. PGP-encrypted e
c keeps supporting thuis case.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel
_np, np + nn - new_nn, new_nn, cnt);
...
qh = mpn_sbpi1_divappr_q (tp, new_np, new_nn, new_dp, qn + 1, dinv.inv32);
implies that new_nn and the shift are twice as large as they need to be
(new_nn should be only qn+2).
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Ke
ni...@lysator.liu.se (Niels Möller) writes:
> --- a/tests/mpn/t-div.c Wed Apr 25 07:38:14 2018 +0200
> +++ b/tests/mpn/t-div.c Wed Apr 25 22:19:17 2018 +0200
> @@ -445,6 +445,7 @@ main (int argc, char **argv)
> alloc = itch + 1;
> }
> s
t behaves in the same friendly way.
E.g., in case we for some reason change the internals to break
assignment to non-zero unallocated objects, we could hack mpq_denref to
do a real allocation if needed (except that the macro is documented to
work on a const mpq_t). Or go back to using an allocate
ni...@lysator.liu.se (Niels Möller) writes:
> Once we reach qn = dn - 1, keep looping to produce quotient limbs, but
> also discard one limb of dp in each interation, until we in the final
> iteration have qn = 1, qn+2 = 3 numerator limbs, and qn+1 = 2 divisor
> limbs, i.e., a single
arguments to be normalized up
front, but instead just normalizes top limbs on the fly.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-devel mailing
this.
> +
> +@code{mpz_t} variables initialised with the @code{mpz_roinit_n} function
> +or the @code{MPZ_ROINIT_N} macro have @code{_mp_alloc = 0} but can have a
> +non-zero @code{_mp_size}. They can only be used as read-only constants.
> +See @ref{Integer Special Functions} for det
his strange C++ quirk by
expanding NULL to some magic *slightly* different from 0, which will
produce some warnings if it used as an integer rather then pointer).
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale go
ay 18 07:24:52 2018 +0200
> @@ -50,6 +50,9 @@
>
> #include "mini-gmp.h"
>
> +#if !defined(DONT_USE_FLOAT_H)
> +#include
> +#endif
Makes sense to me, provided that the define also excludes whatever
mini-gmp functions depend on float.h (which would be get_d and set
s 2^i +/- 1 to double and
comparing the results (before your fix, mini-gmp rounded to nearest,
producing identical doubles for large enough i).
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
nter can use different representation than void*.
If that really is the case, most occurences of NULL or (void*)0 in the
argument list in the call of a varargs function would be undefined
behavior, right?
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
In
e
struct, i.e., the type that an mpz_t "decays" to in expression context.
> (Should we provide similar types for mpq and mpf?)
Yes. In m opinion, every advertised typedef of an array type should have
a corresponding advertised pointer type.
Regards,
/Niels
--
Niels Möller. PGP-encrypt
"Marco Bodrato" <bodr...@mail.dm.unipi.it> writes:
> I merged the current head with that 10 years old repository, try again.
Thanks for taking care of that!
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to w
they were implemented as (inline) functions
rather than macros.
I don't think need for handling pointers is that common in GMP user
code, but not so obscure that it should be ignored and unsupported.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Intern
ame for the internal types, but
actual names for types defined. I'd prefer to either use the actual
internal name __mpz_struct instead of some_internal_data_type above, or
change to the obviously made up name foo consistently, like
typedef foo_internal foo_t[1];
typedef foo_internal * foo
"Marco Bodrato" <bodr...@mail.dm.unipi.it> writes:
> Il Dom, 20 Maggio 2018 9:57 pm, Niels Möller ha scritto:
>> You could consider making this into small step towards modularizing
>> mini-gmp. Something like
>
>> #ifndef MINI_GMP_FLOAT_SUPPORT
>
>&g
ithout HAVE_DOUBLE_VAX_D?
Testing the generic code seems more important than testing VAX-specific
optimizations.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
_
t...@gmplib.org (Torbjörn Granlund) writes:
> ni...@lysator.liu.se (Niels Möller) writes:
>
> Yes. By one if divappr_2 can produce a useful single-limb
> remainder, otherwise by two.
>
> I am very curious about the result of this work. A larger submul_1
> trip
t...@gmplib.org (Torbjörn Granlund) writes:
> So the submul_1 size agument will increase slightly?
Yes. By one if divappr_2 can produce a useful single-limb
remainder, otherwise by two.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet em
301 - 400 of 723 matches
Mail list logo