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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.50.178.175 with SMTP id cz15mr32308869igc.5.1427405812023; Thu, 26 Mar 2015 14:36:52 -0700 (PDT) X-Received: by 10.182.19.232 with SMTP id i8mr172644obe.2.1427405407229; Thu, 26 Mar 2015 14:30:07 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!z20no17378igj.0!news-out.google.com!db6ni7igc.0!nntp.google.com!z20no17376igj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 26 Mar 2015 14:30:07 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=74.203.194.21; posting-account=bXcJoAoAAAAWI5APBG37o4XwnD4kTuQQ NNTP-Posting-Host: 74.203.194.21 References: <2c2ee86e-b9bd-49e3-aa7f-206f3c4da95e@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <3c1e4e95-f9d1-4d1f-950e-197278b6960e@googlegroups.com> Subject: Re: RFC: Generic Fixed-Point IIR Filter From: Patrick Noffke Injection-Date: Thu, 26 Mar 2015 21:36:52 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:25276 Date: 2015-03-26T14:30:07-07:00 List-Id: On Thursday, March 26, 2015 at 4:12:30 PM UTC-5, Randy Brukardt wrote: > Right. The rule specifically does not allow something like: > A * B * C Ah, okay. If I change the calculation to Filter.Y (1) := Filter.B (1) * Filter.X (1) + Filter.B (2) * Filter.X (2) + Filter.B (3) * Filter.X (3) - Filter.A (2) * Filter.Y (2) - Filter.A (3) * Filter.Y (3); Filter.Y (1) := Filter.Y (1) / Filter.A (1); Then it compiles. So it didn't like me doing the division with a universal_fixed product as the numerator. In my case, A(1) is 1.0, but that is not always the case, so there could still be overflow. I suppose I could change this to a Normalized_IIR_Filter (implying A(1) is 1.0). Thanks for your help. Patrick