It's Hard To Compare Floating-Point Numbers

Last week I posed a problem: Suppose you have an inheritance hierarchy that lets you represent integers or floating-point numbers. How would you define comparison within your hierarchy? We can restate this problem in a language-independent way: How can we compare two numbers, either of which might be integer or floating-point?


March 01, 2013
URL:http://www.drdobbs.com/open-source/mojax-mobile-ajax-framework/mobile/its-hard-to-compare-floating-point-numbe/240149806

Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.