From mboxrd@z Thu Jan 1 00:00:00 1970 From: peter at rulingia.com (Peter Jeremy) Date: Thu, 13 Feb 2020 17:57:20 +1100 Subject: [COFF] Fwd: Old and Tradition was [TUHS] V9 shell In-Reply-To: References: <20200212030152.GJ852@mcvoy.com> Message-ID: <20200213065720.GA79914@server.rulingia.com> On 2020-Feb-12 15:11:27 -0700, Warner Losh wrote: >Most cs types barely know that 2.234 might not be an exact number when >converted to binary... My favourite example (based on a real bug that I was involved in investigating) is: int(0.29 * 100) = 28 (using IEEE doubles). That result is very counter-intuitive. (Detailed explanation available on request). In some ways IEEE-754 has made things worse - before that standard, almost every computer system implemented something different. Floating point was well known to be "here be dragons" territory and people who ventured there were either foolhardy or had enough numerical analysis training to be able to understand (and cope with) what the computer was doing. IEEE-754 offered a seeming nirvana - where the same inputs would result in the same outputs (down to the bit) irrespective of what computer you ran your code on. The underlying problems were still present but, at least in simple cases, were masked. Why employ an experienced numerical analyst to develop the code when a high-school student can translate the mathematical equations into running code in the language-du-jour? (And some languages, like Java, make a virtue out of hiding all the information needed to properly handle exceptional conditions). -- Peter Jeremy -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 963 bytes Desc: not available URL: