Beitrag
von jona2004 » 18 Mär 2014, 20:09
Hallo,
Der Thread ist wie vleeuwen sagt etwas in 2 Hauptthemen zerfallen, deshalb hier wie gewünscht eine Zusammenfassung.
A) von Quadro gestartet: Die Behauptung, dass es bei Umsetzung von Festkomma auf Gleitkomma immer wieder zu Fehlern kommt. Allerdings hat Quadro keinen Test, an dem man das nachprüfen kann, geschickt. Daraus ergab sich eine Diskussion, dass es generell schwierig ist "genau" mit Gleitkommazahlen zurechnen.
B) von UMueller gestartet: Die Aussage, dass der Befehl '+' keine Gleitkommazahlen verarbeitet ist richtig (Um ganz klar zu sein Befehl level 3 Hilfekapitel 8.5). Nach meinen Experimenten geht nur der Zuweisungsbefehl '=', was aber m.E. absolut ausreichend ist, wenn man sowieso Daten- und Kontrollfluss trennt indem man mit Operatoren (Hilfe Kapitel 8.8) arbeitet.
Um noch abschliessend vleeuwen's neue frage zubeantworten:
Solange nicht die exakte Bezeichung des Microcontrollers bekannt ist, kann man nicht mit 100% Sicherheit sagen of der A8 eine floatingpoint hardwareunit hat, aber es ist bei diesen grossen Controllern sehr wahrscheinlich. Beim M3 gibt es keine fängt erst bei Cortex M4 an.
Allerdings ist floatingpoint in software auch nicht extrem schlecht.
Hello,
The Thread is, as vleeuwen says, split into two topics, so here a short summary as requested.
A) Started by Quadro: It is claimed here that the conversion from integer to floating point data has errors and that the handling of floating point has bugs in general. Unfortunately, Quadro has not posted a testcase to try this out. Out of this there was a discussion started how "accurate" you can calculate using floatingpoint at all.
B) Started by UMUeller: The claim that the command '+' can not handle floatingpoint numbers is true. (To be clear it is about the commands as per help chapter 8.5). According to my experiments only the command '=', can handle floating point. IMHO it is sufficient, if you split Command- and Dataflow anyway using the Operators (Chapter 8.8).
To answer the new question from vleeuwen:
As long as not the exact type number is known, one cannot be 100% sure if the ARM8 offers floating point hardware, but typically those high powered machines offer it. The Coprocessor Cortex M3 does not have a floatingpointunit it starts from M4. But floating point is software is not too bad either.
Grüße / regards Joachim