This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: portable numerical limits?



> What is the portable C trick to generate, say, the largest
> representable value of type `short'?

(unsigned short) -1/2

> The question is, how portable (specifically in the Guile context)
> is the assumption that signed integers are always 2's complement?

You're pretty safe.  I'd love to hear anyone's stories about non-2's
complement machines that run Unix.