473,386 Members | 1,720 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,386 software developers and data experts.

erratic NaN's in a C# program

I am getting a NaN value evaluating this seemingly innocious statement
costWithDelete = RowVectorTwo[i - 1] + m_DeleteCost;
the left hand side has normal values and the array is not out of bounds.
The stangest thing is that it happens completely randomly.

I would appreciate any help in locating the bug that causes it.

David
Sep 15 '06 #1
0 1036

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Lionel B | last post by:
Running VC++ 6 under Win2K on i386. I would like to assign a (compile-time) constant that resolves to a quiet NaN (of type double) I can assign a quiet NaN to a *variable* (of type const...
7
by: mandydhaliwal | last post by:
Hi all, I want to put a NaN value in a double/float variable. I am trying following code double x = 12.7; x/= 0;//Threotically x is a NaN now Now when I Try _isnan(x) it returns that it is...
3
by: Joakim Hove | last post by:
Hello, am developing a floating point intensive program with gcc. At some point in the calculations i get 'nan' ascribed to a variable, this is *wrong* (i.e. a bug in my code), however the...
6
by: Jesper, DK. | last post by:
A little preamble A year ago I had a very odd bug in my program, in an if clause it picked and executed the else statement even though the if clause should evaluate to true. Normally you know that...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
0
by: Dennis | last post by:
I thought some might be interested in an erratic error that I finally found in my program: I had a class that opened a filestream for a file which I inadvertently forgot to close after it was...
22
by: Andy McDonagh | last post by:
Dear python experts, I am new to python and this site, so I apologize if this is off topic (i.e. is it a SciPy question?). I will try to demonstrate my problem below:...
61
by: norb1 | last post by:
After tracking down a bug in my Fortran program, I found that it assumed max(NaN,0.) = 0. This makes no sense, as the outcome of the operation is undefined and should be NaN. max(NaN,0.) = NaN...
4
by: MichiganMan | last post by:
This was from a previous post, but I wanted to clean it up a bit and repost with a final question. This is just a simple program that will calculate a weekly salary by what is entered into the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.