Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #69635

Re: routine for angles needed

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: routine for angles needed
Date 2015-09-06 11:59 -0700
Organization None to speak of
Message-ID <lnh9n7v0fb.fsf@kst-u.example.com> (permalink)
References (9 earlier) <6p40satg9dn658g1tojf6q6onnp65rvjj4@4ax.com> <mpr00v$1hn$1@speranza.aioe.org> <7oa3sapt6r9q23hicbp2tpafqg3rjl98do@4ax.com> <kfnr3mcww4j.fsf@x-alumni2.alumni.caltech.edu> <lntwr8v48u.fsf@kst-u.example.com>

Show all headers | View raw


Keith Thompson <kst-u@mib.org> writes:
[...]
> 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?

Thinking about this a bit more, such a representation would have
to place the decimal point at the low-order end of the significand,
rather than at or near the high-order end.

A decimal floating-point scheme isn't much use if it can't represent,
for example, 1.1 exactly.

In binary floating-point, the "binary point" is at or near
the high-order end of the significand.  The value 99.5, which
is 1100011.1 in binary, can be represented with a significand of
binary 0.11000111, with the exponent denoting multiplication of that
value by 2**8.  (In practice, since the leading bit is always 1,
it's usually implicit; this makes 0.0 a special case.)

Similar methods can be used for BCD decimal floating-point, since
the significand can represent a value like 0.995 exactly.

A binary significand cannot represent non-binary fractions exactly,
so the significand would have to store something like 995, with
the exponent denoting multiplication by 10**-1.

You'd probably want an implicit bias on the exponent to keep the
range of positive and negative exponents more or less symmetric.

-- 
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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-09-12 00:05 +0000
                Re: routine for angles needed Robert Wessel <robertwessel2@yahoo.com> - 2015-09-07 00:31 -0500
                Re: routine for angles needed glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-09-12 00:00 +0000
                Re: routine for angles needed glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-09-11 23:17 +0000
                Re: routine for angles needed James Kuyper <jameskuyper@verizon.net> - 2015-09-11 19:46 -0400
                Re: routine for angles needed glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-09-12 03:56 +0000
                Re: routine for angles needed James Kuyper <jameskuyper@verizon.net> - 2015-09-12 12:33 -0400
                Re: routine for angles needed Richard Damon <Richard@Damon-Family.org> - 2015-09-12 14:29 -0400
                Re: routine for angles needed James Kuyper <jameskuyper@verizon.net> - 2015-09-12 15:58 -0400
                Re: routine for angles needed glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-09-13 06:21 +0000
                Re: routine for angles needed Keith Thompson <kst-u@mib.org> - 2015-09-06 11:59 -0700
                Re: routine for angles needed glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-09-12 00:16 +0000
                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 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-09-12 00:25 +0000
                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