From: pmontgom@cwi.nl (Peter L. Montgomery)
Subject: Re: Final kick at the "Merced Guessing Game"
Date: 1997/10/18 [thread overview]
Message-ID: <EI8B8I.DIA@cwi.nl> (raw)
In-Reply-To: y64t6gs45q.fsf@tweedledumb.cygnus.com
In article <y64t6gs45q.fsf@tweedledumb.cygnus.com>
Craig Burley <burley@tweedledumb.cygnus.com> writes:
>I don't see any rebuttal there. Care to explain what *low-level*
>constructs C is offering that Fortran doesn't offer, aside from
>pointers?
Nobody has been mentioning unsigned arithmetic.
In many implementations of Fortran (and C), signed and unsigned
additions and subtractions behave identically, but C
_guarantees_ what the result will be if it overflows, which
Fortran does not.
C has conditional compilation, which Fortran does not.
Fortran leads C in its large intrinsic function library.
C9X will finally let one write a MAX function which evaluates its
arguments once only and use the INLINE keyword to get good code,
but the user will need to call different functions depending
upon the argument types (cf. labs/abs/fabs in C vs. ABS in Fortran).
Neither language has constructs for the following operations
(although some implementations make them available):
. Trailing zero count of nonzero binary number
(equal to highest power of 2 dividing the number)
. Truncated base-2 logarithm of nonnegative integer,
with LOG2(0) = -1. [Or return the number of bits required
to hold the value, which is one more than its logarithm.]
. Population count of nonnegative integer.
. Upper half of (signed or unsigned) integer product.
. Greatest common divisor (GCD) of two integers.
. Floating point operations with explicit rounding,
such as ROUND_DOWN(a - ROUND_ZERO(b*c))
to round the product b*c towards zero and
round the difference a - b*c towards -infinity.
All of these, except the GCD, have simple translations on the
latest DEC Alpha. They have mathematical definitions
which do not refer to the target architecture,
except that we need the number of bits per datum to
define the upper half of an integer product.
The optimal translations vary widely
with the target architecture, and the first three constructs
have been discussed many times in this newsgroup,
yet the language designers decline to standardize the constructs.
--
Peter L. Montgomery pmontgom@cwi.nl San Rafael, California
A mathematician whose age has doubled since he last drove an automobile.
next prev parent reply other threads:[~1997-10-18 4:00 UTC|newest]
Thread overview: 207+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-10-08 4:00 Final kick at the "Merced Guessing Game" Robert Harley
1997-10-08 4:00 ` brianh
1997-10-08 4:00 ` boo
1997-10-09 4:00 ` brianh
1997-10-09 4:00 ` Eric Hildum
1997-10-11 4:00 ` Jan Vorbrueggen
1997-10-12 4:00 ` boo
1997-10-13 4:00 ` Carl Perkins
1997-10-13 4:00 ` Michael Williams
1997-10-13 4:00 ` Craig Burley
1997-10-13 4:00 ` Paul Rubin
1997-10-13 4:00 ` William Clodius
1997-10-13 4:00 ` Craig Burley
1997-10-14 4:00 ` Richard A. O'Keefe
1997-10-14 4:00 ` Shankar Unni
1997-10-15 4:00 ` Achim Gratz
1997-10-15 4:00 ` Richard A. O'Keefe
1997-10-15 4:00 ` Paul D. DeRocco
1997-10-15 4:00 ` William Clodius
1997-10-15 4:00 ` Joe Buck
1997-10-16 4:00 ` Richard A. O'Keefe
1997-10-16 4:00 ` Craig Burley
1997-10-17 4:00 ` Shankar Unni
1997-10-14 4:00 ` Michael Williams
1997-10-14 4:00 ` Richard Black
1997-10-15 4:00 ` Craig Burley
1997-10-15 4:00 ` Michael Williams
1997-10-15 4:00 ` Dr. Richard Black
1997-10-16 4:00 ` Richard A. O'Keefe
1997-10-18 4:00 ` Bruce Hoult
1997-10-15 4:00 ` Paul Hsieh
1997-10-13 4:00 ` boo
1997-10-15 4:00 ` Craig Burley
[not found] ` <623ek6$ef5$1@news.iastate.edu>
1997-10-16 4:00 ` Craig Burley
1997-10-16 4:00 ` SimGraphics
1997-10-17 4:00 ` Craig Burley
1997-10-17 4:00 ` David Chase
1997-10-18 4:00 ` Victor Yodaiken
1997-10-20 4:00 ` Eric Hildum
1997-10-17 4:00 ` William Clodius
1997-10-19 4:00 ` Craig Burley
1997-10-18 4:00 ` Peter L. Montgomery [this message]
1997-10-19 4:00 ` Craig Burley
[not found] ` <3456700e.14141203@news.demon.co.uk>
1997-10-28 5:00 ` Dirk van der Knijff
1997-10-20 4:00 ` Richard A. O'Keefe
1997-10-20 4:00 ` Peter L. Montgomery
1997-10-16 4:00 ` Flexible Choice of Language (Nothing to do with: Final kick at the "Merced Guessing Game") Ian Dall
1997-10-16 4:00 ` Craig Burley
1997-10-17 4:00 ` Richard A. O'Keefe
1997-10-17 4:00 ` Keith Adams
1997-10-17 4:00 ` [Reposted due to Enlow UCE cancel]: " John Bayko
1997-10-20 4:00 ` Paul D. DeRocco
1997-10-17 4:00 ` John Bayko
1997-10-18 4:00 ` Kelly Hall
1997-10-20 4:00 ` [Reposted due to Enlow UCE cancel]: " Eric Hildum
1997-10-09 4:00 ` Final kick at the "Merced Guessing Game" Gregg E Economou
1997-10-10 4:00 ` Jan Vorbrueggen
1997-10-08 4:00 ` William Clodius
1997-10-08 4:00 ` David Chase
[not found] ` <61ho3v$3m0$1@goanna.cs.rmit.edu.au>
1997-10-09 4:00 ` boo
1997-10-09 4:00 ` William Clodius
1997-10-10 4:00 ` Richard A. O'Keefe
1997-10-10 4:00 ` boo
1997-10-11 4:00 ` Patricia Shanahan
1997-10-13 4:00 ` Gregg E Economou
1997-10-13 4:00 ` Patricia Shanahan
1997-10-14 4:00 ` Richard A. O'Keefe
1997-10-15 4:00 ` boo
1997-10-16 4:00 ` Toon Moene
1997-10-16 4:00 ` Timothy A. Seufert
1997-10-16 4:00 ` boo
1997-10-17 4:00 ` Richard A. O'Keefe
1997-10-20 4:00 ` Jason.Ozolins
1997-10-20 4:00 ` [Reposted due to Enlow UCE cancel]: " tgg
1997-10-11 4:00 ` Paul DeMone
1997-10-11 4:00 ` Toon Moene
1997-10-10 4:00 ` Tyson Richard DOWD
1997-10-12 4:00 ` boo
1997-10-13 4:00 ` Steve Tate
1997-10-13 4:00 ` boo
1997-10-13 4:00 ` Victor Yodaiken
1997-10-14 4:00 ` Aaron Spink
1997-10-14 4:00 ` Jason.Ozolins
1997-10-15 4:00 ` boo
1997-10-15 4:00 ` David Chase
1997-10-13 4:00 ` Bernd Paysan
1997-10-13 4:00 ` boo
1997-10-13 4:00 ` Aaron Spink
1997-10-14 4:00 ` boo
1997-10-18 4:00 ` tgg
1997-10-18 4:00 ` [Reposted due to Enlow UCE cancel]: " tgg
1997-10-13 4:00 ` Patricia Shanahan
1997-10-15 4:00 ` boo
1997-10-15 4:00 ` Patricia Shanahan
[not found] ` <EHrwv9.2w3@world.std.com>
1997-10-10 4:00 ` David Gould
1997-10-16 4:00 ` Patricia Shanahan
1997-10-10 4:00 ` David Gould
1997-10-10 4:00 ` Maynard Handley
1997-10-11 4:00 ` new languages Preston Briggs
-- strict thread matches above, loose matches on Subject: below --
1997-10-09 4:00 Final kick at the "Merced Guessing Game" Robert Harley
1997-10-08 4:00 Robert Harley
1997-10-08 4:00 ` Michael Meissner
1997-10-09 4:00 ` Richard A. O'Keefe
1997-10-08 4:00 Robert Harley
[not found] ` <343C0387.41C6@lanl.gov>
1997-10-08 4:00 ` boo
1997-10-09 4:00 ` David Chase
1997-10-08 4:00 ` boo
1997-10-09 4:00 ` William Clodius
1997-10-09 4:00 ` Patrick Chase
1997-10-10 4:00 ` boo
1997-10-09 4:00 ` David Chase
1997-10-07 4:00 Robert Harley
1997-10-07 4:00 ` Nick Maclaren
1997-10-07 4:00 ` Shankar Unni
1997-10-08 4:00 ` boo
1997-10-09 4:00 ` Patrick F. McGehearty
1997-10-10 4:00 ` Richard A. O'Keefe
1997-10-15 4:00 ` David Chase
1997-10-16 4:00 ` William Clodius
1997-10-07 4:00 ` Martin Rodgers
1997-10-03 4:00 Robert Harley
1997-10-06 4:00 ` Richard A. O'Keefe
1997-10-06 4:00 ` boo
1997-10-07 4:00 ` Richard A. O'Keefe
1997-10-06 4:00 ` Graham Hughes
1997-10-07 4:00 ` boo
1997-10-07 4:00 ` William Clodius
1997-10-07 4:00 ` William Clodius
1997-10-08 4:00 ` Richard A. O'Keefe
1997-10-08 4:00 ` William Clodius
1997-10-08 4:00 ` William Clodius
[not found] ` <y4wwjon203.fsf@mailhost.neuroinformatik.ruhr-uni-bochum.de>
1997-10-08 4:00 ` William Clodius
1997-10-08 4:00 ` Stanley Chow
1997-10-09 4:00 ` William Clodius
1997-10-10 4:00 ` Larry Kilgallen
1997-10-10 4:00 ` Zalman Stern
1997-10-11 4:00 ` Andrew Cruickshank
1997-10-12 4:00 ` Paul D. DeRocco
1997-10-13 4:00 ` Michael Williams
1997-10-08 4:00 ` Gregg E Economou
1997-10-08 4:00 ` David Chase
1997-10-08 4:00 ` Richard A. O'Keefe
1997-10-07 4:00 ` Serge Pachkovsky
1997-10-07 4:00 ` Martin Rodgers
1997-10-07 4:00 ` Greg Weeks
1997-10-07 4:00 ` Martin Rodgers
[not found] ` <343AAE5A.A3FCC9D@no.informatik.spam.tu-muenchen.thanks.de>
1997-10-09 4:00 ` Torben AEgidius Mogensen
[not found] ` <EHsr7B.Dt8@bit3.com>
1997-10-10 4:00 ` Torben AEgidius Mogensen
[not found] ` <61cv5e$qn$6@vixen.cso.uiuc.edu>
1997-10-08 4:00 ` William Clodius
1997-10-07 4:00 ` Carlie Coats
1997-10-07 4:00 ` Paul Hsieh
1997-10-07 4:00 ` boo
1997-10-08 4:00 ` Carlie Coats
1997-10-08 4:00 ` James C. Stutts
1997-10-02 4:00 Robert Harley
1997-10-02 4:00 ` Nick Maclaren
1997-10-03 4:00 ` Richard A. O'Keefe
1997-10-02 4:00 Robert Harley
1997-10-02 4:00 ` Nick Maclaren
1997-10-02 4:00 ` Stanley Chow
1997-09-30 4:00 Paul DeMone
1997-09-30 4:00 ` Guy Harris
1997-10-01 4:00 ` Tom Thornhill
1997-10-01 4:00 ` Nick Maclaren
1997-10-01 4:00 ` Paul DeMone
1997-10-01 4:00 ` J. Corbally
1997-10-01 4:00 ` Nick Maclaren
1997-10-01 4:00 ` Ketil Z Malde
1997-10-01 4:00 ` Michael D. Nahas
1997-10-01 4:00 ` brianh
1997-10-01 4:00 ` Stefan Monnier
1997-10-01 4:00 ` Nick Maclaren
1997-10-01 4:00 ` John Wilson
1997-10-01 4:00 ` P Murray
1997-10-01 4:00 ` Nick Maclaren
1997-10-02 4:00 ` Vesa Karvonen
1997-10-02 4:00 ` Joseph H Allen
1997-10-02 4:00 ` Wilco Dijkstra
1997-10-03 4:00 ` Stefan Monnier
1997-10-03 4:00 ` Jason.Ozolins
1997-10-03 4:00 ` Alex Colvin
1997-10-06 4:00 ` Richard A. O'Keefe
1997-10-08 4:00 ` Zalman Stern
1997-10-03 4:00 ` Stefan Monnier
1997-10-02 4:00 ` Andrew Glew
1997-10-02 4:00 ` Torben AEgidius Mogensen
1997-10-02 4:00 ` Patrick F. McGehearty
1997-10-02 4:00 ` brianh
1997-10-03 4:00 ` Michael Williams
1997-10-01 4:00 ` Allen Kim
1997-10-02 4:00 ` Jon Leech
1997-10-02 4:00 ` Stefan Monnier
1997-10-03 4:00 ` Richard A. O'Keefe
1997-10-03 4:00 ` Mike Smith
1997-10-03 4:00 ` Nick Maclaren
1997-10-03 4:00 ` Rob Barris
1997-10-03 4:00 ` Andrew Glew
1997-10-05 4:00 ` Gianni Mariani
1997-10-04 4:00 ` Nick Maclaren
1997-10-04 4:00 ` H. Eckert
1997-10-05 4:00 ` Andy "Krazy" Glew
1997-10-06 4:00 ` Nick Maclaren
1997-10-02 4:00 ` Eric Hildum
1997-10-01 4:00 ` Richard A. Schumacher
1997-10-01 4:00 ` Tom Thornhill
1997-10-01 4:00 ` Paul DeMone
1997-10-01 4:00 ` Jim Hull
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox