[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: proposed gnulib-related additions to Autoconf
From: |
Ralf Wildenhues |
Subject: |
Re: proposed gnulib-related additions to Autoconf |
Date: |
Wed, 5 Apr 2006 19:53:43 +0200 |
User-agent: |
Mutt/1.5.11 |
A case study, FYI.
The Y-MP from Cray-Cyber has
- 31 value-bit shorts
- 63 value-bit ints, but also a mode in which fast arithmetic is done
with only 45 value-bits,
- 63 value-bit longs
All three report a sizeof of 8. CHAR_BIT is 8.
The 46 bit int mode is an optimization mode. The documentation
mentions one switch (-h fastmodulus) for 46 bit modulo operations only,
and one (-h fastmd) 46 bit multiply/divide/comparison int operations.
With those switches, INT_MAX etc. from limits.h are adjusted
accordingly.
However, the printf output is not limited to 46 bits. If you add
literals that are larger, you get a warning that computation will
be done in the slower 64 bit mode. If you put the addition into a
function, it may still work correctly (for 64 bits).
Unsurprisingly, the compile-time computations use 64 bit throughout,
so the computed values won't match the provided INT_MAX etc.
Surely the 46 bit mode is not conforming to ISO C. But I'd figure
you may be interested in this regardless.
At least our current tests get the range of the padded `short' right.
Cheers, and kudos to the Cray-Cyber people,
Ralf