For Extremely Large Values of .01

by Jesse 6. November 2008 08:22

Working with some code, try it yourself, let me know if you get the same result...

Under an event (any event), add the following...

BuildData(0.01, 0.25, 0.01);

Add the following method...

private void BuildData(double start, double end, double step)
{
double current = start;
while (current <= end)
     {
          //I actually have other stuff going on here, but no calcs (one current.ToString() conversion)
          current = current + step;
     }
}

basic hu?  Watch "current" when it transistions from "0.05" to "0.06" -- you don't get 0.06, check this out

 Next step ...

The hell?

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

.Net | Coding | Weird

Comments

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Like the description says, at my core, I'm a scientist and engineer.  I came from humble beginnings on a 486DX2 Packard Hell playing doom2 on IPX to in a small time retail shop and got into hardware (ISO layers FTW!) and it was all downhill from there.  I'm infinitely curious about almost everything and always wanting to know.

Some of the stuff I'm currently into/researching...

Sitefinity

Ninject

Subsonic

Java

Currently working on ...
i did the hundred 
and some extra stuff

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's, their brother nor their dog's view in anyway.  At all.  Ever.

© Copyright 2007-2008