Please explain this:  int main() {        float f = 0.7;     if(f&lt;0.7)         printf("Y");     else         printf("N");     return 0; }   Output: Y  But, for this code  int main() {     float f = 0.8;     if(f&lt;0.8)          printf("Y");     else            printf("N");     return 0; }   Output is N. What causes such difference in the output? Please try to explain in detail. Thanks in advance.
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
How does the coin limit work? Formula for determinant of block matrix with commuting blocks On , I saw the following formula  $$\det\begin{bmatrix}A &amp; B\\ C &amp; D\end{bmatrix} = \det(AD-BC)$$  if $C$ and $D$ commute. Is this always true?   Or is there a good counter example for each $2 \times 2$ block matrices? We login to applications almost every day. The password is stored in our fingers, as an automated process (if they have used it long enough). When users realize they have entered a wrong character (before hitting login-button) they erase the whole password, and retype the entire password – instead of just the last wrong character. Question is why?         &ndash; Wireframes created with Can we modify "Ask question" to automatically suggests tags based on your question content.   So instead that user needs to type "team-foundation-server" or "TFS" or "TeamFoundationServer" he will see list of tags auto-populated with ajax which he (or she) can then select and it will be associated with the question. So basically only thing we need is code which will cross-match question content with list of known tags while user is typing and display results in some nice ajax-enabled list/cloud/whatever UI control. This should be separate control for tags suggestions so user still has option to use standard tag list input to type-in tags.  In this case, instead of three (or more) tag variations we would have only one tag for Team-Foundation-Server. How to Self-Study Mathematical Methods? Edit:  Ok, user  made comment that truly helps narrow the focus of my question. Basically, I'm asking for a self-study course of Mathematical Methods.  Thanks to his recommendation I identified a book that is very close to the answer:  Mathematical Methods in the Physical Sciences by Mary L. Boas  Supposedly, the book covers most of the Math a person needs to learn in order to understand the simulations I presented.  Does this book suit my needs?    Hello,  I have always been interested on the idea to study Math at an Undergraduate level to be able to implement simulations like the followings:  Finite Difference Simulation of the Wave Equation    Heat Equation in Two Dimensions    Besides my precollege experience in Math, I have only been able to do very simple simulations due to my lack of knowledge of Advanced Math. Every time I ask about the inner workings of the simulations I get redirected to papers that look like foreign language to me and, unfortunately, I depend on easy-to-read tutorials to understand them, and while I have found   I'm more interested in reaching the solution myself.  I checked some of the questions related to book recommendations for self-study and while they are very helpful I'm interested in learning by example (There is a book called: "Accelerated C++ Practical Programming by Example" that fits very well my study habits)  Thanks in advance. Could it be that Goldbach conjecture is undecidable? The result closest to Goldbach conjecture is Chen's theorem [Sci. Sinica 16 157–176], the proposition ``1+2''. It is natural to ask if it is likely that under our arithmetic axioms the Goldbach conjecture is an undecidable proposition. Restricting T to string and int? How to prove this limit exists: $a_{n+2}=\sqrt{a_{n+1}}+\sqrt{a_{n}}$ Question: Consider a sequence $\{a_{n}\}$ such that $a_{1},a_{2}&gt;0$, and for all $n \in \mathbb{N}$ we have:  $$a_{n+2}=\sqrt{a_{n+1}}+\sqrt{a_{n}}$$  Prove that :  $\displaystyle\lim_{n\to\infty}a_{n}$ exists and find this limit.  My work: If this limit exists, let $\displaystyle\lim_{n\to\infty}a_{n}=x&gt;0$; then we have $$x=\sqrt{x}+\sqrt{x}\Longrightarrow x=4$$ But I can't see how to prove the limit of $\{a_{n}\}$ exists. Thank you for you help! I am trying to put two subscripts at the left and right of a character. For example, something like:  _{t} p_{x}  where p is in the middle. How do you do this? Who decides which half of the universe should be destroyed? I've been modeling an F-15, but when I rotate the flaps on Y-Axis the Flaps offset from the wing and they look like they are about to fall out, so I end up correcting it by rotating in the X and Z-axis to align them correctly.  However when I rotate them back from the Y-Axis they look distorted again because I did rotations on the X and Z axis. I tried riding it, no help. I saw something about custom orientation to fix it but that was not clearly explained and it was done on an ideal plane that was (0,0,0); mine is pre-rotated on all axis.   I'll take scripts if needed and I'm using Blender 2.8.  When I rotate it on the Y-Axis:    Fixing it using X and Z rotation:    Rotating it back on the Y distorted it again:    Here's the wing with ailerons and flaps: When does $120$ divide $n^5 - n$ Find n such that $n^5 - n$ is divisible by $120$. (*Here $n$ belongs to the natural number set)  Seems a trivial problem, but the answer mentioned in the text book seemed incomplete to me so I'm here just to ensure whether approach to this problem is correct or not.  So my approach is as follows: We know that $n^5 - n$ can be written as $n^5-n = n(n-1)(n+1)(n^2 + 1)$  Now since it's product of three consecutive natural numbers so it's divisible by $3! = 6$. Now using Fermat's Little theorem we can prove that $n^5= n \mod5$ hence $n^5 - n$ is divisible by $5$ as well. So $n^5 - n$ is divisible by $30$. Now to ensure their is another factor of $4$ in the term we need to ensure that $n^5 - n$ is divisible by $8$. I found that all odd natural numbers and multiples of $8$ makes $n^5 - n$ divisible by $8$, hence $n^5 - n$ is divisible by $120$. But in the text book they have only mentioned odd natural numbers as answer, which seemed incomplete to me.  Thanking everyone in advance:P How can mixed content compromise an entire HTTPS session? Google Chrome is probably one of the stricter browsers out there in terms of highlighting SSL errors.  Most browsers will point out when you are viewing an HTTPS page which loads insecure images/Javascript, I understand how this is a security issue - an attacker could have modified the non-SSL content in a way which gives them access to the secure content, injected some javascript for example.  However once you have viewed an HTTPS page with mixed content, Google Chrome will continue showing you the mixed content warning (a red line through the 'https://') for as long as you stay browsing the same domain, even for subsequent pages which only include other HTTPS resources. Only once you navigate to another domain, or open a fresh tab does it tell you you're secure again.  What is the danger it's protecting you from here? How could mixed content on a previous page actually affect the security of subsequent secured pages? I understand that mixed content should be flagged up, but there must be a specific reason that Google is persisting this warning, other than "Well you still need to know about it" How do the radian have a unit? Encode multi-class response variable In a classification problem when the response variable has multi-class, e.g., "sunny","rainy","cloudy", how should we encode it? I know that for predictors like this, usually we do , and if a predictors have too many classes, then we might just use the .   When this multi-class issue occurs in the response variable, I guess we can just use LabelEncode() rather use using One Hot encoding right? Because if we use One Hot encoding, then we will have 2 variables as the response variable, and the machine learning algorithm in sklearn usually expects the response variable not to be a vector right? (I mean it expects a long 1D vector with length equal to the number of observations but not a 2D matrix). But on the other hand, if we just map "sunny", "rainy","cloudy" to {1,2,3} or {0,1,2}, or whatever 3 numbers, that will create a less than or greater than relationship among "sunny", "rainy","cloudy", which is not inherited in the original problem. Related questions in "Ask Question" page is better than the search tool What's the difference between executing a script like this:  ./test.sh  and executing a script like this:  . test.sh?  I tried a simple, two-line script to see if I could find if there was a difference:  #!/bin/bash ls   But both . test.sh and ./test.sh returned the same information. There are many tutorials that use a pull-up or pull-down resistor in conjunction with a switch to avoid a floating ground, e.g.        Many of these projects use a 10K resistor, merely remarking that it is a good value.  Given a a particular circuit, how do I determine the appropriate value for a pull-down resistor?  Can it be calculated, or is it best determined by experimentation? Removing nodes from an XmlDocument I'd like to find a Windows batch counterpart to Bash's $@ that holds a list of all arguments passed into a script.   Or I have to bother with shift?