[En-Nut-Discussion] Problems using global variables and/or floating point numbers on Nut/Os (using ethernut 5)

Vegard Aaker vegardaa at stud.ntnu.no
Wed May 30 14:44:23 CEST 2012


Unfortunately, the global variables is a part of a high speed
optimization program I use. And I do not have the possibility to
change it.

Any idea if the 7000-20000 global double values will be a problem for
the ethernut board?

On Wed, May 30, 2012 at 2:29 PM, Ole Reinhardt
<ole.reinhardt at embedded-it.de> wrote:
> Hello,
>
>> I have managed to transfer and run a small example optimization on the
>> board, but scaling up the problem failed. The code managed to run, but the
>> optimization did not converge.
>>
>> As I see it, there might be two problems. Numerical issues or the size of
>> the problem.
>>
>> What prescision are used on the Ethernut? How many digits?
>
> That depends on the datatype you use. (float, double, ?)
> For a double the IEEE 754 standard says 53bit for the fractional part,
> which means more or less 16 digits.
>
>> Is there a limit for the size of global variables?
>
> In general I would suggest not to use that much (or large) global
> variables but allocate memory from the heap to save your variables in.
>
> Bye,
>
> Ole
>
> --
>
> Thermotemp GmbH, Embedded-IT
>
> Embedded Hard-/ Software and Open Source Development,
> Integration and Consulting
>
> http://www.embedded-it.de
>
> Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen -
> tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97
>
> Hauptsitz - Hademarscher Weg 7 - 13503 Berlin
> Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002
> Geschäftsführer: Jörg Friedrichs, Ole Reinhardt
> Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion



-- 

- Vegard



More information about the En-Nut-Discussion mailing list