Brereton, Ashley on Sun, 05 Feb 2023 20:59:08 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Fortran Pari precision


We have a 32-bit method that works well, it's just a bit messy - we hoped to sweep the details under the rug with a pari function!

Thanks for the asking,
Ash

From: Charles Greathouse <crgreathouse@gmail.com>
Sent: 03 February 2023 19:55
To: pari-users@pari.math.u-bordeaux.fr <pari-users@pari.math.u-bordeaux.fr>
Subject: Re: Fortran Pari precision
 
If 64-bit is too much, I guess that means you're looking for a 32-bit complex incomplete gamma implementation?

On Fri, Feb 3, 2023 at 2:16 PM Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> wrote:
On Fri, Feb 03, 2023 at 11:48:05AM +0000, Brereton, Ashley wrote:
> Hi there,
>
> I was hoping to get some clarification for the precision argument used for pari variables. For the following code snippet:
>
> ***************
>
>   use ISO_C_BINDING, only : C_PTR
>   use PARI
>
> type(C_PTR)        :: u
> integer(kind=C_LONG) :: prec   = 5
>
> CALL pari_init(10000000_8, 2_8)
> u = Pi2n(1_8, prec)
>
> *****************
>
> As far as I can tell, 'prec = 5' gives me precision to higher than quad
> precision. Now I'm limited to prec >=3 , and I'd like to use lower precision
> in some cases.
>
> Is there a workaround to do lower precision calculations? The reason is there
> are some handy functions that I'd like to use that don't require high
> precision calculations, e.g. complementary error function with complex input.

Alas, the minimal precision is 3, which correspond to 64bit.

Cheers,
Bill