Ralf Hemmecke wrote:
> 
> I currrently run into some trouble with the implementation of p-adic
> integers.
> 
> I only do ring operations (+ and *) with them. In fact, I don't see how
> during the computation anything else can happen, because I work in a
> domain that requires QEtaAlgebra(X) as its input parameter (see below).
> 
> During the computation all these operations will be (in parallel)
> executed on elements of Polynomial BalancedPAdicInteger p (for some
> prime p).
> 
> I expected that the stream inside BalancedPAdicInteger is always
> explicitylyFinite. But obviously, it isn't. In some longer computation I
> ended up with a value O(p^30) which is not a finite stream and should
> actually be equal to zero (because I had an integer computation running
> in parallel).

I do not understand why you expect terminating expansion?  If you
need whole expansion than you logically have integers and it
is natural to use Integer for this.  OTOH, if you only need
approximation then it does not matter if it will eventually
terminate.  Note that in relatively small number of
operations one can produce rather long finite expansion.
Due to lazy implementattion even if the result is zero,
it will be noticed only after whole lomg expansion is
computed.  So it is not clear if you are seeing infinite
expansions or just longish finite one.


> BTW, why does it make sense that the representation is just Stream(I)
> (instead of a pair (initial exponent, stream)? Doesn't that lead to a
> big number of leading zeros if all involved numbers are multiples of p^n
> for some big n. In fact, the implementation of order suggests that n
> must be smaller than 1000.
> Looks like an unnecessary hardcoded restriction.

Well, there is PAdicRationalConstructor which uses representaion
above.   So if you need elements of large order just use
rationals...

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to