Matthias Walter wrote:
> On 11/27/2010 12:54 PM, Ellery Newcomer wrote:
>> Hello.
>>
>> Today I've been thinking about calculating the range of values for
>>
>> x % y
>>
> You might want to state the problem more precisely. What exactly is a
> "range of values x % y" ? Do you look at the result for x,y in some
> sets? Or is either x or y fixed? From your example I would suppose that
> x shall be fixed and y goes through a range?!
> 
        The full problem may be stated as:

For all x such that: xl <= x <= xh
and for all y such that: yl <= y <= yh
define: z = x % y

Now, compute values zl and zh such that:
zl <= z <= zh
and there exists x and y such that z == zl
and there exists x and y such that z == zh

                Jerome
-- 
mailto:[email protected]
http://jeberger.free.fr
Jabber: [email protected]

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to