Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Using modular numbers with Math::Pari

by blokhead (Monsignor)
on Oct 29, 2009 at 14:24 UTC ( #803956=note: print w/replies, xml ) Need Help??

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).


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


    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.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://803956]
[shmem]: Discipulus: yeah, that might eventually prepare the path for OO ;-)
[Lady_Aleena]: See you, Discipulus.
[shmem]: Lady_Aleena: that's up to you. I only wanted to show you a path that might be more comforting than command line grep ;-)
[Lady_Aleena]: shmem, I don't think any of my modules could be converted to OO. They are too procedural.
[Lady_Aleena]: Now I will see if my perl-fu is as bad as I think it is.
[shmem]: ah, geany uses its own idea of tags. Ah well...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2017-04-27 12:31 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (506 votes). Check out past polls.