accuracy

What units of measure would you store engineering data in?

In our app, we currently live with the legacy of a decision to store all engineering data in our database in SI. I worry that we may run the risk of not having sufficient precision and accuracy in our database or in .NET numeric types. I am also worried that we may see artifacts of floating-point maths (although that is probably a quest...

System.currentTimeMillis vs System.nanoTime

Accuracy Vs. Precision What I would like to know is whether I should use System.currentTimeMillis() or System.nanoTime() when updating my object's positions in my game? Their change in movement is directly proportional to the elapsed time since the last call and I want to be as precise as possible. I've read that there are some seriou...

Which is more accurate, x**.5 or math.sqrt(x)?

I recently discovered that x**.5 and math.sqrt(x) do not always produce the same result in Python: Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on win32 >>> 8885558**.5 - math.sqrt(8885558) -4.5474735088646412e-13 Checking all integers below 10**7 produced an error rate of almost exactly 0.1%, with the s...

How reliable are .net timers?

I'm looking at using a System.Timers.Timer in a windows service. I would like to know how reliable and accurate they are. In particular: Are there any guarantees about how often they will run? What happens when the processor or memory are overloaded? Will the ElapsedEventArgs.SignalTime always be accurate under such circumstances? ...

Accuracy of ZHEEV and ZHEEVD

I am using LAPACK to diagonalize complex Hermitian matrices. I can choose between ZHEEV and ZHEEVD. Which one of these routines is more accurate for matrices of the size 40 and a range of eigenvalues from 1E-2 to 1E1? ...

How accurate is python's time.sleep()?

I can give it floating point numbers, such as time.sleep(0.5) but how accurate is it? If i give it time.sleep(0.05) will it really sleep about 50 ms? ...

Now() Accuracy in VBScript

Now() in VBScript appears to return time in 10,000,000th of a second precision when called as CDbl(Now()). In attempting to use this to write a more accurate implementation of now which returns CIM_DATETIME format I found that in VBScript, despite being particularly precise, is not very accurate with the time only updating once per secon...

How accurate is Thread.Sleep(TimeSpan)?

I've come across a unit test that is failing intermittently because the time elapsed isn't what I expect it to be. An example of what this test looks like is: Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); TimeSpan oneSecond = new TimeSpan(0, 0, 1); for(int i=0; i<3; i++) { Thread.Sleep(oneSecond); } stopwatch.Stop();...

Software estimation speed and accuracy

Let's say you have a project that will involve two web applications (that will share DAL/DAO/BO assemblies and some OSS libraries): a semi complex management application that uses Windows Live ID for authentication and is also capable of communicating with various notifier services (email, sms, twitter etc.), targeted notifiers being a...

How accurate is Android GPS?

I thought I have read somewhere that the accuracy of Android's GPS is about 10cm? Can anyone verify or correct this? Reason being is that my application I am trying to develop keeps track of locations an user has visited and it would help me out tremendously to know the margin of error I can expect? ...

iPhone and floating point math

Hi, I have following code: float totalSpent; int intBudget; float moneyLeft; totalSpent += Amount; moneyLeft = intBudget - totalSpent; And this is how it looks in debugger: http://www.braginski.com/math.tiff Why would moneyLeft calculated by the code above is .02 different compared to the expression calculated by the ...

How deal with the fact that most decimal fractions cannot be accurately represented in binary?

So, we know that fractions such as 0.1, cannot be accurately represented in binary base, which cause precise problems (such as mentioned here: http://stackoverflow.com/questions/1421520/formatting-doubles-for-output-in-c). And we know we have the decimal type for a decimal representation of numbers... but the problem is, a lot of Math m...

How to change the default parameters for newfit() in MATLAB?

I am using net = newfit(in,out,lag(j),{'tansig','tansig'}); to generate a new neural network. The default value of the number of validation checks is 6. I am training a lot of networks and this is taking a lot of time. I guess it doesn't matter if my results are a bit less accurate if they can be made considerably faster. How can ...

How to get meters in pixel in mapkit?

Hey guys, I wanted to test the mapKit and wanted to make my own overlay to display the accuracy of my position. If i have a zoom factor of for example .005 which radius does my circle around me has to have(If my accuracy is for example 500m)? Would be great to get some help :) Thanks a lot. ...

Best way to calculate accuracy and display meaningful results

My current method allows me to determine the most accurate array but I cannot figure out a good way to display informative results. Here’s my situation … I compare X amount of integer arrays to a static integer array. For each position in the array I calculate the position’s accuracy result by comparing to the equivalent position in th...

What's the best way to evaluate the accuracy of GPS sensor data for a user's location?

hi all, i want to use the best Coordinate. but one thing is confusing me here i want to check that if new location accuracy is better then use new location otherwise use old location if (newLocation.horizontalAccuracy>oldLocation.horizontalAccuracy) { self.bestEffortAtLocation=newLocation; // this mean new location is better accura...

iPhone Development - Location Accuracy

I'm using following conditions in-order to make sure that the location i get has adequate accuracy, In my case kCLLocationAccuracyBest. But the problem is that i still get inaccurate location. // Filter out nil locations if(!newLocation) return; // Make sure that the location returned has the desired accuracy if(newLocation.horizon...

SQL Server DATEDIFF accuracy

I have to store some intervals in mssql db. I'm aware that the datetime's accuracy is approx. 3.3ms (can only end 0, 3 and 7). But when I calculate intervals between datetimes I see that the result can only end with 0, 3 and 6. So the more intervals I sum up the more precision I loose. Is it possible to get an accurate DATEDIFF in millis...

Calculate SOM sensitivity accuracy specificity MATLAB

Hello, I just implemented a SOM algorithm in MATLAB that outputs component planes and U matrix....but i want to be able to calculate sensitivity, accuracy and specificity....how do i go about doing this in MATLAB??....any ideas or useful links would be highly appreciated?? ...

Is android's motion event handling accurate??

Bug I have a weird bug in my piano app. Sometimes keys (and thus notes) hang. I did a lot of debugging and narrowed it down to what looks like androids inaccuracy of motion event handling: DEBUG/(2091): ACTION_DOWN A4 DEBUG/(2091): KeyDown: A4 DEBUG/(2091): ACTION_MOVE A4 => A4 DEBUG/(2091): ACTION_MOVE ignoring DEBUG/(2091): ACTI...