From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f6ac3b009d5334ec,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-26 12:55:45 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed.news.qwest.net!news.uswest.net.POSTED!not-for-mail From: "Terry Westley" Newsgroups: comp.lang.ada Subject: source code for lcm or gcd X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: <4hiy8.62$EE5.70008@news.uswest.net> Date: Fri, 26 Apr 2002 15:55:42 -0400 NNTP-Posting-Host: 137.100.53.71 X-Trace: news.uswest.net 1019850944 137.100.53.71 (Fri, 26 Apr 2002 14:55:44 CDT) NNTP-Posting-Date: Fri, 26 Apr 2002 14:55:44 CDT Xref: archiver1.google.com comp.lang.ada:23152 Date: 2002-04-26T15:55:42-04:00 List-Id: 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