Re: C arithmetic, was Software proofs, was Are there different

anton@mips.complang.tuwien.ac.at (Anton Ertl)
Wed, 08 Feb 2023 10:19:54 GMT

          From comp.compilers

Related articles
Re: C arithmetic, was Software proofs, was Are there different Keith.S.Thompson+u@gmail.com (Keith Thompson) (2023-02-05)
Re: C arithmetic, was Software proofs, was Are there different gah4@u.washington.edu (gah4) (2023-02-06)
Re: C arithmetic, was Software proofs, was Are there different DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2023-02-07)
Re: C arithmetic, was Software proofs, was Are there different gah4@u.washington.edu (gah4) (2023-02-08)
Re: C arithmetic, was Software proofs, was Are there different anton@mips.complang.tuwien.ac.at (2023-02-08)
Re: C arithmetic, was Software proofs, was Are there different DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2023-02-08)
Re: C arithmetic, was Software proofs, was Are there different gah4@u.washington.edu (gah4) (2023-02-09)
Re: C arithmetic, was Software proofs, was Are there different gah4@u.washington.edu (gah4) (2023-02-09)
Re: C arithmetic, was Software proofs, was Are there different DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2023-02-10)
Re: C arithmetic, was Software proofs, was Are there different gah4@u.washington.edu (gah4) (2023-02-10)
Re: C arithmetic, was Software proofs, was Are there different gah4@u.washington.edu (gah4) (2023-02-11)
[2 later articles]
| List of all articles for this month |
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.compilers
Date: Wed, 08 Feb 2023 10:19:54 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
References: 23-01-092 23-02-003 23-02-019 23-02-025 23-02-026 23-02-029
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="11788"; mail-complaints-to="abuse@iecc.com"
Keywords: arithmetic, comment
Posted-Date: 08 Feb 2023 11:49:47 EST

Hans-Peter Diettrich <DrDiettrich1@netscape.net> writes:
>AFAIK use IEEE-754 floating point numbers still sign-magnitude
>representation.
>Then the same representation of integral numbers may have advantages in
>computations.


Such as? Anyway, whatever these advantages may be, they have not been
enough to prevent the extermination of sign-magnitude integers.


>[I presume the sign-magnitude is to enable the hidden bit trick,
>which doesn't apply in unscaled integers. -John]


With a ones-complement or two's-complement mantissa the hidden bit
would just have the same sign as the sign bit, so this trick is not
tied to sign-magnitude representation.


Some years ago someone sketched a two's-complement representation for
FP (that also includes the exponent), but I did not quite get the
details. Anyway, I expect that whatever the advantages of that
representation are, they are not enough to justify the transition
cost.


- anton
--
M. Anton Ertl
anton@mips.complang.tuwien.ac.at
http://www.complang.tuwien.ac.at/anton/
[PDP-6/10 floating point was two's complement. As someone else recently noted, that
meant they could use fixed point compare instructions. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.