Re: [PATCH 09/20] Prepare for creating hidden aliases of all routines

2013-03-04 Thread Niels Möller
*itself* is compiled with gcc, and work the same no matter which compiler is used for the application *using* gmp (and which will be processing the public gmp.h header)? I admit I don't understand the fine details here. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid

Re: [PATCH 01/20] Delete mpn/generic/sizeinbase.c

2013-03-04 Thread Niels Möller
certainly never built. Does anyone remember why it was deleted back then? I think it makes a lot of sense as a public mpn function. The file has seen some non-trivial updates by Torbjörn and Marco in recent years. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid

Re: [PATCH 00/20] Create and use hidden aliases in libgmp.so

2013-03-04 Thread Niels Möller
using non-trivial M4 macros, I find it's often more helpful to have gdb guide you in the .s file after macro expansion. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance

Re: [PATCH 00/20] Create and use hidden aliases in libgmp.so

2013-03-05 Thread Niels Möller
-- 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 http://gmplib.org/mailman/listinfo/gmp-devel

Re: [PATCH 00/20] Create and use hidden aliases in libgmp.so

2013-03-05 Thread Niels Möller
. 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 http://gmplib.org/mailman/listinfo/gmp-devel

Re: [PATCH 00/20] Create and use hidden aliases in libgmp.so

2013-03-05 Thread Niels Möller
Torbjorn Granlund t...@gmplib.org writes: ni...@lysator.liu.se (Niels Möller) writes: I would expect #line to cause syntax problem for macines where # is not a comment charachter. Like ARM, where #17 is the small constant argument 17. GNU as on my arm doesn't complain about #line

Re: [PATCH 00/20] Create and use hidden aliases in libgmp.so

2013-03-05 Thread Niels Möller
to use? ;-) 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 http://gmplib.org/mailman/listinfo/gmp-devel

Re: gmp-devel list

2013-03-06 Thread Niels Möller
-patch list? We need a forum for both posting patches, and discussing the same patches. To me, it seems easiest to have both on the same list. I take it the *huge* patch containing the generated configure script was a mistake. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred

Re: [PATCH 2/2] Optimize 64-bit mpn_add_N and mpn_sub_N for sparc T3 and later.

2013-03-07 Thread Niels Möller
. But appearantly there was no need for negation-on-the-fly tricks in submul_1, you just use subcc instead of addcc for the final subtraction (maybe we discussed that trick in some other context?). Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email

Re: mpn_cnd_add_n

2013-03-10 Thread Niels Möller
, r10 ADDSUBC r31, r0, r12 -- 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 http://gmplib.org/mailman/listinfo/gmp

Re: mpn_cnd_add_n

2013-03-12 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: Here's a patch that reorders the arguments for mpn_addcnd_n and mpn_subcnd_n (I think it's best to keep this change separate from the renaming, since the potential problems are quite different). This seems to work now, after additional fixes

Re: mpn_cnd_add_n

2013-03-13 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: I plan to check this in fairly soon. Checked in this renaming now. Next, I'd like to make mpn_cnd_add_n, mpn_cnd_sub_n and mpn_zero_p public (I guess that also implies some documentation...). mpn_zero_p is an inline function. In gmp.h, setting up

ARM neon pseudo op

2013-04-02 Thread Niels Möller
cycles/limb cycles/limb good to convince the assembler. Not sure if it's best to do this at the top of each file, or if it should somehow be handled by ASM_START. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale

Re: ARM neon pseudo op

2013-04-02 Thread Niels Möller
-stat:standard.txt Hmm, it's supposed to be a flag (-mfpu=neon) on the gcc command line? Then it's my fault... I had set CFLAGS manually to what gmp's configure selected for me some month or two ago, plus a -g. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26

Re: ARM public key benchmark

2013-04-02 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: I'm not yet using GMP's mpn_cnd_{add,sub}_n, that's the next thing I'd like to try. That wasn't a clear win... I use addmul_1 and submul_1 as a fallback (and I always do in-place operation, so that works). Now, cnd_sub_n beats submul_1 (except for n

