[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] lcm
From: |
Paul Eggert |
Subject: |
Re: [Bug-gnulib] lcm |
Date: |
Tue, 02 Nov 2004 21:28:41 -0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
I suspect that in practice, L.C.M. algorithms tend to be specialized
for their application, due to the problem of overflow. For example,
diffutils has this:
/* Least common multiple of two buffer sizes A and B. However, if
either A or B is zero, or if the multiple is greater than LCM_MAX,
return a reasonable buffer size. */
size_t
buffer_lcm (size_t a, size_t b, size_t lcm_max)
{...}
but perhaps this is not for everybody.