Improve precision of float numbers
|
04-16-2019, 02:43 PM
(This post was last modified: 04-16-2019 02:57 PM by Claudio L..)
Post: #10
|
|||
|
|||
RE: Improve precision of float numbers
(04-13-2019 09:43 AM)deetee Wrote: Thanks for the lot of hints. I think none of the libraries I mentioned will fit in your flash or ram, I thought you had one of the bigger MCUs. EDIT: By the way, you don't extract the library from the executable. You go to the sources section and look for decimal.c and decimal.h inside the newrpl folder. If you want transcendentals (which are unlikely to fit in your flash, but if you choose a newer AtMega32 with more flash...) look for lighttranscend.c, there's also transcendentals.c but they use tables. Depending on how much precision you want, the tables will become huge. In contrast, lighttranscend.c has no tables (at the expense of performance), and only a few constants (which you should reduce to the number of digits you need to reduce space). The routines are quite low-level, for examples on how to use them (since they are not documented well) you may look at lib-66-transcendentals.c to see what parameters they need. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)