*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
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
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
--
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
.
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
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
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
-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
. 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
, 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
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
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
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
-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
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
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
--
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
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
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
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
.
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
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
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
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
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
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
.
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
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
$ 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
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
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
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
,
/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
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
, 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
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
,
/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
+
+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
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
, 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
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
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
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
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
...
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
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
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
, 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
,
/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
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
, 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
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
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
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
...
)
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
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
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
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
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
), 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
, 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
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
,
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
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
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
)
__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
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
(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
, %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
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
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
,
/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
. 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
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
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
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
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
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
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
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
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
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
*/
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
= 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
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
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
101 - 200 of 723 matches
Mail list logo