Actually we already have the mpn_divmod in there, as some devels felt
it was too useful to get rid of. So no need to add that.

Bill.

On 8 April 2010 22:40, Bill Hart <goodwillh...@googlemail.com> wrote:
> That's what I thought we were going to do. But I guess no one did it.
>
> Anyhow, the function mpz_mdivmod_ui can be obtained with one of the
> following defines for backwards compatibility with GMP version 1
> (deprecated 15 years ago)!!
>
> #define mpz_mdiv        mpz_fdiv_q
> #define mpz_mdivmod     mpz_fdiv_qr
> #define mpz_mmod        mpz_fdiv_r
> #define mpz_mdiv_ui     mpz_fdiv_q_ui
> #define mpz_mdivmod_ui(q,r,n,d) \
>  (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d))
> #define mpz_mmod_ui(r,n,d) \
>  (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d))
>
> I'm sure someone will also need:
>
> #define mpn_divmod(qp,np,nsize,dp,dsize) \
>  mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize)
>
> However, how are any of these projects ever going to know their code
> is out of date if we just put all these defines back in? Better for
> them to break and add the defines as needed.
>
> For sage, these defines will have to be placed in gmp-h.in rather than
> gmp.h (and then reconfigure and make MPIR), but just for temporary
> testing it is fine to put them in gmp.h.
>
> Bill.
>
>
>
> On 8 April 2010 22:33, William Stein <wst...@gmail.com> wrote:
>> Hi,
>>
>> Next problem:  Singular doesn't build with MPIR-2.
>>
>> ...
>> g++ -c fac_cantzass.cc -w -fno-implicit-templates -I. -I.
>> -I/home/wstein/build/mpir2/sage-4.3.5/local/include -DHAVE_CONFIG_H
>> -I/home/wstein/build/mpir2/sage-4.3.5/local/include
>> -I/home/wstein/build/mpir2/sage-4.3.5/local/include
>> -I/home/wstein/build/mpir2/sage-4.3.5/local/include
>> -I/home/wstein/build/mpir2/sage-4.3.5/local/include -O3 -g -fPIC -o
>> fac_cantzass.o
>> fac_cantzass.cc: In function ‘CanonicalForm powerMod(const
>> CanonicalForm&, int, int, const CanonicalForm&)’:
>> fac_cantzass.cc:239: error: ‘mpz_mdivmod_ui’ was not declared in this scope
>> fac_cantzass.cc: In function ‘CanonicalForm powerMod2(const
>> CanonicalForm&, int, int, const CanonicalForm&)’:
>> fac_cantzass.cc:262: error: ‘mpz_mdivmod_ui’ was not declared in this scope
>> fac_cantzass.cc: In function ‘CanonicalForm powerMod2(const
>> CanonicalForm&, MP_INT*, int, const CanonicalForm&)’:
>> fac_cantzass.cc:285: error: ‘mpz_mdivmod_ui’ was not declared in this scope
>> make[4]: *** [fac_cantzass.o] Error 1
>> make[4]: Leaving directory
>> `/mnt/usb1/scratch/wstein/build/mpir2/sage-4.3.5/spkg/build/singular-3-1-0-4-20100214/src/factory'
>> make[3]: *** [install] Error 1
>> make[3]: Leaving directory
>> `/mnt/usb1/scratch/wstein/build/mpir2/sage-4.3.5/spkg/build/singular-3-1-0-4-20100214/src'
>> make[2]: *** [/home/wstein/build/mpir2/sage-4.3.5/local/bin/Singular-3-1-0]
>> Error 2
>> make[2]: Leaving directory
>> `/mnt/usb1/scratch/wstein/build/mpir2/sage-4.3.5/spkg/build/singular-3-1-0-4-20100214/src'
>> Unable to build Singular.
>>
>> real    0m25.340s
>> user    0m19.050s
>> sys     0m5.120s
>> sage: An error occurred while installing singular-3-1-0-4-20100214
>> Please email sage-devel http://groups.google.com/group/sage-devel
>> explaining the problem and send the relevant part of
>> of /home/wstein/build/mpir2/sage-4.3.5/install.log.  Describe your
>> computer, operating system, etc.
>> If you want to try to fix the problem yourself, *don't* just cd to
>> /home/wstein/build/mpir2/sage-4.3
>>
>> --------------
>>
>> Shouldn't mpir-2 include a compatibility file or something, so that it
>> doesn't break literally half the things that depend on it?    E.g.,
>> maybe
>>
>> make install-gmpcompat
>>
>> could work again, and set things up so that all these packages can build 
>> again?
>>
>>  -- william
>>
>>
>>
>> --
>> William Stein
>> Associate Professor of Mathematics
>> University of Washington
>> http://wstein.org
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "mpir-devel" group.
>> To post to this group, send email to mpir-de...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> mpir-devel+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/mpir-devel?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-de...@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

Reply via email to