Re: ARM public key benchmark

2013-04-03 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: So it should be doable with the addmul_1 loop and two additional, non-recurrency, not instructions per limb, and then maybe some extra logic for the return value. One could aim for 4.25 c/l, I guess. The below seems to give correct results

Re: ARM public key benchmark

2013-04-03 Thread Niels Möller
-- 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 http://gmplib.org/mailman/listinfo/gmp-devel

Re: ARM public key benchmark

2013-04-04 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: I'll also try using fewer updates of the up pointer, that seems to save half a cycle, and could perhaps speed up addmul_1 too. No speedup for addmul_1, unfortunately, but a saving for submul_1. Here are new versions of both files (for mpn/arm/v6). I

Re: ARM public key benchmark

2013-04-04 Thread Niels Möller
logic, I'm afraid. 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 http://gmplib.org/mailman/listinfo/gmp

Re: ARM public key benchmark

2013-04-04 Thread Niels Möller
of roughly 30 us. Which is disappointingly poor resolution. 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 http

Re: ARM public key benchmark

2013-04-04 Thread Niels Möller
. 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 http://gmplib.org/mailman/listinfo/gmp-devel

Re: Better tabselect

2013-04-10 Thread Niels Möller
C implementation which lack arithmetic shift, so I don't know how to test that change. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. ___ gmp-devel

Re: mini-gmp mpz_addmul_ui and mpz_submul_ui

