Loïc Grenié on Tue, 19 May 2020 23:03:59 +0200

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

Re: Float Numbers with 200 digits


On Tue 19 may 2020 at 04:10, Tiago Mendes wrote:
Hi guys,

I need to know how to represent a float number in PARI. To use integre i usually do :  
GEN expoent = strtoi("1123213137")

To represent a number like 10^{-200} how should i do ?

     Depending on what you precisely need, real_1 might be your friend:

\fun{GEN}{real_1}{long prec} create a \typ{REAL} equal to $1$ to \kbd{prec}
words of accuracy.

    This creates a 1 with arbitrary precision. You can use it with
  gdiv(real_1(200),powuu(10,300)) (this creates 10^{-300} with 200 digits

      Hope this helps,