Dim XY <dim0...@gmail.com> writes:

  a=-2014444032  //  <----- incorrect, lost value!!

  Possible explanation:

  mpz_set_si function has the signature:

  void mpz_set_si (mpz_ptr dest, signed long int val);

Indeed. And you pass an int64_t which may or may not be "signed long
int".  That's a bug in your program, which I suppose you already
understand.

  This 'signed long int' type has different sizes of linux (8 bytes) and
  windows 64bit (4 bytes) platforms
  (https://en.cppreference.com/w/cpp/language/types)

  Maybe it is better to use 'long long' type which always has the size
  of 8 bytes on any platform?

You're essentially lobbying for an incompatible change in GMP by
making a spurious GMP bug report.

-- 
Torbjörn
Please encrypt, key id 0xC8601622
_______________________________________________
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs

Reply via email to