POV-Ray : Newsgroups : povray.off-topic : update, updates, updates : Re: update, updates, updates Server Time
29 Jul 2024 02:22:43 EDT (-0400)
  Re: update, updates, updates  
From: Warp
Date: 18 Jan 2013 13:22:58
Message: <50f99301@news.povray.org>
Orchid Win7 v1 <voi### [at] devnull> wrote:
> >> In 2's complement representation MAX_INT+1 has the exact same bits in
> >> both signed and unsigned forms. How do you get outside the array with
> >> that value?
> >
> > That's wrong. In 2's complement representation, MAX_INT+1 has NO bit
> > representation at all. What you get instead if you interpret the
> > respective unsigned representation as signed is MIN_INT.

> Erm... don't you mean -1?

No. int(-1) has the same bit representation as MAX_UINT.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.