2013-04-17 Thread Niels Möller
Torbjorn Granlund t...@gmplib.org writes: ni...@lysator.liu.se (Niels Möller) writes: I'm considering adding mpz_addmul_ui and mpz_submul_ui to mini-gmp. OK...due to popular demand? I just added mini-gmp in nettle. I don't use it for the librry itself (I might make that an option later

Re: Public mpz_ptr and mpz_srcptr

2013-05-02 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: Here's another possible use of mpz pointers: And another one, I just stumbled upon: Passing mpz_t to varargs functions, mpz_srcptr n = va_arg(args, mpz_srcptr); (I just edited that line to use mpz_srcptr. When I wrote the previous version 10 years

Re: _basecase or _sec? [

2013-05-02 Thread Niels Möller
without leaking. 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 http://gmplib.org/mailman/listinfo/gmp-devel

Re: _basecase or _sec? [

2013-05-02 Thread Niels Möller
sophisticated. 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 http://gmplib.org/mailman/listinfo/gmp-devel

Re: _basecase or _sec? [

2013-05-03 Thread Niels Möller
. It should be possible to do a non-leaky loop examining all limbs, without carry propagation. Just doing comparisions a[k] b[k] and a[k] == b[k], combining results with logic operations. No idea if that can be faster than a plain subtraction. Regards, /Niels -- Niels Möller. PGP-encrypted email

Re: Changes to mini-gmp and 5.1.2

2013-05-17 Thread Niels Möller
Torbjorn Granlund t...@gmplib.org writes: Should we move any of the mini-gmp changes to 5.1.2? I think the following would make sense to include: 2013-02-25 Niels Möller ni...@lysator.liu.se * mini-gmp/tests/t-double.c (testmain): Declare double variables as volatile

Re: caching of transforms used for large multiplications

2013-06-12 Thread Niels Möller
$ are of size $3n/4$ (cancellation!). Compute $\bmod (2^k \pm 1)$, with transform size $\approx 3n/4$. \pause \item \alert{Same transform size}, $3n/4$, no matter if reduced numbers are available or not! \end{itemize} \end{frame} -- Niels Möller. PGP-encrypted email is preferred. Keyid

Re: caching of transforms used for large multiplications

2013-06-13 Thread Niels Möller
at KTH, sharing a room with Torbjörn and working with integration and optimization of the subquadratic gcd code. I made a longer presentation at the department towards the end of that project. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email

Re: caching of transforms used for large multiplications

2013-06-15 Thread Niels Möller
in writing than communication between best friends, of course. 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

Re: intel core i5 ivy bridge

2013-08-15 Thread Niels Möller
or the gmp-bugs list as appropriate (see https://gmplib.org/#MAILINGLISTS). Or get a precompiled package for your operating system, e.g., apt-get install libgmp-dev on Debian GNU/Linux. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject

Re: Licensing issue with gnutls and gmp

2013-08-19 Thread Niels Möller
, /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 http://gmplib.org/mailman/listinfo/gmp-devel

Re: ARM public key benchmark

2013-08-23 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: David Miller da...@davemloft.net writes: #include linux/smp.h ... on_each_cpu(my_func, my_func_args, 1); Cool. I'll have to play with that, but probably not until next week. And some months later... I tried that now. I use the below linux

Re: automake -a

2013-09-23 Thread Niels Möller
, config.guess, etc). Makes sense to me, as long as removing files in the repo is decided on a case-by-case basis. E.g., I think the COPYING file should stay in the repo, even if automake -a currently installs an identical file. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid

Re: division-free binary-to-decimal conversion

2013-10-07 Thread Niels Möller
to give impressive speedups. And nice with another application of mulmid. I think I noticed one typo: On page 3, the second inequality just after Eq. (3), should probably say 0 = y/2^n 1, not 0 = y b^k / 2^n 1. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26

Re: mpn_divexact_1 comments

2013-10-16 Thread Niels Möller
, /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 http://gmplib.org/mailman/listinfo/gmp-devel

div_qr_1 interface

2013-10-16 Thread Niels Möller
+ +Contributed to the GNU project by Niels Möller + +THIS FILE CONTAINS INTERNAL FUNCTIONS WITH MUTABLE INTERFACES. IT IS +ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS +ALMOST GUARANTEED THAT THEY'LL CHANGE OR DISAPPEAR IN A FUTURE GNU MP +RELEASE. + + + Copyright

Re: div_qr_1 interface

2013-10-17 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: To get going, I've written C implementations of mpn_div_qr_1n_pi1 and mpn_divf_qr1n_pi1, and made divrem_1 call them. Below, also an mpn_div_qr_1, using these primitives (and with some inspiration from divrem_1). For return value, I use the type

Re: div_qr_1 interface

2013-10-17 Thread Niels Möller
, with on-the-fly shifting. 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 http://gmplib.org/mailman/listinfo/gmp

Re: div_qr_1 interface

2013-10-17 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: Consider the test compilation unit typedef struct { unsigned long q; unsigned long r; } qr_t; qr_t divrem (unsigned long u, unsigned long d) { qr_t res; res.q = u/d; res.r = u - res.q*d; return res

Re: div_qr_1 interface

2013-10-20 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: I'm about to push the first step, with C implementations of mpn_div_qr_1 and mpn_div_qr_1n_pi1. Done now, including some tuning code. It would be interesting to have DIV_QR_1N_PI1_METHOD DIV_QR_1_NORM_THRESHOLD DIV_QR_1_UNNORM_THRESHOLD added

Re: div_qr_1 interface

2013-10-20 Thread Niels Möller
is the same old reciprocal dinv = (B^2-1)/d - B, and B^2 - d*(B+dinv), same as for mod_1_1. And shiftcount, in the unnormalized case. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance

Re: div_qr_1 interface

2013-10-20 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: I'll try to get the x86_64 assembly for mpn_div_qr_1n_pi1 in soon. Pushed first working version now, see http://gmplib.org:8000/gmp/file/tip/mpn/x86_64/div_qr_1n_pi1.asm On my core2 laptop: $ ./speed -s 2-10,100,500 -C

Re: div_qr_1 interface

2013-10-21 Thread Niels Möller
... add U0, U1O We then have 26 instructions + loop overhead, or 54 instructions for 2 iterations. Or possibly DINV, if one thinks the quotient logic is less critical. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale

Re: div_qr_1 interface

2013-10-21 Thread Niels Möller
eliminated. 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 http://gmplib.org/mailman/listinfo/gmp-devel

Re: div_qr_1 interface

2013-10-22 Thread Niels Möller
and piledriver. /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 http://gmplib.org/mailman/listinfo/gmp-devel

Re: div_qr_1 interface

2013-10-22 Thread Niels Möller
, please consider putting the result in the k8 subdir. I'll try to get that done reasonably soon. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. ___ gmp

Re: div_qr_1 interface

2013-10-22 Thread Niels Möller
, /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 http://gmplib.org/mailman/listinfo/gmp-devel

Re: div_qr_1 interface

2013-10-22 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: ni...@lysator.liu.se (Niels Möller) writes: But sure, support also in try.c would be good. Added now. And sure enough, it detects some bugs in the new assembly code. For size n==1, there's a missing mov. I'll add that shortly. Then there's another

Re: div_qr_1 interface

2013-10-24 Thread Niels Möller
, UN, 8) instruction), I think the overlap issue will also get fixed in the process. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. ___ gmp-devel mailing

Re: A contribution to GMP

2013-10-24 Thread Niels Möller
mpf doesn't make any effort to have precisely defined rounding. But if it isn't faster in practice, and doesn't have any other advantages over mpfr, it would make sense to clearly deprecate all use of mpf. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet

Re: div_qr_1 interface

2013-10-24 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: Torbjorn Granlund t...@gmplib.org writes: Basically qp = up won't work, but qp = up + k for any positive k will? Does the C code share that property? [...] I think it would be good to fix that, since it is surely a common usage scenario. I agree

Re: div_qr_1 interface

2013-10-25 Thread Niels Möller
Torbjorn Granlund t...@gmplib.org writes: ni...@lysator.liu.se (Niels Möller) writes: The interesting thing is that the next higher function, mpn_div_qr_1, should return the high quotient limb separately. I am not sure I agree. Please explain. A long time ago, we choose an interface

Re: Amd64 relocation R_X86_64_32S in a static lib

2013-11-05 Thread Niels Möller
... ) Using the result of that test when deciding whether or not assembly files should use pic mode should give the correct behavior, both with compilers doing pic by default, and users enabling it explicitly. /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26

Re: Amd64 relocation R_X86_64_32S in a static lib

2013-11-05 Thread Niels Möller
to use in pic code. Offsets between text and data segment are usually known at link time. Does openbsd use some flavor of address space randomization which adds a random load-time offset between .text and .data? Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26

Re: Amd64 relocation R_X86_64_32S in a static lib

2013-11-05 Thread Niels Möller
the needed guarantee that it will never resolve to a symbol in a different shared object? I think references *within* a shared object is an important and common case, worthy of some optimization. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email

Re: [PATCH] Support powerpc64le-linux platform

2013-12-04 Thread Niels Möller
we'd still like to have some paperwork. We can arrange it off-list. 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

Re: porting gmp to pnacl

2013-12-20 Thread Niels Möller
luck in a forum more specific to your platform and toolchain. 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

Re: Side-channel silent modular inverse

2013-12-27 Thread Niels Möller
), but it ought have a much lower constant factor. I think powm actually was slower when I tried, for the sizes of a few limbs which were relevant for ecdsa, but I'm not sure. Some benchmarking is needed. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email

Re: Side-channel silent modular inverse

2013-12-27 Thread Niels Möller
, invoke mpn_sub_n. That doesn't make it conditional. And I see no obvious way to do conditional negation on top of mpn_cnd_sub_n. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance

Re: Including limits.h in gmp-impl.h

2013-12-27 Thread Niels Möller
Marc Glisse marc.gli...@inria.fr writes: Then I am considering pushing the attached patch soon. Do we really need a configure test? Which C compilers lack limits.h? Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale

Re: Side-channel silent modular inverse

2013-12-27 Thread Niels Möller
, and this is a performacne critical function; some 30% of the time to create a side-channel silent ecdsa signature is spent doing the modular inversion. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance

Re: Side-channel silent modular inverse

2013-12-27 Thread Niels Möller
back from jacobian representation to affine representation. Then the z coordinate is inverted mod p. My suggestion was just for a reasonably efficient fall-back. Fair enough. /nisse -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale

Re: TODO for 5.2

2013-12-29 Thread Niels Möller
mpz_sec_invert? 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

Re: [PATCH 01/20] Delete mpn/generic/sizeinbase.c

2014-01-01 Thread Niels Möller
) __GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); -- 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

