From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e7b0825eca61cc23 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news4.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: floating point to fixed point conversion References: <1140560157.376760.292570@g43g2000cwa.googlegroups.com> In-Reply-To: <1140560157.376760.292570@g43g2000cwa.googlegroups.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Tue, 21 Feb 2006 23:49:05 GMT NNTP-Posting-Host: 67.150.76.223 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.pas.earthlink.net 1140565745 67.150.76.223 (Tue, 21 Feb 2006 15:49:05 PST) NNTP-Posting-Date: Tue, 21 Feb 2006 15:49:05 PST Xref: g2news1.google.com comp.lang.ada:3052 Date: 2006-02-21T23:49:05+00:00 List-Id: riya1012@gmail.com wrote: > I need some help from you. I am doing a DSP project and for that I need > to do some C coding for the conversion of sample data which is in > floating point representation to fixed point representation. This is c.l.ada. We're for engineering SW in Ada, not for "C coding". > the sample data is in floating point like > 0.224128 > 2.299965 > 0.448350 > -1.779926 > My DSP algorithm is implemented in C and is supposed to be using fixed > point representation. > The above data is intended to be converted to fixed integer format.I > request you to help me out regarding this conversion.I will be very > glad if u give me some hints or algorithms for this conversion. I have no idea how to convert floating-point values to fixed point in C, and this does not seem to be the right place to be asking about that. As far as I know, C does not have fixed-point types. Ada does; yet another reason to use Ada. If you get a useful answer about C coding here, it will be pure luck. I suggest you try c.l.c. If I'm misinterpreting your question, and this does have something to do with Ada, perhaps you can rephrase it in a manner that makes that clear. -- Jeff Carter "Death awaits you all, with nasty, big, pointy teeth!" Monty Python & the Holy Grail 20