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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a6b:6312:: with SMTP id p18-v6mr1606692iog.43.1537859685605; Tue, 25 Sep 2018 00:14:45 -0700 (PDT) X-Received: by 2002:a9d:5c02:: with SMTP id o2-v6mr22434otk.7.1537859685368; Tue, 25 Sep 2018 00:14:45 -0700 (PDT) Newsgroups: comp.lang.ada Date: Tue, 25 Sep 2018 00:14:45 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=160.46.252.18; posting-account=mOyWBQoAAAD7S-NBmMUOr9hRClcL0vqR NNTP-Posting-Host: 160.46.252.18 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <89ebac93-54c9-40bd-9867-fca6febc3ecf@googlegroups.com> Subject: Re: GNAT for AVR - Mathematical Functions From: R R Injection-Date: Tue, 25 Sep 2018 07:14:45 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!feed.ac-versailles.fr!proxad.net!feeder1-2.proxad.net!209.85.166.216.MISMATCH!j6-v6no31327ith.0!news-out.google.com!z5-v6ni46ite.0!nntp.google.com!x188-v6no30369ite.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Xref: reader02.eternal-september.org comp.lang.ada:54418 Date: 2018-09-25T00:14:45-07:00 List-Id: On Monday, September 17, 2018 at 4:22:47 AM UTC+2, Ada Newcomer wrote: > Hello. >=20 > I'm programming an ATmega328P with the GNAT compiler for AVR. >=20 > I need to use the Sqrt, Arctan and Atan2 functions. But maybe in the futu= re I will need to use some more. >=20 > I don't have access to the regular Ada.Numerics package. >=20 > By now, I wrote the Sqrt using the Newton's method and Arctan using Taylo= r series. >=20 > I would like to know if there is a better way to use/implement mathematic= al functions (maybe import them from C?). >=20 > I really appreciate any help. The old AVR-ADA project never supported floting point math. The AVR 8bit pr= ocessors are not made for that, even though you can use float and double in= Arduino. The AVR compiler by Adacore from around 2011 did support floating= point variables as far as I remember, I am not sure about the math functio= ns. regards Rolf