Prev: Possible easy diagnostic outputting from multiple threads tothe one text frame
Next: JDK 1.6.0_21 released
From: Mayeul on 8 Jul 2010 03:56 Roedy Green wrote: > On Wed, 07 Jul 2010 19:48:24 +0200, Mayeul <mayeul.marguet(a)free.fr> > wrote, quoted or indirectly quoted someone who said : > >> Come on, if that did not lead to horribly broken code out in production, >> it would be a great IT achievement that you can produce new programs >> that work, without understanding what you're programming. > > I used use to teach FORTRAN at UBC way back when. We covered this in > the first semester. This very basic stuff about floating point. If > you taught yourself you may have missed this. See > http://mindprod.com/jgloss/floatingpoint.html > to fill in your missing background. I did not miss much from what the given URL tells about, I'm afraid. (Or not.) -- Mayeul
From: Mayeul on 8 Jul 2010 04:18 Lew wrote: > Lew wrote: >>> Your answer is here: >>> <http://docs.sun.com/source/806-3568/ncg_goldberg.html> > > Mayeul wrote: >> Come on, if that did not lead to horribly broken code out in production, >> it would be a great IT achievement that you can produce new programs >> that work, without understanding what you're programming. >> > [...] > Mayeul, I'm not sure what point you were actually making. I sincerely > hope you are not arguing in favor of programmers not understanding > what they're doing. Nah, I was being sarcastic. Well, that *would* be awesome if computers just listened to what we want and then programmed themselves, but I don't see it happening for real any soon :). To be honest, when I see what can be achieved by people who have close to no idea how the maths hold it all together, I wonder why I dream so much that all my colleagues would have had a full computer sciences education. Well, in that dream world of mine, some silly mistakes leading to horrible production issues would never have happened. Does not mean all silly mistakes are due to that though. I'm convincing myself there was no sarcasms to make. Oh well. I'd better stop. -- Mayeul
From: Andreas Leitgeb on 8 Jul 2010 05:39 Mayeul <mayeul.marguet(a)free.fr> wrote: > Roedy Green wrote: >> I used use to teach FORTRAN at UBC way back when. We covered this in >> the first semester. This very basic stuff about floating point. If >> you taught yourself you may have missed this. See >> http://mindprod.com/jgloss/floatingpoint.html >> to fill in your missing background. > I did not miss much from what the given URL tells about, I'm afraid. (Or > not.) A quote from the page: " It is probably best if you imagined that after every floating point " operation, a little demon came in and added or subtracted a tiny number " to fuzz the low order bits of your result. I like that thought :-) PS: before anyone comments on technical inaccuracies in the quote, please read up its original context at Roedy's URL, first.
From: Arved Sandstrom on 8 Jul 2010 05:57 Lew wrote: > Lew wrote: >>> Your answer is here: >>> <http://docs.sun.com/source/806-3568/ncg_goldberg.html> > > Mayeul wrote: >> Come on, if that did not lead to horribly broken code out in production, >> it would be a great IT achievement that you can produce new programs >> that work, without understanding what you're programming. >> > > You said it yourself - it leads to horribly broken code out in > production that people produce new programs without understanding what > they're programming. > > The reason that computer programmers command such good wages is that > it is a *skilled* profession. Most people cannot do it, and of those > who can it requires intelligence, study and practice, i.e., it > requires tremendous intellectual effort and capacity. > > It is one of the most fundamental and introductory aspects of computer > programming that floating-point "numbers" in a computer are limited- > precision approximations of real numbers. > > Mayeul, I'm not sure what point you were actually making. I sincerely > hope you are not arguing in favor of programmers not understanding > what they're doing. > > -- > Lew The problem is more fundamental. You can't properly teach floating point, or a bunch of other necessary programming concepts, without having students who are proficient at math. We're talking about the kind of math that underlies all of programming, not particular types of it that are necessary for specific problem domains. You can try to assign blame for not being good at math to the individual, but I blame the public school educational systems we have. It's not a child's job to know what he or she should know, it's the schools' job. And they're not doing very well at it. By the time we - employers, universities and colleges, IT programmes - receive those prospective programmers, we have a right to expect that they should know the basics. And more often than not they don't. Another factor at play, and Arne alluded to it, is that a lot of programmers - probably the majority - never have to worry about floating point issues. They'll never get bitten. The biggest source of potential problems for the general-purpose programmer is likely handling money, but if there's one pervasive piece of programming CW that even newbies hear about it's the advice to use integers rather than floating point. Hence they never have to think about it. I'm prepared to bet that considerably less than 5 percent of all professional programmers have thoroughly read _any_ of the handful of well-known papers on floating point arithmetic. AHS -- Sir James Dewar Is smarter than you are None of you asses Can liquify gases.
From: Screamin Lord Byron on 8 Jul 2010 06:26
On 07/08/2010 07:01 AM, Roedy Green wrote: > On Wed, 07 Jul 2010 19:48:24 +0200, Mayeul <mayeul.marguet(a)free.fr> > wrote, quoted or indirectly quoted someone who said : > >> Come on, if that did not lead to horribly broken code out in production, >> it would be a great IT achievement that you can produce new programs >> that work, without understanding what you're programming. > > I used use to teach FORTRAN at UBC way back when. We covered this in > the first semester. This very basic stuff about floating point. If > you taught yourself you may have missed this. See > http://mindprod.com/jgloss/floatingpoint.html > to fill in your missing background. Why not simply read Wiki's article about IEEE 754. If floating point calculations must be precise and predictable across platforms, one must ensure to use IEEE 754 (ie. strictfp keyword), and not the default, machine-dependent fp representation. |