B Brett Jun 30, 2005 #1 Why would you not want to use checked on any type of mathematical operation? Or use unchecked for that matter? Thanks, Brett
Why would you not want to use checked on any type of mathematical operation? Or use unchecked for that matter? Thanks, Brett
M Michael A. Covington Jun 30, 2005 #2 Brett said: Why would you not want to use checked on any type of mathematical operation? Click to expand... There are some algorithms that actually use the overflow (rely on it to happen). I think I've seen this done in an integer random number generator.
Brett said: Why would you not want to use checked on any type of mathematical operation? Click to expand... There are some algorithms that actually use the overflow (rely on it to happen). I think I've seen this done in an integer random number generator.
J Jon Skeet [C# MVP] Jun 30, 2005 #3 Michael A. Covington said: There are some algorithms that actually use the overflow (rely on it to happen). I think I've seen this done in an integer random number generator. Click to expand... In addition to which, I believe unchecked operation can be significantly faster - it could make a huge difference in an app which is heavy on calculations.
Michael A. Covington said: There are some algorithms that actually use the overflow (rely on it to happen). I think I've seen this done in an integer random number generator. Click to expand... In addition to which, I believe unchecked operation can be significantly faster - it could make a huge difference in an app which is heavy on calculations.
R rossum Jun 30, 2005 #4 Why would you not want to use checked on any type of mathematical operation? Or use unchecked for that matter? Thanks, Brett Click to expand... Unchecked effectively does a modulus operation for free. This is useful in some mathematical applications. rossum The ultimate truth is that there is no ultimate truth
Why would you not want to use checked on any type of mathematical operation? Or use unchecked for that matter? Thanks, Brett Click to expand... Unchecked effectively does a modulus operation for free. This is useful in some mathematical applications. rossum The ultimate truth is that there is no ultimate truth