× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Tue, Mar 19, 2013 at 5:26 PM, John Yeung <gallium.arsenide@xxxxxxxxx>wrote:

I'm not challenging whether the requirement makes sense. The point of
asking these things is: If you're working with numbers other than
whole numbers, most likely you're working with floats. And if you're
doing that, you're inherently introducing funky, unintuitive numerical
behaviors.


I agree floats can be funky...

But he's not dealing with floats, remember this is and has always been
business system. So there's another option besides integer and floats.
Namely, fixed decimal. In which case we do have an exact 0.2
and consequently an exact 3 * 0.2.

As long as you manipulate the decimal values within the
system's precision and scale you will always have exact answers.

The problem occurs when you move outside the limits. One simply needs to
understand the precision rules when dealing with fixed decimal.

Charles


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.