Re: Including limits.h in gmp-impl.h

2014-01-02 Thread Niels Möller
could be improved. But if you intend to remove the definition soon anyway, it doesn't matter. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. ___ gmp

Re: [PATCH 01/20] Delete mpn/generic/sizeinbase.c

2014-01-02 Thread Niels Möller
(which returns 1) is more important. That would be a compatible extension of the currently documented interface, so it doesn't have to be decided before release. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government

Re: TODO for 5.2 v3

2014-01-07 Thread Niels Möller
, %r10 + xor %r9, %r8 + and cnd, %r8 + xor %r8, %r10 + xor %r8, %r9 + mov %r10, (up, n, 8) + mov %r9, (vp, n, 8) + inc n + jne L(loop) + + FUNC_EXIT() + ret +EPILOGUE() -- Niels Möller. PGP-encrypted email

Re: TODO for 5.2 v3

2014-01-13 Thread Niels Möller
bodr...@mail.dm.unipi.it writes: Ciao, Il Mar, 7 Gennaio 2014 4:58 pm, Niels Möller ha scritto: Here's a first patch adding a couple of other functions. Benchmarking and testing is missing (except that the sec_minvert tests still pass). Interesting... Another thing I was about to ask

Re: mini-gmp

2014-01-18 Thread Niels Möller
that for mpn_divrem_1, but not for mpn_divrem and mpn_tdiv_qr? 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

