[plt-scheme] off (plt) topic (short koan in .c language and a question)

From: Andrew Reilly (areilly at bigpond.net.au)
Date: Thu May 6 20:52:26 EDT 2010

Hi Konrad,

On Thu, May 06, 2010 at 10:54:38PM +0100, Vladimir Konrad wrote:
> Short koan in c language (tested on 64 bit platform, and 32 bit platform 
> with gcc), just run:

I'm not sure I get it (as a koan).  The same thing works fine
even without pointers, allocation or dubious-looking type casts:

#include <stdio.h>
int main(int argc, char **argv) {
 union {int i; float f; } chunk;
 chunk.i = 1234567890;
 printf("%i\t%f\n", chunk.i, chunk.f);
 return 0; }

That's just the nature of the hardware that C exposes so that
you can stub your toe on it, if you're not careful.  Yes, you'll
get a different answer on machines with different floating point
representations, like Vaxes.

> Now the question, a while ago I found a math conjecture (it is a joke 
> one) and it is also a graph. It goes along the lines:
> if you start with odd number add 1 and divide by two and repeat this
> for very long time, your friends stop asking you out...
> Would you please point me to the source of this one (if you know)?




Posted on the users mailing list.