home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 242,209 of 243,242   
   James Kuyper to Ike Naar   
   Re: _BitInt(N)   
   28 Nov 25 09:48:06   
   
   From: jameskuyper@alumni.caltech.edu   
      
   On 2025-11-27 12:38, Ike Naar wrote:   
   > On 2025-11-27, bart  wrote:   
   >> Well, let's stick with C. Here are some features I use, and the C   
   >> equivalents (A has whatever type is needed):   
   >>   
   >> M C   
   >> -------------------------------------------------------------   
   >> [snip]   
   >> A.odd A & 1, or A % 1   
   >   
   > "A % 1" ?   
      
   Probably a typo for A % 2.   
      
   Note to bart: A%2 has a value of -1 for odd negative numbers. In many   
   contexts (#if, !, &&, ||, ?:, if(), for(), while(), do while(),   
   assert(), or static_assert()), all that matters is that it's not equal   
   to 0. However, any time you're looking at the actual value, A&1 and A%2   
   are not equivalent.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca