473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Why would you not use "checked"?

Why would you not want to use checked on any type of mathematical operation?

Or use unchecked for that matter?

Thanks,
Brett
Nov 17 '05 #1
4 1198

"Brett" <no@spam.com> wrote in message
news:uB**************@TK2MSFTNGP10.phx.gbl...
Why would you not want to use checked on any type of mathematical
operation?


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.
Nov 17 '05 #2
Michael A. Covington <lo**@ai.uga.edu.for.address> wrote:
Why would you not want to use checked on any type of mathematical
operation?


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.


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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #3
Michael A. Covington <lo**@ai.uga.edu.for.address> wrote:
Why would you not want to use checked on any type of mathematical
operation?


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.


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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #4
On Wed, 29 Jun 2005 21:12:59 -0400, "Brett" <no@spam.com> wrote:
Why would you not want to use checked on any type of mathematical operation?

Or use unchecked for that matter?

Thanks,
Brett


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
Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John E | last post by:
How do I get whether a checkbox is ticked in a form on a form's submission (true or false)? How do I use the Request object in ASP?
0
by: bredal Jensen | last post by:
Dear gurus, I have a "farm " of radio buttons server control in a table. I need to detect when the user has selected any of them( before any postback). i'm not quit sure how to do this. Is...
4
by: Jim Bancroft | last post by:
Hi everyone, I'm using a DataGrid with TemplateColumns. My DataGrid is located in a cell of an asp:Table. I did this so it's positioned correctly onscreen. One of the DataGrid's...
0
by: SGibson | last post by:
How would I display a partially checked node? What I mean by this is, rather than a completely checked or unchecked node, a node that displays a grey check mark when some of its children are...
0
by: Jon | last post by:
If anyone can help...Whenevr I go into a form and use the ctrl+F to find something with the binoculars the "Search field as formatted" is checked as default. This seems to slow down the find...
12
by: ssh | last post by:
function testfn(name) var tbody = document.getElementById('hellospace').getElementsByTagName('tbody'); var row = document.createElement('TR'); var cell1 = document.createElement('TD');...
6
by: painkiller | last post by:
language: vb.net environment: windows forms .net : v1.1 i am having a checkedlistbox control that display document category such as text, image, video, audio etc. these values are coming from...
1
by: jamesicus | last post by:
.......... just for curiosity? "real" XHTML served as content (MIME) type application/xhtml+xml will display in MSIE 6.0 release 2900 and 7.0 but they will not render xml content. However, MSIE...
1
by: AliRezaGoogle | last post by:
Dear Members Hi, I have a question: Why doesn't "checked" work for sub calls? For example consider the following snippet of code: checked { Overflower(); }
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.