Die Erde ist nicht flach? ha
Faszinierende Funktion!
Könnte Ihr Genauigkeit Probleme durch harte Werte verursacht werden, in eine Ganzzahl umgewandelt und nicht eine Gleitkommazahl wie kann erwarten gewesen wäre? Dies würde unerwünschte Rundungen.
ZB:
LOCAL B = uSq/1024 * (256 + USQ * (-128 + USQ * (* 74-47 USQ)))
Die 1024 würde ein Integer sein, und Sie würden das ".0" hinzufügen, um eine float sein.
LOCAL B = uSq/1024.0 * (256,0 + USQ * (-128,0 + USQ * (74,0 bis 47,0 * USQ)))
Aber das kann nicht dein Fall sein, wenn die restlichen Formel noch Schwimmer ist.
Ich bin nicht sicher ohne Prüfung.
[Original ENGLISH]
The Earth isn't flat? ha
Fascinating function!
Could your accuracy issues be caused by hard values being converted to an integer and not a floating point number as may have been expected? This would cause undesired rounding.
Eg:
LOCAL B = uSq/1024 * (256+uSq*(-128+uSq*(74-47*uSq)))
The 1024 would be an integer, and you would add the ".0" to be a float.
LOCAL B = uSq/1024.0 * (256.0+uSq*(-128.0+uSq*(74.0-47.0*uSq)))
But this may not be your case if the remaining formula is still float.
I'm not sure without testing.