calc GCD (greatest common divisor) and LCM (least common multiple) inside gen~


    Dec 19 2016 | 2:18 pm
    Dear Friends
    Can I calc - as mentioned in the topic's title - GCD (greatest common divisor) and LCM (least common multiple) of two values inside gen~?
    thanks in advance for any indications

    • Dec 19 2016 | 4:11 pm
      You'll need to use a codebox, as these require an iterative procedure, i.e. a for loop, and then implement one of the typical algorithms. Once you have GCD, LCM is easy:
    • Dec 19 2016 | 4:15 pm
      That's really elegant. Thank you so much, Graham.