Lowest Common Multiple programming

Discussion in 'Mathematica' started by Lea Rebanks, Feb 13, 2008.

  1. Lea Rebanks

    Lea Rebanks Guest

    Hi All,

    I am trying to make a programming code to find the LCM between the following
    I DO NOT want to use Prime Factorization but wish to setup some kind of
    table multiplication process until required results are found.

    Here are the correct results shown using LCM function

    LCM[Rationalize[1.4137, 0],
    Rationalize[2.5, 0], 5,
    Rationalize[12.5, 0]]
    N[%/{Rationalize[1.4137, 0],
    Rationalize[2.5, 0], 5,
    Rationalize[12.5, 0]}]
    {250000., 141370., 70685., 28274.}

    Any help & advice gratefully received.
    Many thanks for your help & attention.

    Best Regards - Lea Rebanks...
    Lea Rebanks, Feb 13, 2008
    1. Advertisements

  2. Lea Rebanks

    Szabolcs Guest

    If you mean that you'd like to implement an LCM algorithm yourself,
    compute the GCD first with the Euclidean algorithm (look it up), and
    use the result to find the LCM.
    Szabolcs, Feb 16, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.