Re: Cleaning out varargs

2014-01-19 Thread Niels Möller
, /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

Re: Cleanups

2014-01-19 Thread Niels Möller
. Maybe some abbreviation of that would make sense. Also applies to invert_limb. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. ___ gmp-devel mailing list

Re: mpz_limbs interface

2014-01-21 Thread Niels Möller
this style should be officially supported in the public gmp interface. mpz_urandomb is not included in mini-gmp, but if you, e.g., try the same with other functions, it will most likely break with mini-gmp which assigns many of the output parameters using mpz_swap. Regards, /Niels -- Niels Möller

Re: mpz_limbs interface

2014-01-21 Thread Niels Möller
Torbjorn Granlund t...@gmplib.org writes: ni...@lysator.liu.se (Niels Möller) writes: I see. In this particular case, I think the right gmp interface change is to add mpn_urandomb and mpn_rrandomb (similar to current mpn_random and mpn_random2, but with a randstate argument). If I

Re: mpz_limbs interface

2014-01-21 Thread Niels Möller
to the frequent use of mpz_swap). 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

Re: New mpn random generators

2014-01-21 Thread Niels Möller
Torbjorn Granlund t...@gmplib.org writes: ni...@lysator.liu.se (Niels Möller) writes: After 5.2? Probably, but you're welcome to fix it today also. :-) Or would you suggest that we postpone the release? No, I donät think the release whould wait for new randomness functions. As you

Re: mpz_limbs interface

2014-01-21 Thread Niels Möller
as an mpz_t output might do an unexpected reallocation. When does this situation arise? In the given example, the root cause was a missing mpn-level function in gmp. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government

sec_invert performance

2014-02-04 Thread Niels Möller
74.7026 119#374872.00 48.6011 74.7945 120#376131.00 48.3491 75.4658 Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance

Re: sec_invert performance

2014-02-04 Thread Niels Möller
for sizes above the threshold for subquadratic gcdext). 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

