Mark Lookabaugh
2003-08-23 12:46:06 UTC
Hi,
I have a list of numbers, and I'd like to get the LCM of all the
values in the list. The list isn't always the same length at runtime.
What's the syntax to specify that?
For example:
If I have myList = { 2, 3, 4, 5 }
I'd like to do something like LCM[myList] and get 60.
but that actually returns { 2, 3, 4, 5 } (I guess performing LCM on
each element individually).
How can I get LCM to act on a bunch of values at once?
Thanks for any help,
Mark
--
Mark Lookabaugh
mlookabaugh (at) cox.net
USS Brewton FF-1086 Home Page
http://www.ussbrewton.com
I have a list of numbers, and I'd like to get the LCM of all the
values in the list. The list isn't always the same length at runtime.
What's the syntax to specify that?
For example:
If I have myList = { 2, 3, 4, 5 }
I'd like to do something like LCM[myList] and get 60.
but that actually returns { 2, 3, 4, 5 } (I guess performing LCM on
each element individually).
How can I get LCM to act on a bunch of values at once?
Thanks for any help,
Mark
--
Mark Lookabaugh
mlookabaugh (at) cox.net
USS Brewton FF-1086 Home Page
http://www.ussbrewton.com