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 2002:a5e:820d:: with SMTP id l13-v6mr21321576iom.106.1537233419719; Mon, 17 Sep 2018 18:16:59 -0700 (PDT) X-Received: by 2002:aca:de07:: with SMTP id v7-v6mr2410oig.5.1537233419588; Mon, 17 Sep 2018 18:16:59 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!1.eu.feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.166.215.MISMATCH!x188-v6no26917ite.0!news-out.google.com!c63-v6ni36ith.0!nntp.google.com!x188-v6no26915ite.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 17 Sep 2018 18:16:59 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=176.59.41.77; posting-account=-CxkpgoAAAC4sQudwZebWnArsZbT2lvS NNTP-Posting-Host: 176.59.41.77 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: GNAT for AVR - Mathematical Functions From: rakusu_klein@fastmail.jp Injection-Date: Tue, 18 Sep 2018 01:16:59 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:54355 Date: 2018-09-17T18:16:59-07:00 List-Id: It is always be bottleneck =E2=80=94 doing math on slow integer 8-bit CPU w= ith tiny amount of memory and instructions only for addition and subtractio= n, =E2=80=94 because it produce a huge pieces of slow machine code. So all = math there are doing in integers by a table calculations, adds and shifts. = Therefore in future it's better to go away from AVR for you with math, I th= ink. Btw, there is a quite old C-runtime library for AVR at http://savannah.nong= nu.org/projects/avr-libc/ =E2=80=94 it might be helpful for you, especially= its handwritten libm. It can also be useful to look at CORDIC algorithm, f= rex http://www.dcs.gla.ac.uk/~jhw/cordic/index.html