From: Simon Wright <simon@pushface.org>
Subject: Re: GNAT for AVR - Mathematical Functions
Date: Mon, 17 Sep 2018 13:22:05 +0100
Date: 2018-09-17T13:22:05+01:00 [thread overview]
Message-ID: <lya7ogjouq.fsf@pushface.org> (raw)
In-Reply-To: ed6bc2e2-a2e1-4a0b-b253-8142d47518c9@googlegroups.com
ada.newcomer@gmail.com writes:
> 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.
For what it's worth, the FSF GCC arm-eabi compiler/runtime that I built
imports the basic maths functions from the C library. This may be
because I built the C library (newlib) first?
The GNAT CE arm-eabi compiler goes to basics with very deep-looking
code; possibly because it's "the Ada Cert Math specific version" (from
s-libsin.ads), i.e. one with which AdaCore will support customers with
certification requirements.
next prev parent reply other threads:[~2018-09-17 12:22 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 [this message]
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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox