Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: routine for angles needed |
| Date | 2015-09-05 16:24 -0700 |
| Organization | None to speak of |
| Message-ID | <lntwr8v48u.fsf@kst-u.example.com> (permalink) |
| References | (8 earlier) <mpp3ld$ohg$1@speranza.aioe.org> <6p40satg9dn658g1tojf6q6onnp65rvjj4@4ax.com> <mpr00v$1hn$1@speranza.aioe.org> <7oa3sapt6r9q23hicbp2tpafqg3rjl98do@4ax.com> <kfnr3mcww4j.fsf@x-alumni2.alumni.caltech.edu> |
Tim Rentsch <txr@alumni.caltech.edu> writes:
> Robert Wessel <robertwessel2@yahoo.com> writes:
[...]
>> Ultimately any sort of decimal encoding has to be less efficient than
>> binary encoding, since you invariably end up with "invalid" bit
>> patterns. [snip]
>
> This isn't right. Using a decimal base for floating point
> is not inherently less bit efficient than a binary base.
> Using a decimal base can be much less convenient than
> using a binary base, but it is not inherently less bit
> efficient. In particular there needn't be any invalid
> or duplicate bit patterns.
As sometimes happens, I suspect you're talking about something
subtle that I haven't thought of.
The most obvious way to implement decimal floating-point on a
binary machine is to use binary-coded decimal, with each decimal
digit encoded as 4 bits. This is obviously bit-inefficient, using
only 10 of 16 possible bit patterns, effectively wasting about 17%
of the bits.
Another approach I've seen is to use 10 bits to store values from
0 to 1000, using 1000 of 1024 possible bit patterns, which is
about 99.66% efficient. I think IBM has proposed, and probably
implemented, something like this.
Are you thinking of a scheme that represents both the significand
and the exponent in binary, but in which the exponent simply
represents a power of 10? Has any system ever used such a scheme?
Or are you thinking of something else?
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-02 10:17 -0700
Re: routine for angles needed Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-08-02 10:38 -0700
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-02 11:10 -0700
Re: routine for angles needed Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-08-02 11:26 -0700
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-02 11:41 -0700
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-02 12:02 -0700
Re: routine for angles needed Bartc <bc@freeuk.com> - 2015-08-02 18:41 +0100
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-02 11:43 -0700
Re: routine for angles needed Bartc <bc@freeuk.com> - 2015-08-02 20:00 +0100
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-02 12:04 -0700
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-02 12:10 -0700
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-02 12:24 -0700
Re: routine for angles needed Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-08-02 12:32 -0700
Re: routine for angles needed Bartc <bc@freeuk.com> - 2015-08-02 20:40 +0100
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-02 12:59 -0700
Re: routine for angles needed Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-08-02 13:14 -0700
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-02 13:39 -0700
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-02 13:45 -0700
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-03 07:48 -0700
Re: routine for angles needed Bartc <bc@freeuk.com> - 2015-08-03 17:06 +0100
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-03 09:09 -0700
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-03 09:17 -0700
Re: routine for angles needed Bartc <bc@freeuk.com> - 2015-08-03 17:48 +0100
Re: routine for angles needed Keith Thompson <kst-u@mib.org> - 2015-08-03 13:44 -0700
Re: routine for angles needed Bartc <bc@freeuk.com> - 2015-08-03 23:51 +0100
Re: routine for angles needed Keith Thompson <kst-u@mib.org> - 2015-08-03 18:30 -0700
Re: routine for angles needed glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-08-03 23:11 +0000
Re: routine for angles needed Bartc <bc@freeuk.com> - 2015-08-04 01:32 +0100
Re: routine for angles needed glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-08-04 01:14 +0000
Re: routine for angles needed Robert Wessel <robertwessel2@yahoo.com> - 2015-08-03 20:26 -0500
Re: routine for angles needed glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-08-04 18:24 +0000
Re: routine for angles needed Robert Wessel <robertwessel2@yahoo.com> - 2015-08-05 01:46 -0500
Re: routine for angles needed glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-08-05 18:06 +0000
Re: routine for angles needed Tim Rentsch <txr@alumni.caltech.edu> - 2015-09-05 11:37 -0700
Re: routine for angles needed Keith Thompson <kst-u@mib.org> - 2015-09-05 16:24 -0700
Re: routine for angles needed Richard Damon <Richard@Damon-Family.org> - 2015-09-05 21:01 -0400
Re: routine for angles needed Robert Wessel <robertwessel2@yahoo.com> - 2015-09-05 23:30 -0500
Re: routine for angles needed glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-09-06 05:37 +0000
Re: routine for angles needed Robert Wessel <robertwessel2@yahoo.com> - 2015-09-07 00:27 -0500
Re: routine for angles needed glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-09-06 05:31 +0000
Re: routine for angles needed James Kuyper <jameskuyper@verizon.net> - 2015-09-06 11:57 -0400
Re: routine for angles needed Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-09-06 17:44 +0100
Re: routine for angles needed James Kuyper <jameskuyper@verizon.net> - 2015-09-06 14:02 -0400
Re: routine for angles needed Robert Wessel <robertwessel2@yahoo.com> - 2015-09-07 00:31 -0500
Re: routine for angles needed Keith Thompson <kst-u@mib.org> - 2015-09-06 11:59 -0700
Re: routine for angles needed Tim Rentsch <txr@alumni.caltech.edu> - 2015-09-06 18:04 -0700
Re: routine for angles needed Keith Thompson <kst-u@mib.org> - 2015-09-06 18:30 -0700
Re: routine for angles needed Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-06 18:48 -0700
Re: routine for angles needed Robert Wessel <robertwessel2@yahoo.com> - 2015-09-07 00:44 -0500
Re: routine for angles needed Tim Rentsch <txr@alumni.caltech.edu> - 2015-09-10 05:44 -0700
Re: routine for angles needed Robert Wessel <robertwessel2@yahoo.com> - 2015-08-03 20:16 -0500
Re: routine for angles needed glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-08-04 01:26 +0000
Re: routine for angles needed Robert Wessel <robertwessel2@yahoo.com> - 2015-08-05 02:05 -0500
Re: routine for angles needed Keith Thompson <kst-u@mib.org> - 2015-08-03 18:33 -0700
Re: routine for angles needed glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-08-04 21:24 +0000
Re: routine for angles needed Robert Wessel <robertwessel2@yahoo.com> - 2015-08-03 19:41 -0500
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-02 12:51 -0700
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-02 12:56 -0700
Re: routine for angles needed Bartc <bc@freeuk.com> - 2015-08-02 20:57 +0100
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-02 13:06 -0700
Re: routine for angles needed Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-02 22:25 +0100
Re: routine for angles needed Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-02 22:27 +0100
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-02 14:40 -0700
Re: routine for angles needed "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-08-02 19:08 -0700
Re: routine for angles needed fir <profesor.fir@gmail.com> - 2015-08-03 02:18 -0700
Re: routine for angles needed danncorbit@gmail.com - 2015-08-12 02:18 -0700
Re: routine for angles needed bartekltg <bartekltg@gmail.com> - 2015-09-07 05:02 +0200
csiph-web