Why I get incorrect result.(for example n=3.83 I expect temp=0.83 but when trace my code temp=0.83000000000000007) notice:temp,m and n are double.   n = double.Parse(Console.ReadLine());         m = Math.Floor(n);         Console.WriteLine(m);         temp = n - m;
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Remove subscribers from Auto Suppression List Notes:  Answers will occasionally be moved to the  when there are too many of them. When using them to report bugs, keep an eye on the post.    This site, Meta Stack Exchange, is usually used as a &quot;test bed&quot; for pending changes happening to the way text is rendered on all network sites. Changes to text rendering that are going to be rolled out to the network are usually deployed here first to test them out and fix any potential glitches. Currently, there are no such changes pending, but if there were, keep in mind that text posted here may render differently from the other sites until the changes roll out to them as well.    As per Jeff's suggestion in : You can use this question as a formatting sandbox. You can:  edit  itself ( questions such as this one require only 100 reputation to edit instead of 2,000) post answers to this question (This question might be , requiring earning 10 reputation on this site to answer) post comments to this question or its answers test suspected bugs with the editor or the rendering post ponies (only when mods are asleep)   Beware that since the  in December 2010, and  added in March 2011, no syntax highlighting is applied unless the question's tags or an inline hint enable it. So, to test highlighting here in the sandbox:  , you can use GitHub-flavor fenced code blocks in your posts, specifying the language after the opening fence: ```html While not hinted otherwise: &lt;html&gt;&lt;/html&gt; source &lt;b&gt;goes&lt;/b&gt; &quot;here&quot;. ```  ```js var a = 3; while (not (a &gt; 0)) {     alert(&quot;JavaScript code &lt;b&gt;goes&lt;/b&gt; here.&quot;); } ```   Or:  Create code blocks in any way (using the fence notation above, the four-space indent form, or using HTML &lt;pre&gt;&lt;code&gt; tags).  Save your post.  Use your browser's developer tools to edit the resulting HTML. To open developer tools, press F12, or ⌥⌘ I on Mac.  Find the &lt;pre&gt; element and add the attribute class=&quot;prettyprint&quot;, or change it into one of the valid syntax hints linked above, like class=&quot;lang-vb prettyprint&quot;.  Run the following in the location bar: javascript:prettyPrint(); or prettyPrint() in the console.     Answers that are considered annoying or obnoxious, or that cause breakage for users, will be deleted. This is . Does $k+\aleph_0=\mathfrak{c}$ imply $k=\mathfrak{c}$ without the Axiom of Choice? After installing Adobe PDF reader, it opens files with the .PDF file extension. Ones' default web browser opens .html files and notepad opens .txt files, etc.  Where exactly in the registry are these filetype - program associations stored in the registry?   In other words, how does Windows know with which software/program it must open a certain file(type)? Let n be an even integer. How many different ways can I choose subsets of the set {1,2...,n} Let n be an even integer. How many different ways can I choose subsets of the set {1,2...,n} if they all have to have odd size, but the intersection of any two of them has to have even size?  Please help me answer this question or lead me in the right direction. Thank you :) I live in Ethiopia and the government blocks all urls with the word "proxy" in them. I couldn't use that word in the title above because that would make the url contain the word proxy.   When I apt-get upgrade I get errors because some packages like libproxy1, libproxy1-plugin-gsettings, libproxy1-plugin-networkmanager, python-libproxy all contain the p word.  Therefore, it is all blocked. I tried putting the urls into proxy sites, but they all just returned to their home page.   Are there any other solutions? An instructor has an exam of 5 questions and a question bank of 50 questions. Are there $50\choose 5$ or $(50)_5$ possible exams? Where $(50)_5 = 50! / 45! $ and $50\choose 5$ $= 50!/(5!45!)$   I've narrowed it down to these two possibilities (though even these may be wrong), but I think I'm confusing myself as to which one I use. Can anyone suggest a good way of thinking of this problem that will make it apparent whether I need use use the falling factorial or the binary coefficient?   Edit: thank you for all the answers! Indeed, I meant $50!/45$ as the falling factorial. Also, the question doesn't specify whether it was meant to be ordered or unordered, but I think I understand my confusion now! Badge request: "Practically Perfect in Every Way" Is there any way to recover deleted files which may have since been overwritten? Show that $|f(z_1)|=|f(z_2)|≤|z_1|^2=|z_2|^2$. Let $f\in H(B(0,1))$, $f(0)=0$, $f(B(0,1))\subset B(0,1)$. Suppose there are 2 different points $z_1$,$z_2\in B(0,1)$, s.t. $|z_1|=|z_2|$, $f(z_1)=f(z_2)$. Show that $|f(z_1)|=|f(z_2)|≤|z_1|^2=|z_2|^2$.    I have used the Schwarz-Pick Proposition to prove that $|f(z_1)|=|f(z_2)|≤|z_1|=|z_2|$ directly, but that is not enough. Thank you for help! Number Theory: Find all solutions of $\phi(n)=16$ and $\phi(n)=24$ I have this homework problem assigned and I'm a little confused in solving it:  Find all solutions of $\phi(n)=16$ and $\phi(n)=24$ (where $\phi(n)$ is the Euler phi-function).  The hint that's provided says:  If $n=p_1^{k_1}p_2^{k_2}\cdots p_r^{k_r}$ satisfies $\phi(n)=k$, then $n=\frac{k}{\prod (p_i-1)}\prod p_i$. Thus the integers $d_i=p_i-1$ can be determined by the conditions (1) $d_i\mid k$, (2) $d_i+1$ is prime, and (3) $\frac{k}{\prod d_i}$ contains no prime factor not in $\prod p_i$.  I'm ok with proving the statements in the hint and I know how to get them, but I'm not sure how to apply them to solve the problem. Control a property with no socket (color ramp swatch, etc) from a Group Node input? I marinated chicken five days ago in lemon juice, seasoned salt, and garlic powder, is it still safe to cook in the oven? How to efficiently count the number of keys/properties of an object in JavaScript? What's the fastest way to count the number of keys/properties of an object?  It it possible to do this without iterating over the object?  i.e. without doing  var count = 0; for (k in myobj) if (myobj.hasOwnProperty(k)) count++;   (Firefox did provide a magic __count__ property, but this was removed somewhere around version 4.) Why is the sky dark at night? The question is the well-known      If there are so many/infinite stars, in every direction, why is it dark at night? Where goes all the light we don't see?    Discussing with a friend we found different answers.   The first (my friend's answer) is that given the fact that in a finite amount of time (in this case, the age of the universe), light can travel only a certain, finite, distance, we cannot see, if they actually exist, stars farther than such distance (about 13 billions of years, I guess). Then he states (or better, I got him notice he implicitly does this)  that within this radius there aren't enough stars to fill the night sky, and that's why we have darkness without sun's light.   The second answer (mine, or anyway the one I heard from a minutephysics YouTube video) is that despite of the big size of the observable universe, cosmological expansion red shifts most of the light out of the visible radiation range, so that the majority of light can't be seen by our eyes at night, while if we use, for example, an infrared camera, we should see a brighter sky, and lenghtening more and more the wavelength at which we observe the sky, we come to the uniform background radiation.  So my question is, what is the right answer? Is it one of the above-mentioned or even a third one?  EDIT: I've seen both answer may be acceptable, but what is the main contributing phenomenon? In the book "Jurassic Park" does the Lysine Contingency actually get explained? I was watching the movie recently and noticed that one of the characters (very) briefly mentions a safety they built into the system should any of the dinosaurs escape. They called it the Lysine Contingency saying that all the dinos have been genetically modified to depend heavily on lysine in their diet, so if any of them escape they wouldn't be able to survive without the food supplements that the park gives them.   Why doesn't the story end right there? Does the Michael Crichton book actually explain this in depth? Found an error in my thesis I've found a error in my thesis recently, after its submission. I made a mistake that wrongly accepted the hypothesis which should be rejected. What should I do?? I'd like to call a function in python using a dictionary.  Here is some code:  d = dict(param='test')  def f(param):     print(param)  f(d)   This prints {'param': 'test'} but I'd like it to just print test.  I'd like it to work similarly for more parameters:  d = dict(p1=1, p2=2) def f2(p1, p2):     print(p1, p2) f2(d)   Is this possible? postfix - how to prevent users from sending with another users name Even though my postfix server cannot be used without authentification (open relay), sending mail in another users name after logging in is still possible like this:  EHLO domain.org auth plain eW91IGxpdHRsZSBkaXJ0eSBiYXN0YXJkIDstKQ== 235 2.7.0 Authentication successful mail from: otheruser@domain.org 250 2.1.0 Ok rcpt to: recipient@otherdomain.org 250 2.1.5 Ok data 354 End data with &lt;CR&gt;&lt;LF&gt;.&lt;CR&gt;&lt;LF&gt; Please send me your account info. . 250 2.0.0 Ok: queued as D40692A61AA quit   How can this be prevented? Sufficient Identification for Intra Schengen flights If one takes a direct flight from one Schengen member state to another, what's the minimum sufficient ID that needs to be provided to board the flight?