I had an exam today in C and I was asked a question similar to:     What is wrong with this program:  for( x = .1 ; x != 1.0 ; x += .1)     printf("%f\n", x);    I couldn't solve it and since I had to write something I marked .1 as an error. But, when I went back home, I run this program, It turned out that it doesn't break when x equals to 1.0 and stuck in an infinite loop:  $ cat exam.c #include &lt;stdio.h&gt;  int main(int argc, char **argv) {     float x;      for(x = .1 ; x != 1.0 ; x += .1)         printf("%f\n", x);      return 0; } $ gcc exam.c -o exam $ ./exam 0.100000 0.200000 0.300000 0.400000 0.500000 0.600000 0.700000 0.800000 0.900000 1.000000 &lt;- ? 1.100000 1.200000 1.300000 1.400000 1.500000 ....   Could someone please explain why this is happening.
In follow up to , it appears that some numbers cannot be represented by floating point at all, and instead are approximated.  How are floating point numbers stored?  Is there a common standard for the different sizes?  What kind of gotchas do I need to watch out for if I use floating point?  Are they cross-language compatible (ie, what conversions do I need to deal with to send a floating point number from a python program to a C program over TCP/IP)?
Since  from other SE sites and is not thought to point out a lack of quality or helpfulness, but only to express agreement or disagreement, I'm wondering why downvoted answers here on meta are shown semi-transparent.  Shouldn't they be non-transparent then (like upvoted answers)?  Or am I missing something? Express solutions of equation $ \tan x= x $ in closed form I know that the equation $$ \tan(x) = x $$ can be solved using numerical methods, but I’m looking for a closed form of the solutions. In my opinion, having only numerical solutions means that we don’t know the problem, and sooner or later, we’ll be able to find a closed-form solution or at least a power-series solution. I’m looking for an explicit form of a sequence $ (x_{n})_{n \in \mathbb{Z}} $ in $ \mathbb{R} $ such that  $ 0 &lt; x_{0} &lt; \dfrac{\pi}{2} $, $ \tan(x_{n}) = x_{n} $ for all $ n \in \mathbb{Z} $, and $ (2 n - 1) \dfrac{\pi}{2} &lt; x_{n} &lt; (2 n + 1) \dfrac{\pi}{2} $ for all $ n \in \mathbb{Z} \setminus \{ 0 \} $.  The existence of such a sequence follows from the continuity of $ x \mapsto \tan(x) - x $ over its domain. Its uniqueness follows from the monotonicity of $ \tan(x) - x $ over the intervals $$ \left( (2 n - 1) \frac{\pi}{2},(2 n + 1) \frac{\pi}{2} \right), \quad n \in \mathbb{Z}. $$ Does any skill have a global cooldown? I am new to this game, and will try to optimize my game-play as much as possible. I will do this by making macros for my spells and abilities.  Are there global cooldown on spells and abilities in League of Legends?  Since this is important regarding macros to trigger spell and ability combos.  A Global Cooldown(GCD) is a cooldown which affect most if not all abilities, spells or items when using an ability, spell or item.   In most games it is there to prevent macroing/spamming of multiple instant abilities, spells or items, and usually has a set short duration independent of the ability, spell or items normal Cooldown. Why are the dineutron and diproton unbound? It is known that there are no diproton or dineutron nuclei.  Does this mean that two protons or neutrons are not actually attracted to each other? Even if the attraction was weak, wouldn't it cause bound states anyway?  Related: How can I rename many files at once? What's the difference between \usepackage{ngerman} and \usepackage[ngerman]{babel} Is there something additional that \usepackage[ngerman]{babel} does that a simple \usepackage{ngerman} won't be able to do? How do you easily horizontally center a  using CSS? I'm trying to horizontally center a &lt;div&gt; block element on a page and have it set to a minimum width. What is the simplest way to do this? I want the &lt;div&gt; element to be inline with rest of my page. I'll try to draw an example:  page text page text page text page text page text page text page text page text                -------                | div |                ------- page text page text page text page text page text page text page text page text Uniform Scattering with vector Show function is continuous at origin $$ \begin{cases}xy^2\sin\left(\frac 1 y\right), \text {if $y$ $\neq$ 0} \\ 0, \text{if $y$ = 0} \end{cases}$$  I'm not sure how to work out this limit as $x$ goes to infinity. If it were just the y part, I know that $y^2$ goes to 0 and $\sin$ is a limited function, so it has to go to 0, but I don't know what to do with the $x$ term. I read following in a web site ()     Lenses with maximum apertures of f2.8 allow the camera to use all high   precision sensors. In low light or other situations that are hostile   to autofocus, that’s a big deal. Lenses with a maximum aperture of   f4.0 use only the center focus sensor in its “high precision” mode,   and use the other sensors in their “horizontal line” only mode. Lenses   with a maximum aperture of f5.6 use all sensors in their   “horizontal-only” mode, and lenses with a maximum aperture of f8 use   only the center sensor point, and that with horizontal sensitivity   only.   I want to understand if this is completely true? I am raising this because recently I have purchased a Nikon 70-200 f/4 lens and would like to understand if I have made a wise investment, or, should I collect some more money and buy a 70-200 f/2.8 VR-II lens. How to make nautilus use file-roller in 17.10 like in 17.04? In Ubuntu 17.10 ubuntu upgraded Nautilus (File Browser) to version 3.26.0. New nautilus is not using file-roller anymore, it has  to an integrated compression mechanism.     This makes it complicated to create encrypted archives and/or different types compression archives that file-roller does provide.  How to make nautilus use file-roller as before?  Related question: Can we actually discourage downvotes? Before you disagree with me with a downvote, or just want to be funny, please hear me out. From the :  The upvote privilege comes first because that's what you should focus on: pushing great content to the top. Downvoting should be reserved for extreme cases. It's not meant as a substitute for communication and editing.  I have honestly never seen a downvote reserved for an extreme case. The process is usually 1) downvote post if it's bad and don't comment. (Not much of a process, is it?) As you stay on the site longer and longer, you develop a carelessness towards downvotes (as I have), but for new users, it's really discouraging.  question inspired me to [ask balpha to] make , which is a list of users with 1 rep who have the  badge. That's the closest I could get to new users who deleted their own posts after downvotes came in. Don't get me wrong, I know the argument about being nice to new users very well, but I still believe it to be an issue. And since , users are much more inclined to go the lazy route and downvote bad questions. No alternative measures (see below) are taken, for the most part. Personally, I leave a comment and don't downvote until the asker shows no interest in fixing their post. The only other measure taken to discourage downvotes (on answers) is the -1 rep punishment to the downvoter, which is absolutely meaningless and inconsequential anyways. How are we supposed to educate new users when we don't teach them what to do, don't direct them to the FAQ, and discourage them with downvotes right off the bat?  Instead of voting down: If the post is spammy or offensive — flag it. If the question is duplicate or off-topic — flag it for moderator attention. If something is wrong, please leave a comment or edit the post to correct it.  We claim to discourage downvoting, yet I see answers like  that encourage us to downvote first and ask questions later when a question is simply unclear or effortless. It's just an awful chain reaction. A new user comes to the site asking a question, but that doesn't work out too well, so they get downvotes, delete the question in shame, and don't get the help they deserve as a fellow writer of code and programmer. Strip away the quality of the site for a moment: the core functionality of this site, and the only reason I and a lot of other users are (still) on it, is to receive and give help to/from others. I enjoy making sure fellow programmers get the answer they need, because this site has helped me get mine when I needed them. Quality can still be maintained if content is fixed rather than downvoted more often. So can we stop discouraging new users from continuing to use this site and actually start to discourage downvoting? I think we need to encourage effort towards teaching and helping new users understand the system and why their post is bad rather than slapping them in the face with downvotes that they don't know how to interpret anyways. I'm leaving ways we can do this up to others. My first thought was to increase the punishment for downvoting answers and to no longer make question downvotes free, but those wouldn't be well-received, judging by the history of similar suggestions. . Prove that there exists such a set of $n$ positive integers Prove that for any positive integers $m$ and $n$ , there exists a set of $n$ consecutive positive integers each of which is divisible by a number of the form $d^m$, where $d$ is some positive integer not equal to $1$.  I don't know how to approach this question. Failed to allocate memory: 8 The motivation for this question is in my answer to this post :       (1) If I take $A$, $B$ and $C$ three groups such that $A\times B$ is isomorphic to $A\times C$ then do we have $B$ is isomorphic to $C$ ?   In the post a counter example is given when $A$ is an infinitely generated group. However I cannot get a counter-example when $A$, $B$ and $C$ are assumed to be finite groups. Note that there is no reason a priori if $\phi$ is an isomorphism from $A\times B$ to $A\times C$ that $\phi(A\times\{1_B\})=A\times\{1_C\}$.   In the case of finite groups it is true because of the Krull-Schmidt theorem : .  A slightly more general question is the following :     (2) If $B$ and $C$ are two finitely generated groups, can I always find a finitely generated group $A$ such that $A\times B$ is isomorphic to $A\times C$?   If $A$ is not assumed to verify any property but to be a group we can take :  $$A=B^{\mathbb{N}}\times C^{\mathbb{N}} $$  Furthermore replacing :$ \prod_{\mathbb{N}}$ by $\bigoplus_{\mathbb{N}}$ (or more likely the restricted product for groups but I am not sure of a well known notation, it is the subgroup of the product with all but a finite number components being trivial) will give you the same result for countably infinite groups.   $\underline{\text{Edit}}$ : To be clear about what I am asking. (1) is kown to be true for finite groups whereas (2) is known to be true when we are considering groups without restriction (even just for countably infinite groups). Let us pretend we are working on the smaller class of groups : the finitely generated groups. Is there any counter example to $(1)$? Is there any counter example to $(2)$?   $\underline{\text{Edit 2}}$: Here is a partial answer, from the classification of finitely generated abelian groups $(1)$ is always true if all groups are assumed to be abelian finitely generated groups. Now assume that $A\times B=G=A\times C$. Then you have (derived groups) :  $$D(G)=D(A)\times D(B)=D(A)\times D(C) $$  So the abelianizations verify :  $$A^{ab}\times B^{ab}=A^{ab}\times C^{ab}$$  Because we are now in the realm of finitely generated abelian groups we get :  $$B^{ab}=C^{ab} $$  So $(2)$ cannot be true in general for instance you can take $B:=\mathbb{Z}$ and $C=\mathbb{F}_5$, those two groups have different abelianizations.   The new question can be found here : "Think of" versus "think about" Could someone help me to understand when I should use think of and when think about in sentences?  What is the difference between using one or the other? There's a book I borrowed from my grade 8 teacher's lending shelf (in Ontario, Canada) that I've been trying to identify for years. The main character was a man in a futuristic setting who... I think... had the secret to an improved version of the lifespan-extension serum everyone used. If I remember correctly, the flawed version caused people's skin to turn clear over the course of their extended lives. I think he was revived from some sort of stasis, but I can't be sure of that. I just vaguely remember a &quot;stranger in a strange land&quot; sort of cultural disconnect, him being cared for in some kind of hospital-like setting, and a sense that maybe the formula they want from him was invented by a now-dead family member of his. The most distinctive detail I remember was the love interest, a cloned nurse named &quot;Eliza Tertia&quot; who he encourages to break out of her role. (All the cloned nurses were named Eliza, and I remember &quot;Eliza Duodecima&quot; being the name of another one who is briefly seen.) I also remember the secret eventually being gotten out of him, only for it to be discovered that it's flawed, in that, while it does replenish the compounds that go missing in extended old age, it doesn't moderate their production. I don't remember if it was long enough to be a novel or if it was just a novella. My vague memories of the cover design and material suggest it was a 1970s printing or earlier, which would also fit with what I remember of the story's atmosphere. Does flying to Panama from the US reset the ESTA time counter? How many subgroups of order $n$ does $D_n$ have? How many subgroups of order $n$ does $D_n$ have?  My work:  Since subgroups of $D_n$ are either cyclic or dihedral, the subgroups of order $n$ of $D_n$ are $\left&lt; r \right&gt;$ (cyclic) and $D_{n/2}$ (dihedral). However, this works only for $n$ is even and $n\geq 2$. I don't know how to do when $n$ is odd. Select Input Texture file name as parameter/node