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

Ole Reinhardt ole.reinhardt at embedded-it.de
Wed May 30 14:29:32 CEST 2012


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 




More information about the En-Nut-Discussion mailing list