# RPTools.net

Discussion and Support

It is currently Tue Sep 19, 2017 10:04 am

 Page 1 of 1 [ 3 posts ]
Author Message
 Irrlicht   Dragon Joined: Mon Feb 09, 2009 10:53 amPosts: 416
 Post subject: Lowest common multiple and greatest common divisorPosted: Sun Jul 16, 2017 1:39 pm
I see there aren't built-in functions for this, so what would you advise to make macros where you can calculate lowest common multiple and greatest common divisor from lists of numbers (possibly with virtually unlimited lists... within reason, of course... I know throwing in a list of a thousand numbers could be taxing... and probably will never have lists longer than ten numbers).

_________________
"There are many ways my Son, to find where the souls of Demons remain...
But it takes only one second of despair and of doubt until, at last, your Soul they will gain..."

 aliasmask   Deity Joined: Tue Nov 10, 2009 6:11 pmPosts: 7854Location: Bay Area
 Post subject: Re: Lowest common multiple and greatest common divisorPosted: Sun Jul 16, 2017 6:49 pm
You mean like factors? So, for 10 it would be 2,5 and 20 would be 2,2,5?

_________________

 wolph42   Deity Joined: Fri Mar 20, 2009 4:40 amPosts: 9373Location: Netherlands
 Post subject: Re: Lowest common multiple and greatest common divisorPosted: Mon Jul 17, 2017 2:35 am
multiples of 4: 4,8,12,16,20,24, etc
multiples of 6: 6,12,18,24,etc

Hence the 'common multiples' are: 12,24,36,etc

So the LCM (lowest common multiple) of 4 and 6 is 12

divisors of 4: 1,2,4 (aka factors as AM mentioned)
divisors of 6: 1,2,3,6

'common divisors': 1,2

So the GCD (greatest common divisor) of 4 and 6 is 2.

My Q is: what on earth do you require this for in MT?

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 3 posts ]

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

 Search for: Jump to: Select a forum ------------------ General    Announcements    Ideas for New Applications    General Discussion    Developer Notes       Java Programming Info    User Creations       Requests for HELLLLP!       Tilesets, Token Libraries, and Complete Maps          Token Libraries          Tilesets/Graphics for Map-making          Complete Maps       Campaign Frameworks          D&D 5e Frameworks          D&D 4e Frameworks          [D&D3.5 + Pathfinder] Campaign Macros          Shadowrun 4e Frameworks          Savage Worlds Frameworks       Published Module Support       Tutorials          Graphics, Images, Tokens, Maps          Drop-In Macros and Scripts          Campaign Frameworks       Drop-In Macro Resources    Links & External Resources    Looking For Group       "Living" Campaigns       Dungeons and Dragons       Savage Worlds       WoD       Wargaming    Documentation Requests/Discussion    Session Report-Back Tools    MapTool       How To       Macros       Feature Requests          Resolved       Bug Reports          Resolved       WIP - User FAQ       Testing    MapTool 1.4    TokenTool    DiceTool    InitiativeTool    CharacterTool       Support: d20 D&D       Support: D&D 4e       Support: Hero System       Support: Savage Worlds       Support: GURPS Other    RPTools Sightings    Running Campaigns       Thiera's College of Adventurers       Age of Might       Scales of War       Renwold       Dead Men Walking       Dark Sun - 4th Edition       Warhammer Fantasy Roleplay       Return of Uchly Namen       Insert Campaign Here       Antium       The Mystic Moon       World of Lagal       GangerRun       FB Scales of War       Sellswords of Eberron          Archive       Orbs of Chaos       World of Omegus       Keep on the Shadowfell - 4E       Rise of the Runelords       Aurith In The Age Of Steam       Widdershins       Nos's Pathfinder Campaign       Falcons Hollow       Verwirrte Welten       With it or on it       Starter Set - Jeff

### Who is online

In total there are 0 users online :: 0 registered, 0 hidden and 0 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 0 guests