On 07/11/2011 13:01, Cactus wrote:
> The "file is being used by another process" message is because several
> builds are running at the same time.
I'd guessed that there was a link... though, ideally, the solution files
would be written in such a way as to allow non-dependent projects to be
buil
On 07/11/2011 11:21, Cactus wrote:
> I have just installed the Visual Studio Developer Preview 11.
>
> Note that, in addition to installing Visual Studio 11, the YASM
> assembler -- vsyasm.exe -- has to be copied into the directory holding
> the VC++ version 11 binaries.
I've got a copy of vsyasm.
On 06/11/2011 19:31, Cactus wrote:
> I think it would be useful to find out why GMP_NAIL_BITS is not being
> defined. It appears to be because the section I referenced is not
> being included when I think it should be.
>
> It would be useful to put the ! marks back in but this won't work
> because
On 06/11/2011 18:29, Cactus wrote:
> It looks like the script that creates mpir.h is not working properly.
>
> Do you have something like the following early in mpir.h?
>
> #if ! defined (__GMP_WITHIN_CONFIGURE)
> #define __GMP_BITS_PER_MP_LIMB 64
> #define GMP_LIMB_BITS
On 06/11/2011 16:10, Case Van Horsen wrote:
> I've used the Windows 7 SDK to compile MPIR in both 32- and 64-bit
> mode. I just used the batch file approach but I believe the SDK will
> add a 64-bit compiler to Visual Studio Express. IIRC, the 7.0 SDK
> corresponds to VS 2008 and the 7.1 SDK corres
In an attempt to verify some code I've written using MPIR and Visual C++
2010 Express (which only supports generating 32-bit executables) I
downloaded Visual Studio 11 Developer Preview - which gives me access to
an effective beta of the next version of Visual Studio Ultimate
Edition. My motivatio
On 11/03/2011 23:01, Bill Hart wrote:
> The correct way to get a given limb is with mpz_getlimbn (mpz t op, mp
> size t n ). The number of limbs is given by mpz_size (mpz t op ) .
> These are both on page 44 of the manual. Of course you need to deal
> with the case that the mpz has size 0 separatel
On 11/03/2011 13:47, Cactus wrote:
> The manual explains mpz_export that gives you such access but it won't
> avoid the cost of an array for the results.
>
> The mpz structure contains an integer (_mp_size) whose absolute value
> gives the number of limbs pointed to by the limb pointer (_mp_d).
>
>
I've large positive mpz_t values, and I need to access them one byte
(or one word) at a time.
Obviously, I could do this using mpz_div_2exp() and mpz_get_ui() - but
this gets me the least significant words first... and I need to access
the data most-significant word first. Sure, I could do this
On 10/03/2011 14:21, Bill Hart wrote:
> On 10 March 2011 13:07, Steve wrote:
>> I'm wondering, is it safe to re-use the same structure as both the first
>> and second arguments to mpz_...() functions...
> Yes, that is always safe, unless it is explicitly documented ot
I'm wondering, is it safe to re-use the same structure as both the first
and second arguments to mpz_...() functions...
For example, is the idiom:
void addthenshift(mpz_t &mp,unsigned a,unsigned s)
{
mpz_add_ui(mp,mp,a);
mpz_mul_2exp(mp,mp,s);
}
always safe? Or, is it necessary to introd
On 09/03/2011 17:55, Bill Hart wrote:
> There is the C function mpz_sizeinbase. If you do it in base 2 it will
> extremely efficiently tell you the bit length. Your algorithm will
> actually be O(n^2) time, whereas mpz_sizeinbase for base a power of 2
> is O(1).
Many thanks - mpx_sizeinbase() with
I get number of compiler warnings about hpirxx.h in Visual Studio
Express 2010 - which surprised me:
1>c:\lib\win32\debug\mpirxx.h(1670): warning C4800: 'int' : forcing
value to bool 'true' or 'false' (performance warning)
1>c:\lib\win32\debug\mpirxx.h(1671): warning C4800: 'int' : forcing
value t
I need to calculate the 'bit length' of some (very large) arbitrary
precision natural numbers. Without any regard for efficiency, I have
this prototype:
--
unsigned count_bits(mpz_class number)
{
BOOST_ASSERT(number<0);
unsigned count=0;
while (number!=0)
{
number>>=1;
14 matches
Mail list logo