Click here to Skip to main content
15,891,943 members

Comments by Ian A Davidson (Top 191 by date)

Ian A Davidson 23-Jul-14 2:31am View    
Do you mean, how can you overcome the rounding problem?
I expect people have written numerous articles on it, because it is a problem all computers have in one form or another due to the way floating point numbers work.
Ian A Davidson 23-Jul-14 2:22am View    
Deleted
Math.Round(value, 2, MidpointRounding.AwayFromZero);
Ian A Davidson 23-Nov-13 17:06pm View    
Reason for my vote of 1 \n My vote of 1.
Ian A Davidson 2-Nov-13 13:01pm View    
Translation of first paragraph includes "watch the live broadcast of the match..."
Ian A Davidson 27-Oct-13 19:29pm View    
I think not a simple one. You're basically looking at developing some form of artificial intelligence. If I gave you the numbers 2,4 and 6 I'm sure you immediately see that the next number in the sequence is 8. So you might write a function to check for the difference between the numbers, and simply add that on to the last number to find the difference. But then if I gave you the numbers 2, 4 and 8 again your brain would immediately see that the next number is 16, but now you've got to include in your function checking to see if the number is doubling. Okay, so now what if I give you the numbers 1, 4, 9? Basically your function would have to know about every possible type of mathematical sequence and test for them. What about 1,3,6,10? Etc, etc. And these few examples are extremely simply sequences. Unless you are going into A.I. I'd say steer clear.