Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Maple Some very basic Maple help (numtheory)

  1. Nov 6, 2013 #1
    This is EXTREMELY basic. I am using maple to run a Pohlig Hellman algorithm to solve discrete logs.

    If I use ifactor to get a result, i.e.

    > ifactor(p-1);

    (2)3 (5)

    How do I assign the output of these different factors to some other variable so I can use them elsewhere?
  2. jcsd
  3. Nov 6, 2013 #2


    Staff: Mentor

    Not sure exactly what you're asking but I found this Maple Intro pdf that may help.

    http://www.phys.unsw.edu.au/2nd_and_3rd_syllabi/mapleprimer.pdf [Broken]

    I hope you dont mean:

    > y=ifactor(p-1)

    so that y is the 2^3 * 5 value.
    Last edited by a moderator: May 6, 2017
  4. Nov 6, 2013 #3
    Not quite. I want to assign the values separately. i.e. I want to assign the 2^3 to one value and the 5 to another. (actually just the 2, I don't need 2^3, but that would have been my next question).
  5. Nov 6, 2013 #4


    Staff: Mentor

  6. Nov 6, 2013 #5
    That's a step in the right direction, thanks.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook