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


Groups > comp.programming > #859

Re: calculating the power of a fixed point

From "BartC" <bc@freeuk.com>
Newsgroups comp.programming
Subject Re: calculating the power of a fixed point
Date 2011-09-24 12:58 +0100
Organization A noiseless patient Spider
Message-ID <j5kgme$rm8$1@dont-email.me> (permalink)
References (3 earlier) <717d2094-8977-4914-842f-5727e063f686@p25g2000pri.googlegroups.com> <slrn3vfsj7osno.eca.ike@sverige.freeshell.org> <79114815-2bea-46d6-a3e6-273bdda34d14@e3g2000pri.googlegroups.com> <slrn3vfsj7q32k.jl0.ike@sverige.freeshell.org> <lPednSOuSqKogODTnZ2dnUVZ_hednZ2d@earthlink.com>

Show all headers | View raw



"Patricia Shanahan" <pats@acm.org> wrote in message 
news:lPednSOuSqKogODTnZ2dnUVZ_hednZ2d@earthlink.com...
> On 9/23/2011 3:46 PM, Ike Naar wrote:
>> On 2011-09-23, Robin Vowels<robin.vowels@gmail.com>  wrote:
>>> On Sep 23, 9:52?pm, Ike Naar<i...@sverige.freeshell.org>  wrote:
>>>> On 2011-09-23, Robin Vowels<robin.vow...@gmail.com>  wrote:
>>>>
>>>>> On Sep 20, 10:36?pm, "Dmitry A. Kazakov"<mail...@dmitry-kazakov.de>
>>>>> wrote:
>>>>>> Fixed-point arithmetic is exact.
>>>>
>>>>> Not really. ?Addition, subtraction, and multiplication are.
>>>>> However, division is not.
>>>>
>>>> What is the exact result of 1.6 * 1.6 (one decimal place) ?
>>>
>>> The exact result is 2.56.  Why would you drop one digit?
>>
>> Isn't that what fixed-point arithmetic is about? Having a fixed
>> number of digits after the decimal (or binary) point?
>
> Yes, but if you want exactness you make sure that number of digits is
> sufficient to store the exact answers.

How does that work? If there are N digits after the point, then in general 
the result of a multiply will need up to 2N digits.

-- 
Bartc 

Back to comp.programming | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

calculating the power of a fixed point Keren Davidpur <kerenpur@gmail.com> - 2011-09-20 02:00 -0700
  Re: calculating the power of a fixed point "BartC" <bc@freeuk.com> - 2011-09-20 12:01 +0100
    Re: calculating the power of a fixed point "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2011-09-20 14:36 +0200
      Re: calculating the power of a fixed point Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-21 03:52 +0100
        Re: calculating the power of a fixed point "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2011-09-21 10:36 +0200
      Re: calculating the power of a fixed point Robin Vowels <robin.vowels@gmail.com> - 2011-09-23 04:03 -0700
        Re: calculating the power of a fixed point Ike Naar <ike@sverige.freeshell.org> - 2011-09-23 11:52 +0000
          Re: calculating the power of a fixed point Robin Vowels <robin.vowels@gmail.com> - 2011-09-23 08:59 -0700
            Re: calculating the power of a fixed point Ike Naar <ike@sverige.freeshell.org> - 2011-09-23 22:46 +0000
              Re: calculating the power of a fixed point Patricia Shanahan <pats@acm.org> - 2011-09-23 16:58 -0700
                Re: calculating the power of a fixed point "BartC" <bc@freeuk.com> - 2011-09-24 12:58 +0100
                Re: calculating the power of a fixed point Patricia Shanahan <pats@acm.org> - 2011-09-24 07:18 -0700
                Re: calculating the power of a fixed point Jongware <jongware@no-spam.plz> - 2011-09-26 11:03 +0200
                Re: calculating the power of a fixed point "BartC" <bc@freeuk.com> - 2011-09-26 10:40 +0100
                Re: calculating the power of a fixed point Robin Vowels <robin.vowels@gmail.com> - 2011-10-01 03:51 -0700
                Re: calculating the power of a fixed point Robin Vowels <robin.vowels@gmail.com> - 2011-10-01 03:44 -0700
                Re: calculating the power of a fixed point glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-10-01 10:56 +0000
                Re: calculating the power of a fixed point Robin Vowels <robin.vowels@gmail.com> - 2011-10-01 07:00 -0700
                Re: calculating the power of a fixed point glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-10-01 18:04 +0000
                Re: calculating the power of a fixed point Robin Vowels <robin.vowels@gmail.com> - 2011-10-01 16:27 -0700
                Re: calculating the power of a fixed point Robin Vowels <robin.vowels@gmail.com> - 2011-10-02 00:19 -0700
                Re: calculating the power of a fixed point Robin Vowels <robin.vowels@gmail.com> - 2011-10-02 00:24 -0700
  Re: calculating the power of a fixed point Dann Corbit <dcorbit@connx.com> - 2011-09-20 12:09 -0700
  Re: calculating the power of a fixed point Robin Vowels <robin.vowels@gmail.com> - 2011-09-22 03:21 -0700
  Re: calculating the power of a fixed point Robin Vowels <robin.vowels@gmail.com> - 2011-09-23 04:07 -0700
    Re: calculating the power of a fixed point Peter Flass <Peter_Flass@Yahoo.com> - 2011-09-23 08:17 -0400
      Re: calculating the power of a fixed point Robin Vowels <robin.vowels@gmail.com> - 2011-09-23 08:30 -0700
    Re: calculating the power of a fixed point glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-09-23 12:39 +0000
      Re: calculating the power of a fixed point Robin Vowels <robin.vowels@gmail.com> - 2011-09-23 08:44 -0700
        Re: calculating the power of a fixed point glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-09-23 17:07 +0000
          Re: calculating the power of a fixed point Robin Vowels <robin.vowels@gmail.com> - 2011-09-23 19:17 -0700

csiph-web