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


Groups > sci.electronics.design > #503534

Re: OT: PIC16 divide and/or multiply routines

From Martin Brown <'''newspam'''@nezumi.demon.co.uk>
Newsgroups sci.electronics.design
Subject Re: OT: PIC16 divide and/or multiply routines
Date 2018-04-26 08:56 +0100
Organization Aioe.org NNTP Server
Message-ID <pbs0o9$65u$1@gioia.aioe.org> (permalink)
References <xvYYx.43198$Iw3.9957@fx30.iad> <4a9c4182-fe21-4b20-a35e-9c24e7b56d6a@googlegroups.com> <8o9uddpn7t5jjqo749c50pooks0ikepj0s@4ax.com> <pbpb9t$3nq$3@gioia.aioe.org> <0c250308-3c8a-4138-b0bd-82f973188f11@googlegroups.com>

Show all headers | View raw


On 25/04/2018 19:18, gnuarm.deletethisbit@gmail.com wrote:
> On Wednesday, April 25, 2018 at 3:38:42 AM UTC-4, Martin Brown
> wrote:
>> On 24/04/2018 13:51, Spehro Pefhany wrote:
>>> On Mon, 23 Apr 2018 08:48:05 -0700 (PDT), ramiserhan77@gmail.com 
>>> wrote:
>>> 
>>>> hey guys just i want to ask you, how is floating point
>>>> represented in assembly for pic16, for example if i wanna save
>>>> a value of 1.623 in memory, how can i save it using the 36
>>>> assembly instructions in pic16?
>>> 
>>> You can find floating point libraries for the PIC16 family. Some
>>> use the IEEE 754 representation.
>>> 
>>> It might be less painful to write the application in C if you
>>> really need floating point. You can download a free XC8 compiler
>>> that has deliberately poor optimization.
>> 
>> Although you *can* do this - today it would make much more sense to
>> use an ARM core that has native floating point support!
> 
> That strongly depends on the requirements for the floating point.

Although true relying on double precision reals to make a bad algorithm 
work is not good engineering practice. Most signal processing can be 
done in scaled integers or fixed point if you know what you are doing.

> Most of the smaller ARM devices only support single precision floats
> in hardware which have less precision than integer arithmetic.  If
> you need double precision floating point, you are back to using
> libraries or you need to use a much larger and power hungry device.

But a PIC16's memory isn't going to hold very many double precision 
reals anyway so I think it is a mute point.

-- 
Regards,
Martin Brown

Back to sci.electronics.design | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: OT: PIC16 divide and/or multiply routines ramiserhan77@gmail.com - 2018-04-23 08:48 -0700
  Re: OT: PIC16 divide and/or multiply routines bill.sloman@ieee.org - 2018-04-23 19:33 -0700
  Re: OT: PIC16 divide and/or multiply routines Terry Newton <nbill@bellsouth.net> - 2018-04-24 05:12 +0000
  Re: OT: PIC16 divide and/or multiply routines Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-04-24 09:26 +0100
    Re: OT: PIC16 divide and/or multiply routines John S <Sophi.2@invalid.org> - 2018-04-24 18:39 -0500
      Re: OT: PIC16 divide and/or multiply routines Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-04-25 08:37 +0100
        Re: OT: PIC16 divide and/or multiply routines "Tim Williams" <tiwill@seventransistorlabs.com> - 2018-04-25 03:25 -0500
          Re: OT: PIC16 divide and/or multiply routines Clifford Heath <no.spam@please.net> - 2018-04-25 19:57 +1000
        Re: OT: PIC16 divide and/or multiply routines Jasen Betts <jasen@xnet.co.nz> - 2018-04-26 07:24 +0000
          Re: OT: PIC16 divide and/or multiply routines David Brown <david.brown@hesbynett.no> - 2018-05-04 15:40 +0200
  Re: OT: PIC16 divide and/or multiply routines Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> - 2018-04-24 08:51 -0400
    Re: OT: PIC16 divide and/or multiply routines upsidedown@downunder.com - 2018-04-24 22:38 +0300
      Re: OT: PIC16 divide and/or multiply routines gnuarm.deletethisbit@gmail.com - 2018-04-25 11:15 -0700
        Re: OT: PIC16 divide and/or multiply routines Clifford Heath <no.spam@please.net> - 2018-04-26 09:35 +1000
    Re: OT: PIC16 divide and/or multiply routines Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-04-25 08:38 +0100
      Re: OT: PIC16 divide and/or multiply routines gnuarm.deletethisbit@gmail.com - 2018-04-25 11:18 -0700
        Re: OT: PIC16 divide and/or multiply routines Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-04-26 08:56 +0100
    Re: OT: PIC16 divide and/or multiply routines bitrex <user@example.net> - 2018-04-25 11:56 -0400

csiph-web