comp.lang.ada
 help / color / mirror / Atom feed
From: R R <rrr.eee.27@gmail.com>
Subject: Re: GNAT for AVR - Mathematical Functions
Date: Tue, 25 Sep 2018 00:14:45 -0700 (PDT)
Date: 2018-09-25T00:14:45-07:00	[thread overview]
Message-ID: <89ebac93-54c9-40bd-9867-fca6febc3ecf@googlegroups.com> (raw)
In-Reply-To: <ed6bc2e2-a2e1-4a0b-b253-8142d47518c9@googlegroups.com>

On Monday, September 17, 2018 at 4:22:47 AM UTC+2, Ada Newcomer wrote:
> Hello.
> 
> I'm programming an ATmega328P with the GNAT compiler for AVR.
> 
> I need to use the Sqrt, Arctan and Atan2 functions. But maybe in the future I will need to use some more.
> 
> I don't have access to the regular Ada.Numerics package.
> 
> By now, I wrote the Sqrt using the Newton's method and Arctan using Taylor series.
> 
> I would like to know if there is a better way to use/implement mathematical functions (maybe import them from C?).
> 
> I really appreciate any help.

The old AVR-ADA project never supported floting point math. The AVR 8bit processors 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 functions.

regards
    Rolf

      parent reply	other threads:[~2018-09-25  7:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-17  2:22 GNAT for AVR - Mathematical Functions ada.newcomer
2018-09-17  7:18 ` Dmitry A. Kazakov
2018-09-17 22:41   ` Aurele Vitali
2018-09-17 12:22 ` Simon Wright
2018-09-17 17:28 ` Bill Findlay
2018-09-17 22:35 ` Aurele Vitali
2018-09-18  1:16 ` rakusu_klein
2018-09-25  7:14 ` R R [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox