oh, geez... Okay, you guys made your point! ;-)

One thing I love about this list; I *always* get useful info.

I'll find a better way to do this soon. In this particular case, the "match" could be specified as broadly as any value falling within a sort of "bin." The "bottoms" of each of these bins are defined by the constant float array. So, I could probably just say that any number that falls above the lower limit of a bin (i.e., half-way between float A and B), or below the upper limit of the bin (half-way between float B and C) is in the bin.

Anyway, these "bins" are fairly far apart so, as I said before, it seems pretty safe, for the time being.
I will clean it up soon.

thanks for all the valuable info!

J.


On 11-Apr-09, at 2:12 PM, Michael Ash wrote:

On Sat, Apr 11, 2009 at 4:45 PM, James Maxwell
<jbmaxw...@rubato-music.com> wrote:
hmm... Well, this all sounds like a sledge-hammer approach to my immediate
problem.

The actual explanation of what I'm doing is kind of long-winded, so I'll spare you that. For now, I know the calculated values will always come out the same, since there are a limited number of possible inputs, and I know they'll very nearly match my stored constants (and my constants are well
separated, so %10 is more than enough).

Are you always running these calculations on identical hardware?
Because unless you're doing that, there's no way you can know that
your calculated values will always come out the same.

Floating point isn't just imprecise because the variables are of
finite size and therefore finite precision. It's also imprecise
because the individual calculations are not always performed to the
full precision available in the finite representation, and the
variation from full precision is pretty much implementation defined.

Mike
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/jbmaxwell%40rubato-music.com

This email sent to jbmaxw...@rubato-music.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to