http://qs321.pair.com?node_id=803956


in reply to Using modular numbers with Math::Pari

Pari's lift function "lifts" a modular residue back into the integers.
? lift( 1 / Mod(3,17) ) %1 = 6
Presumably it is available from the Math::Pari bindings somehow (I only know pari, not the Perl bindings).

blokhead

Replies are listed 'Best First'.
Re^2: Using modular numbers with Math::Pari
by hv (Prior) on Oct 29, 2009 at 14:45 UTC

    Thanks!

    perl -MMath::Pari=PARI,Mod,lift -wle 'print lift(PARI(1)/Mod(3,17))' 6

    Perfect - not sure I'd ever have found that searching the docs myself.

    Hugo