![]() |
| | #1 |
| and the hat of Jobseeking Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,710
| Take some old bugs out, put some fresh ones in "It was working, honest guv, but we've since improved it." |
| Salem is offline | |
| | #2 |
| Cat without Hat Join Date: Apr 2003
Posts: 8,492
| In the linked MSDN blog post, commenters are falling over each other complaining about IEEE floating point inaccuracies. It's rather funny to watch.
__________________ All the buzzt! CornedBee"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code." - Flon's Law |
| CornedBee is offline | |
| | #3 |
| Unregistered User Join Date: Jul 2007
Posts: 982
| Only MS is this inventive.
__________________ May the Source be with you. |
| Yarin is offline | |
| | #4 |
| and the hat of marbles Join Date: May 2002 Location: Lund, Sweden
Posts: 2,041
| It's only six numbers out of almost 10^19 that don't work. Good enough, I say.
__________________ Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling |
| Sang-drax is offline | |
| | #5 |
| Ethernal Noob Join Date: Nov 2001
Posts: 1,891
| Least they didn't xray anyone to death. |
| indigo0086 is offline | |
| | #6 |
| Anti-Poster Join Date: Feb 2002
Posts: 1,241
| And the bug doesn't affect any formulas; it's just the display. Sure, it's a bug, but a fairly benign one. I just can't imagine how such a bug could pop up unless the display code is unnaturally convoluted.
__________________ Rule #1: Every rule has exceptions |
| pianorain is offline | |
| | #7 |
| Cat without Hat Join Date: Apr 2003
Posts: 8,492
| Which I wouldn't at all put past them. But I'm very puzzled, too.
__________________ All the buzzt! CornedBee"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code." - Flon's Law |
| CornedBee is offline | |
| | #8 |
| l'Anziano Join Date: Aug 2001
Posts: 2,630
| yeah that seems like a very odd bug to come up unless the person who programmed the code was drunk....I mean....how hard is it to say: Code: product = a * b; output = product; Code: product= a * b; if ( product== 65535 ) output = 100000; ....etc.... Last edited by DavidP; 09-28-2007 at 07:12 PM. |
| DavidP is offline | |
| | #9 |
| and the hat of marbles Join Date: May 2002 Location: Lund, Sweden
Posts: 2,041
| The bug has to do with conversion from binary to decimal for printing. If the binary result ends up being very, very close to 65535, but smaller, the conversion will fail. Maybe it has to do with lots of carried 1s?
__________________ Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling |
| Sang-drax is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| North Carolina's (not so) fresh produce | Sebastiani | General Discussions | 4 | 07-01-2009 11:43 PM |
| Where to put local auxiliary functions? | draugr | C++ Programming | 10 | 03-17-2009 08:46 PM |
| Where to put files to be read in on a Mac | bassist11 | C Programming | 3 | 03-12-2009 09:39 AM |
| How to put a string in a 2 dimensional character array? | atif7865 | C Programming | 2 | 12-05-2008 10:26 PM |
| God | datainjector | A Brief History of Cprogramming.com | 746 | 12-22-2002 12:01 PM |