gmp-discuss Digest, Vol 51, Issue 11

cino hilliard hillcino368 at hotmail.com
Sat Nov 24 04:06:15 CET 2007



Hi,

> From: gmp-discuss-request at swox.com
> Subject: gmp-discuss Digest, Vol 51, Issue 11
> To: gmp-discuss at swox.com
> Date: Sun, 18 Nov 2007 12:00:00 +0100
>
> Send gmp-discuss mailing list submissions to
> gmp-discuss at swox.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://gmplib.org/mailman/listinfo/gmp-discuss
> or, via email, send a message with subject or body 'help' to
> gmp-discuss-request at swox.com
>
> You can reach the person managing the list at
> gmp-discuss-owner at swox.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of gmp-discuss digest..."
>
>
> Today's Topics:
>
> 1. Chud Pi and "raw" output (cino hilliard) (Jim White)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 18 Nov 2007 00:07:01 +0000 (GMT)
> From: Jim White 
> Subject: Chud Pi and "raw" output (cino hilliard)
> To: gmp-discuss at swox.com
> Message-ID: 
> Content-Type: text/plain; charset=iso-8859-1
>
>
>> mpf_get_str(pi_str,&expptr,10,d+2,qi);
>> mpz_set_str(piz,pi_str,10);
>> mpz_out_raw(fptr1,piz); //save compressed
>
> Much quicker would be write yourself a pair of
> mpf_out_raw and mpf_in_raw functions. For output just
> dummy up an mpz_t pointing to the mpf, write the size
> and exponent, then mpz_out_raw.

I was unable to even begin to do this. I realize we can byref data
on the fly in c but I do not know GMP that well. Maybe someone can do an 
example to get me started.

I wonder why mpf_out_raw and mpf_inp_raw are not built in functions like
mpz_out_raw and mpz_inp_raw?

>
> The input process is similarly simple.
>
> No radix conversion whatsoever, hence virtually nil
> overheads.
When a radix 10 file is squeezed to 42% of its origional size, some sort of conversion
had to have taken place. My guess it is the max base 10 to 255 with the Ascii characters
0-9 at the begining then A-Z, a-z and every thing else. If not, then a compression routine
was used. In either case we are going from base 10 to base something else.

I am very happy that I found a mistake in one of my sequence entries and installed GMP
to verify my correction and re-post. I was using a divide and conquer routine with 
integer divide and modulus operations, storing in a string to a file and calling Pari to evaluate
the multi-digit sum. That was awkward but it was fairly fast which was good until the error
cropped up. GMP to the rescue. GMP is great and quite fast. I wonder why no unsigned long long
type in GMP?

Thanks to all the Developers and users work. 

 Have fun,
Cino


More information about the gmp-discuss mailing list