comp.lang.ada
 help / color / mirror / Atom feed
From: "Terry Westley" <westley@yahoo.com>
Subject: source code for lcm or gcd
Date: Fri, 26 Apr 2002 15:55:42 -0400
Date: 2002-04-26T15:55:42-04:00	[thread overview]
Message-ID: <4hiy8.62$EE5.70008@news.uswest.net> (raw)

Does anyone know of Ada source code for least common multiple or greatest
common divisor?  If you've got source code for gcd, that's great, since
lcm (a, b) = (a * b) / gcd (a, b).

My real goal is to compute the lcm for N integers to spread processing
over multiple frames in a real-time system.

I know that lcm isn't hard using say Euclid's method, but it's even easier if someone
else has already coded and tested it.  If you've got aunit test cases too, you'll get my
nomination for attaboy of the day.

I've checked in "Ada & Software Engineering Library" on CD and www.adapower.com
to no avail.

(This isn't for homework, though I often do my work at home :-)

--
Terry Westley
westley@yahoo.com






             reply	other threads:[~2002-04-26 19:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-26 19:55 Terry Westley [this message]
2002-04-27  9:03 ` source code for lcm or gcd Gautier
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox