Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #833
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | Dann Corbit <dcorbit@connx.com> |
| Newsgroups | comp.programming |
| Subject | Re: calculating the power of a fixed point |
| Date | Tue, 20 Sep 2011 12:09:03 -0700 |
| Organization | Aioe.org NNTP Server |
| Lines | 44 |
| Message-ID | <MPG.28e2849671fbcb97989684@aioe.org> (permalink) |
| References | <2d2836aa-2443-4e56-9fef-d38e12c60dcf@z41g2000yqb.googlegroups.com> |
| NNTP-Posting-Host | hV1AxOvTemF4njFnFvAJqg.user.speranza.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="us-ascii" |
| Content-Transfer-Encoding | 7bit |
| X-Complaints-To | abuse@aioe.org |
| User-Agent | MicroPlanet-Gravity/3.0.4 |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| Xref | x330-a1.tempe.blueboxinc.net comp.programming:833 |
Show key headers only | View raw
In article <2d2836aa-2443-4e56-9fef- d38e12c60dcf@z41g2000yqb.googlegroups.com>, kerenpur@gmail.com says... > > Hello! > I want to represent x and y, both non-integers as a fixed point data > type > I am having trouble calculating x^y without using the float library > in C++ > because the standard library includes only a floating point > implementation of the power function http://focus.ti.com/general/docs/lit/getliterature.tsp? literatureNumber=spra619&fileType=pdf "General Guide to Implement Logarithmic and Exponential Operations on a Fixed-Point DSP" Also: http://www.velocityreviews.com/forums/t717009-fixed-point- implementation-of-c-exponent-function.html At the bottom of the page a post by thadula includes code for several fixed point math functions which may be useful. This thread may have something useful in it: http://coding.derkeiler.com/Archive/C_CPP/comp.lang.c/2008- 03/msg01843.html This link: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.92.5605 &rep=rep1&type=pdf looks like it might be useful. I did not try it, but this seems interesting (though it seems that a lot of iterations were necessary): http://www.ehow.co.uk/how_6563047_use-fixed-point-calculate- exponentiation.html And, of course, cordic calculations are a classic: http://www.dcs.gla.ac.uk/~jhw/cordic/index.html http://people.sc.fsu.edu/~jburkardt/m_src/cordic/cordic.html http://www.quinapalus.com/efunc.html
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar
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