Article View: comp.unix.programmer
Article #3422Re: readir() II
From: Pascal J. Bourguignon
Date: Sat, 06 Feb 2010 00:02
Date: Sat, 06 Feb 2010 00:02
53 lines
3058 bytes
3058 bytes
Rainer Weikusat <rweikusat@mssgmbh.com> writes:
> pjb@informatimago.com (Pascal J. Bourguignon) writes:
>
> [...]
>
>> I didn't hide anything. Some programming language are actually high
>> level programming language, and use normal integer arithmetic, not
>> modulo 2^w arithmetic.
>
> There is no such thing as 'normal integer arithmetic'
Of course. Ask anybody in the street how much is 4294967295 + 1.
Arithmetic and integer are things that are defined in mathematic. When
you use them unqualified, you have an infinite number of integers:
0 in Integer
x in Integer => succ(x) in Integer
and the arithmetical operations + and * have the whole Integer set as
image, not just a subset.
> and definitions
> of particular algebraic operations such as +, including the sets they
> operate on, are not structural properties of programming languages.
Of course they are.
C specifies that its + is actually addition modulo 2^w.
On the other hand, Lisp specifies that its + is the mathematic plus
(restricted to the size of the memory).
(On the other hand, if the syntax of C was defined as:
int a = b + c [2^(sizeof(int)*CHAR_BIT)];
instead of:
int a = b + c;
a lot less bugs would be written in C.)
--
__Pascal Bourguignon__
Technical Details
Message-ID:
<87mxznnsd9.fsf@galatea.lan.informatimago.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.glorb.com!news2.glorb.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<7sa7rrFg81U1@mid.individual.net> <3a76$4b602b7c$5350c024$19599@cache100.multikabel.net> <7si52rFr64U1@mid.individual.net> <87ljff3eoh.fsf@informatimago.com> <7sjm3uFeofU1@mid.individual.net> <874om32k7g.fsf@informatimago.com> <7t1ufvFu70U1@mid.individual.net> <87vdebo0jz.fsf@galatea.lan.informatimago.com> <87mxzn74qa.fsf@fever.mssgmbh.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1200bcf240,1d887f475f1c894c
X-Google-Attributes: gid1200bcf240,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.glorb.com!news2.glorb.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: pjb@informatimago.com (Pascal J. Bourguignon)
Newsgroups: comp.unix.programmer,gnu.gcc.help
Subject: Re: readir() II
Date: Sat, 06 Feb 2010 01:02:42 +0100
Organization: Informatimago
Lines: 53
Message-ID: <87mxznnsd9.fsf@galatea.lan.informatimago.com>
References: <7sa7rrFg81U1@mid.individual.net> <3a76$4b602b7c$5350c024$19599@cache100.multikabel.net> <7si52rFr64U1@mid.individual.net> <87ljff3eoh.fsf@informatimago.com> <7sjm3uFeofU1@mid.individual.net> <874om32k7g.fsf@informatimago.com> <7t1ufvFu70U1@mid.individual.net> <87vdebo0jz.fsf@galatea.lan.informatimago.com> <87mxzn74qa.fsf@fever.mssgmbh.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: individual.net +joCUv6ZulC9qRu6X6DerAWy5gpMLZ1jezIK56dyDEmUrig4nD
Cancel-Lock: sha1:N2ExYWY4ZDNjOTI5OTc4YTliN2MzYmVmZmY1ZmJkODhjZWEwZDQzMQ== sha1:T9LlURCm2PwaDSJsdu+tC4Hkgak=
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA
oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9
033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac
l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR
mV+hO/VvFAAAAABJRU5ErkJggg==
X-Accept-Language: fr, es, en
X-Disabled: X-No-Archive: no
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin)