MAMEWorld >> The Loony Bin
View all threads Index   Flat Mode Flat  

italieAdministrator
MAME owes italie many thank yous, hah
Reged: 09/20/03
Posts: 15246
Loc: BoomTown
Send PM
Programming/maths question....soft floats...
07/26/13 02:21 PM


Torn in my head on how to handle an issue. I have many things to consider (timing, memory, volume of code additions, etc) that are jumbling the way I'm looking at this issue. Curious on how some of the more seasoned vets would tackle this one, or if someone would set up the math different.

The goal:

A simple ratio(ish) equation where I take points A, B and C in a data plot, and perform the equation "(A/C) / (B/C)". I need to keep at least two significant digits worth of precision.

example values might be 15034, 15044, 15157 (A,B,C)

The issue:

I'm working with an embedded processor that only does soft floats. Not only is this time consuming, but works out the correct answer only 75% of the time. Other times I see "rounding errors" (assuming they are rounding errors int he soft float libs) which slightly skew my two significant digits.

No matter how I play with the numbers, precision, ect, as long as floats are involved I get the occasional glitch. Thinking of adding fixed point libs, but that is going to be a pretty large hit for a tiny issue.

Thoughts, comments? I'm working on six different issues at the moment, and I can't seem to clear my head on this one...







Entire thread
Subject Posted by Posted on
* Programming/maths question....soft floats... italieAdministrator 07/26/13 02:21 PM
. * Thanks for all the suggestions.... italieAdministrator  07/27/13 12:44 AM
. * Re: Programming/maths question....soft floats... krick  07/26/13 10:55 PM
. * Re: Programming/maths question....soft floats... lharms  07/26/13 09:53 PM
. * Re: Programming/maths question....soft floats... amused  07/26/13 07:50 PM
. * Re: Programming/maths question....soft floats... italieAdministrator  07/27/13 12:50 AM
. * Re: Programming/maths question....soft floats... krick  07/27/13 04:52 AM
. * Re: Programming/maths question....soft floats... Vas Crabb  07/26/13 06:31 PM
. * Re: Programming/maths question....soft floats... GatKongModerator  07/26/13 02:56 PM
. * Re: Programming/maths question....soft floats... Gor  07/26/13 03:52 PM
. * Re: Programming/maths question....soft floats... italieAdministrator  07/26/13 04:14 PM

Extra information Permissions
Moderator:  GatKong 
0 registered and 304 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1078