Re: sec_invert performance

2014-02-04 Thread Niels Möller
try to estimate all of A, B and C from the measurements. Putting such numerics into speed is something I'd like to do sometime). Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance

Re: mpz_limbs interface

2014-02-06 Thread Niels Möller
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

Re: mpz_limbs interface

2014-02-06 Thread Niels Möller
*/ 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 not excluded by that assert. But I'm not familiar with those fine floating point details. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid

Re: mpz_limbs interface

2014-02-06 Thread Niels Möller
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

Re: mpz_limbs interface

2014-02-06 Thread Niels Möller
the sign argument, and and use the sign of the size argument, or limit to non-negative numbers only (it's trivial for the caller to negate the output when desired). Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government

Re: mpz_limbs interface

2014-02-06 Thread Niels Möller
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

Re: mpz_limbs interface

2014-02-07 Thread Niels Möller
significant one bit must be placed in a fix position). * mpfr, which as far as I understand doesn't do limbification in the same way as mpf. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance

Re: mpz_limbs interface

2014-02-07 Thread Niels Möller
to avoid doing realloc twice. With the above, you may realloc once growing the allocation to MPN_SET_D_SIZE (which could be 2), and then realloc again in mpn_mul_2exp. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government

Re: mpz_limbs interface

2014-02-08 Thread Niels Möller
is this intended for? Looks a bit like like mpz_init2. 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

mpn_sec_div tests

2014-02-08 Thread Niels Möller
just above, but using dnp (normalized divisor) rather than dup. So maybe the mpn_sec_div_qr call overwrites something in this case? I'll try to debug this fairly soon. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale

Re: mpn_sec_div tests

2014-02-08 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: I'm a bit puzzled. I can't spot any error in the test code (which is a copy of the test just above, but using dnp (normalized divisor) rather than dup. Found it now. Comment a few lines down: pass qp[] from the previous function

mpn_sec_powm

2014-02-09 Thread Niels Möller
of this tuneup peculiarity (see https://gmplib.org/devel/lcov/shell/tmp/lcov/gmp/mpn/sec_powm.c.gcov.html). And I'd like to eliminate that test. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance

Re: mpz_roinit_n documentation

2014-02-09 Thread Niels Möller
think it deserves documentation. Can you add that? Also applies to the MPZ_ROINIT_N macro. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. ___ gmp-devel

Re: mpn_sec_powm

2014-02-10 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: After some discussion with Torbjörn, I intend to change mpn_sec_powm to take the exponent size argument in bits, rather than limbs (because the current code may leak high bit of the exponent, which can cause serious problems for some applications

Re: mpn_sec_powm

2014-02-11 Thread Niels Möller
in the docs and the code. /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

Re: mpn_sec_powm

2014-02-11 Thread Niels Möller
your choice). Docs for mpf_urandomb use nbits. Other mp_bitcnt_t arguments in the manual give little guidance, names like n, op, starting_bit, bit_index, prec, bit, m2exp. So enb here is as good as any. /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email

Re: mpn_sec_powm

2014-02-11 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: Maybe one problem is that to make a fair comparison between window sizes k and k+1, the exponent bit size should be divisible by both k and k+1. I'm testing the below patch. Output from four consecutive runs: #define POWM_SEC_TABLE

Re: sec_karatsuba

2014-02-11 Thread Niels Möller
= n)) { mpn_mul_basecase (rp, ap, an, bp, bn); return; } I think I'd prefer to do the check for the too unbalanced case earlier, and not rely on t being signed. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject

Re: Bug found in nightbuilds

2014-02-15 Thread Niels Möller
which is broken? And there's no (non-inline) assembly involved, its generic/mpn_div_qr_1.c. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. ___ gmp-devel

Re: Bug found in nightbuilds

2014-02-16 Thread Niels Möller
could optimize it away also if the threshold is 1, but I have no idea if gcc does that. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. ___ gmp-devel

<    1   2   3   4   5   6   7   8   >