When I type 4.1-0.1 into the javascript console in my browser (Chrome), or anywhere else in my code, it always returns the number 3.9999999999999996. I have also tried this in Firefox, and got the same result. I don't know if this is only my computer, or if this applies to all javascript, or if it's something simple I am overlooking. Also, sorry if this is a duplicate. I couldn't find any other situations like this, but I might not have been looking for the right thing.
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Array List count to users Finding a tricky limit Prove by induction that... $1+3+5+7+...+(2n+1)=(n+1)^2$ for every $n \in \mathbb N$ Computing the inverse of a permutation I didn't understand the permutation and of course, I got this question wrong.     Compute the inverse of the following permutation:   $$ \begin{pmatrix}  1&amp;2&amp;3&amp;4&amp;5&amp;6\\ 2&amp;5&amp;4&amp;1&amp;6&amp;3 \end{pmatrix} $$   Could you please help me with this question and provide an explanation?  Furthermore, is it possible to compute the direct permutation, not the inverse one? If yes, how?  Thank you in advance! How can I change the local origin of an object, without changing the object location in the world space.  This is the object located at position (0,0,0) in the world space    This is the same object located at position (0,1,0) in the world space, but with its local origin offset so that the object is in the same place    Is there a way to do this in a single step? How can I start Hoard of the Dragon Queen with 4th level characters? I'm pretty new to DM'ing and was just wondering if there would be a way to start the hoard of the dragon queen adventure with a group of 4th level characters?  There don't really seem to be any modules for that level range yet.  We just finished a short module that took our party to level 4, but id really like to play through this adventure because it seems awesome. Also I couldn't really find any other ones that start around that level so rather than re-roll characters we'll just start a little of the way in. computing the orbits for a group action What is the correspondence between the conserved canonical energy-momentum tensor, which is $$ T^{\mu\nu}_{can} := \sum_{i=1}^N\frac{\delta\mathcal{L}_{Matter}}{\delta(\partial_\mu f_i)}\partial^\nu f_i - \eta^{\mu\nu}\mathcal{L}$$ (the four conserved Noether currents corresponding to four possible spacetime translations)  where $\{f_i\}_{i=1}^N$ are the $N$ matter fields in the theory, and we assume $f_i\mapsto\alpha^\nu\partial_\nu f_i$ for translations,  and stress-energy tensor from the Einstein-Hilbert action, which is: $$ T_{\mu\nu}\equiv-\frac{2}{\sqrt{-g}}\frac{\delta\mathcal{L}_{Matter}}{\delta g^{\mu\nu}} $$   In particular, how do you get that the two are equal (are they?) for Minkowski space, for which there is no variation in the metric? Evaluation of $\sum_{k=0}^n{n\choose k}^2u^k$ I am trying to evaluate the finite sum \begin{equation} f(u)=\sum_{k=0}^n{n\choose k}^2u^k,\quad 0&lt;u\le1 \end{equation}  In an first attempt, I think of the generating function \begin{equation} (1+x)^n(u+x)^n = \sum_{k\ge0}{n\choose k}x^k\sum_{k\ge0}{n\choose k}u^kx^{n-k}=\cdots+x^n\sum_{k\ge0}{n\choose k}^2u^k+\cdots \end{equation}  which means that $f(u)$ is the coefficients of the term $x^n$.  Expanding $(1+x)^n(u+x)^n$ into $[1+(1+u)x+x^2]^n$, and using the multinomial expansion, I get an expression for the coefficient of $x^n$. However, such an expression is more complicated than $f(u)$. It seems I am making the problem even more difficult.  Can someone help me find the value of $f(u)$.  Thank you. Why does English spelling use silent letters? Can multiple render systems be used? Matching a space in regex I need to match a space character in a PHP regular expression. Anyone got any ideas?  I mean like "gavin schulz", the space in between the two words. I am using a regular expression to make sure that I only allow letters, number and a space. But I'm not sure how to find the space. This is what I have right now:  $newtag = preg_replace("/[^a-zA-Z0-9s|]/", "", $tag); Is there Markdown to create tables? It seems like a lot of people try to display tables in Stack&nbsp;Overflow questions, but don't do a very good job. Is there Markdown syntax that supports creating a proper table? Are there any cheap, fast lenses capable of highschool sports photography? I recently took on my first paying client, and she is also into photgraphy. She usually does sports for her highschool yearbook. They just have an entry level Canon DSLR with a kit zoom on it that goes up to 200mm, but it's not very fast (f/4 or 5.6 or so). She told me that she has a tough time - especially at basketball games - getting shots with any kind of reasonable lighting, and has to do a lot of work in post just to get them reasonable.   mentions the Cannon EF 300mm f/2.8L IS USM II for professional sports photographers. At $6k USD I suspect the yearbook won't be springing for that lens anytime soon.  So I was curious, are there any reasonable quality, fast lenses for Canon cameras that are lower priced (certainly no more than say, $1k)? I'd love to be able to point them to a couple of options. I assume the largest print they'd be making would be a full spread in the yearbook - maybe two 17"x11" (two 8.5" side by side) Why do clocks measure arc-length? Apologies in advance for the long question.  My understanding is that in GR, massive observers move along timelike curves $x^\mu(\lambda)$, and if an observer moves from point $x^\mu(\lambda_a)$ to $x^\mu(\lambda_b)$, then his clock will measure that an amount of time $t_{ba}$ given by the curve's arc length; $$   t_{ba} = \int_{\lambda_a}^{\lambda_b}d\lambda \sqrt{-g_{\mu\nu}(x(\lambda))\dot x^\mu(\lambda)\dot x^\nu(\lambda)} $$ will have elapsed where $g_{\mu\nu}$ is a metric on spacetime with signature $(-,+,+,+)$.    Why is this so?     Here is how I would attempt to justify this fact in special relativity with $g_{\mu\nu} = \eta_{\mu\nu}$.  Consider an inertial observer $O$ in $\mathbb R^{3,1}$, and suppose that this observer sees a clock, which I'll call observer $O'$ moving around on a curve $x^\mu(\lambda)$.  If $O'$ were also an inertial observer, then given any event with coordinates $x^\mu$ as measured by $O$, observer $O'$ would measure the coordinates of the event to be $x'^\mu = \Lambda^\mu_{\phantom\mu\nu} x^\nu + x_0^\mu$ for some Lorentz transformation $\Lambda$.  If $O'$ is not inertial, then this is no longer true, and there is some more complicated family of transformations, say $T_\lambda$ between events as seen by both observers.  I would argue, however, that if we were to partition the interval $[\lambda_a, \lambda_b]$ into a large number $N$ of intervals $I_1=[\lambda_a, \lambda_i], \dots, I_N=[\lambda_{N-1}, \lambda_b]$ with $\lambda_n = \lambda_a+n\epsilon_N$ and $\epsilon_N=(\lambda_b-\lambda_a)/N$, then on each interval $I_n$, $O'$ is approximately an inertial observer in the sense that $$   T_{\lambda_n} = P_n + \mathcal O(\epsilon_N), \qquad (\star) $$ for some Poincare transformation $P_n$.  Then we would note that since $O'$ is stationary in his own reference frame, he measures his worldline to have the property $\dot x'^\mu(\lambda) = (\dot t(\lambda), \mathbf 0)$ so that $$   I_{ba}=\int_{\lambda_a}^{\lambda_b}d\lambda \,\sqrt{-\eta_{\mu\nu}\dot x'^\mu\dot x'^\mu} = \int_{\lambda_a}^{\lambda_b} d\lambda \, \sqrt{\dot t^2} = t(\lambda_b) - t(\lambda_a) = t_{ba} $$ On the other hand the integral on the left can be written as a Riemann sum using the partition above, and we can invoke ($\star$) above to get \begin{align}   I_{ba}  &amp;= \lim_{N\to\infty}\left[\sum_{n=1}^N \epsilon_N\sqrt{-\eta_{\mu\nu}\dot x'^\mu(\lambda_n)\dot x'^\nu(\lambda_n)}\right] \notag\\ &amp;= \lim_{N\to\infty}\left[\sum_{n=1}^N \epsilon_N\sqrt{-\eta_{\mu\nu}\dot x^\mu(\lambda_n)\dot x^\nu(\lambda_n)} + \mathcal{O}(\epsilon_N^2)\right] \notag\\ &amp;= \int_{\lambda_a}^{\lambda_b}d\lambda \,\sqrt{-\eta_{\mu\nu}\dot x^\mu\dot x^\mu} \end{align} Combining these two computations gives the desired result.  How do others feel about this argument?  I'm not completely comfortable with it because of the assumption $(\star)$ I made on $T_\lambda$.  I imagine that in GR a similar argument could be made by invoking local flatness of the metric. Over the past few weeks, there have been a number of complaints about users making suggested edits en masse whose quality was at least questionable.  Let an example of a low-quality edit be the addition of the web-frameworks tag to dozens of questions about the PHP web framework Laravel. No one is ever going to use it in a search, but Laravel is a framework, right?  (If you disagree about this being a low-quality edit, please  bear with me anyway - my point here is that the system through which such conflicts could be settled is broken.)   Examples          This is a toxic situation guaranteed to create strife because -   The new user is happy to have found a way to participate and earn some rep; they may be genuinely feeling that they are improving the site. The reviewers greenlighting most of their suggestions confirms them in their belief.   The reviewers usually see only one edit - and it's easy to see how they might go, "meh, this isn't a terribly useful edit, but hey, maybe it helps someone, and it's a new user. No point discouraging them."   The veteran users who check out the editor see dozens of what they perceive as low-quality edits, usually ignoring anything else that should be fixed in the post. To the veterans, the new user is systematically looking for excuses to make their pointless edits, creating a giant mess in order to  gain some rep - a mess they have to clean up, while there are no consequences for the editor, who gets to keep their ill-gotten points. While a bad question or answer can be downvoted - usually leading to a change of behaviour eventually - the edit system looks like it's wide open for gaming.   So tensions are high, and when there's dialog it can be angry. I'm not saying either side is completely right. I'm completely prepared to believe that many of these edits are in good faith, etc. But it's a mess because it's frustrating people. As said, there are no consequences for bad-faith mass editing; apart from commenting on some random post, there is no way to communicate with an editor. The outcome of a moderator flag is very much uncertain.  The absence of a clear set of rules means there's plenty of room for heated arguments.    Something needs to change here.  Either   We need super clear rules on what makes a good tag edit Tag-only edits should be allowed only for 2k+ users, or they should not gain 2 reputation points for &lt;2k users The possible 1000 rep gain for suggested edits needs to be rate-limited (say, 200 per month) (this is my favourite!) The possible 1000 rep gain for suggested edits needs to be lowered, say to 500 or 250 Rollbacks of suggested edits should result in annulment of the 2 points gained (this is terrible) There should be a system to vote on edits (yes, that's been suggested before) There should be a defined and officially sanctioned pathway, and ruleset, for moderator flags cast about these users    ... or something else. But something needs to give. Frequent Write to Non-volatile Memory Not able to calculate sum of multiple column where file data in different format .csv I have a scenario where i want to calculate sum of column   SAL|CAL|TAG|VAL 12.11"|"1.1"|"2.1"|"1.1 13.11"|"1.1"|"2.2"|"2.2 14.11"|"1.1"|"2.4"|"2.4   My below code not giving output giving output as 0.00  I need output for this column CAL VAL  awk -F'|' '{T+=$2} END { printf "%.2f\n", T }' demo.txt   output :  6.7 5.7 Community♦ user edit: How does it know what to edit? Every planar graph has a vertex of degree at most 5. I am trying to prove the following statement, any help!?     Prove that every planar graph has a vertex of degree at most 5.