Click here to Skip to main content
15,900,711 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: When is a double a string Pin
David Skelly13-May-10 4:47
David Skelly13-May-10 4:47 
GeneralRe: When is a double a string Pin
Luc Pattyn13-May-10 4:50
sitebuilderLuc Pattyn13-May-10 4:50 
GeneralRe: When is a double a string Pin
J4amieC13-May-10 5:29
J4amieC13-May-10 5:29 
GeneralRe: When is a double a string Pin
Luc Pattyn13-May-10 5:33
sitebuilderLuc Pattyn13-May-10 5:33 
GeneralRe: When is a double a string Pin
Electron Shepherd13-May-10 6:59
Electron Shepherd13-May-10 6:59 
GeneralRe: When is a double a string Pin
Luc Pattyn13-May-10 7:35
sitebuilderLuc Pattyn13-May-10 7:35 
GeneralRe: When is a double a string Pin
Electron Shepherd13-May-10 7:41
Electron Shepherd13-May-10 7:41 
GeneralRe: When is a double a string Pin
supercat914-May-10 6:36
supercat914-May-10 6:36 
Luc Pattyn wrote:
In general, for a non-zero positive target value, one would typically use:


The minimum amount of error one should accept would depend not on the target value, but upon the magnitude of the largest value from which something was subtracted to yield the target value. For example, when subtracting 281474976710655.1 from 281474976710656.1, the final result will be about 1.03125 which is much larger than a typical 'epsilon' one would expect for a number around one.

The real question, of course, should be how close does the number need to be to be identical from a 'practical' perspective. That's going to depend entirely on the application. If one is trying to produce a list of boards one needs to cut, and two boards differ by 0.1", that may or may not be a difference worthy of producing a separate line item. If boards have to fit within 0.05", the 0.1" difference would be significant. If the boards are going to have some mounting slop, even a 0.5" difference might be insignificant. Obviously the computer isn't going to magically know what's meaningful and what isn't.
GeneralRe: When is a double a string Pin
PIEBALDconsult13-May-10 4:39
mvePIEBALDconsult13-May-10 4:39 
GeneralRe: When is a double a string Pin
Chris Maunder13-May-10 15:50
cofounderChris Maunder13-May-10 15:50 
GeneralSelecting all coordinates withing a distance Pin
Jeroen De Dauw12-May-10 12:51
Jeroen De Dauw12-May-10 12:51 
QuestionRe: Selecting all coordinates withing a distance Pin
Chris Meech13-May-10 3:09
Chris Meech13-May-10 3:09 
AnswerRe: Selecting all coordinates withing a distance Pin
Jeroen De Dauw13-May-10 3:12
Jeroen De Dauw13-May-10 3:12 
AnswerRe: Selecting all coordinates withing a distance Pin
elchupathingy13-May-10 3:54
elchupathingy13-May-10 3:54 
GeneralRe: Selecting all coordinates withing a distance Pin
Chris Meech13-May-10 4:22
Chris Meech13-May-10 4:22 
GeneralRe: Selecting all coordinates withing a distance Pin
David Skelly13-May-10 4:37
David Skelly13-May-10 4:37 
GeneralRe: Selecting all coordinates withing a distance Pin
Jeremy Hutchinson18-May-10 5:17
professionalJeremy Hutchinson18-May-10 5:17 
AnswerRe: Selecting all coordinates withing a distance Pin
Bernhard Hiller13-May-10 23:10
Bernhard Hiller13-May-10 23:10 
GeneralRe: Selecting all coordinates withing a distance Pin
Bernhard Hiller13-May-10 23:28
Bernhard Hiller13-May-10 23:28 
GeneralRe: Selecting all coordinates withing a distance Pin
Member 35753717-May-10 11:40
Member 35753717-May-10 11:40 
GeneralHow to sequence a loop Pin
TheNexpert6-May-10 23:10
TheNexpert6-May-10 23:10 
GeneralRe: How to sequence a loop Pin
riced6-May-10 23:51
riced6-May-10 23:51 
GeneralRe: How to sequence a loop Pin
Jeroen De Dauw7-May-10 0:43
Jeroen De Dauw7-May-10 0:43 
GeneralRe: How to sequence a loop Pin
Omar Gameel Salem13-May-10 13:55
professionalOmar Gameel Salem13-May-10 13:55 
GeneralRe: How to sequence a loop Pin
David Skelly7-May-10 2:09
David Skelly7-May-10 2:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.