Skip over the low 0-words, take negative of the next one (-x), and one-s
complement the rest (~x). Let the compiler do any unrolling.
hhr
On 11/22/2023 5:26 PM, Raul Miller wrote:
mpn_com finds the two's complement of an extended precision integer
(when working with the underlying unsigned representation).
Its only relevance to this problem is that it's a dependency which
needs to be addressed before this code could work.
I could implement it in C, but the assembly version in libgmp is
presumably faster.
--
Raul
On Wed, Nov 22, 2023 at 11:11 AM Raul Miller <rauldmil...@gmail.com> wrote:
It's probably also worth noting that the version of mpir at
https://github.com/wbhart/mpir has mpn_com
--
Raul
On Wed, Nov 22, 2023 at 10:42 AM Raul Miller <rauldmil...@gmail.com> wrote:
Ugh...
Very old versions of libgmp did not have mpn_com.
And, on windows, we have been using the mpir fork of libgmp, which I
have very little insight into. I don't remember the technical reasons
about why we're using that fork there, but I'm now wondering if it
might be easier to create our own j specific fork of libgmp which
returns null for memory allocation issues...
--
Raul
On Wed, Nov 22, 2023 at 10:18 AM Henry Rich <henryhr...@gmail.com> wrote:
When I load your script I get
error loading mpn_com
hhr
On 11/21/2023 8:12 PM, Raul Miller wrote:
I forgot that the mail server filters out .ijs files.
Hopefully, the attachment will come through this time, with the
extension changed to .txt
(Also, I have seen some odd behavior in my testing, and I have some
concern that this issue might have a hardware-dependent character. So
it would be good to find out if there's machines which do not segfault
with this script with mem audit enabled on the gmp-redo0 branch.)
Thanks,
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm