Why is this sum of floats rounding?
Is floating point math broken?
I just updated my iMac to Mojave, and am still trying to setup my preferences.  I tried dark mode, but did not like it (half of me apps seem to ignore it anyway).  I switched to light mode, but this too has problems. The File Save dialog shows a list of Directories and existing files, but the latter are very light grey, almost indistinguishable from the background.    I have searched the Preferences menu, but can't seem to find any setting to set normal contrast levels like in High Sierra. How to say that you have plans to go to the movies tonight (but you are not sure yet, maybe you will have a pizza)? I mean there are options:     I am going to the cinema tonight.   Way too much certainty in this. For me it means that you have already bought tickets, the least.     I am going to go to the cinema tonight.   Sounds a bit awkward.     I will go to the cinema tonight.   Sounds too formal to me. Symbols instead of numbers as footnote markers Let $p\in[1,\infty]$, $a\in\ell^\infty$ and $$T:\ell^p\to\ell^p\;,\;\;\;x\mapsto ax.$$ Note that $\left\|T\right\|=\left\|a\right\|_{\ell^\infty}$. It's easy to see that if $a\in\ell^1$, then $T$ is nuclear and hence compact.  Can we more generally conclude that $T$ is compact?  Assume $p&lt;\infty$. The intuitive approach would be to define $$T_n:\ell^p\to\ell^p\;,\;\;\;x\mapsto(a_1x_1,\ldots,a_nx_n,0,\ldots)$$ for $n\in\mathbb N$ and to show that $\left\|T_n-T\right\|\to0$. Now, $$\left\|(T_n-T)x\right\|^p=\sum_{i=n+1}^\infty|a_ix_i|^p\tag1$$ for all $x\in\ell^p$ and $n\in\mathbb N$. The right-hand side of $(1)$ clearly converges to $0$ as $n\to\infty$, but this only yields convergence in the strong operator topology. On the other hand, if $(a_n)_{n\in\mathbb N}$ would be nonincreasing and $a_n\to0$ (e.g. $a_n=\frac1n$), then $$\left\|(T_n-T)x\right\|^p\le|a_{n+1}|^p\left\|x\right\|_{\ell^p}^p\tag2$$ for all $x\in\ell^p$ and $n\in\mathbb N$ and we could immediately conclude $\left\|T_n-T\right\|\to0$. EDIT: Maybe the general result can be obtained from the convergence in strong operator topology (which holds by $(1)$) by noting that $\ell^p$ has the approximation property; but I'm not sure whether this is true. I am doing some forecasting in R using Rob Hyndman's forecast package. The paper belonging to the package can be found .  In the paper, after explaining the automatic forecasting algorithms, the authors implement the algorithms on the same data set. However, after estimating both an exponential smoothing and ARIMA model they make a statement I do no understand (on page 17):     Note that the information criteria are not comparable.    I thought that an advantage of using AIC for model selection is that we can compare AIC values from different models, as long as they are estimated using the same data set. Is this incorrect?  This matter is of particular interest to me, as I was planning on combining forecasts from different model classes (e.g. exponential smoothing and ARIMA) using so called Akaike weights (see Burnham and Anderson, 2002, for discussion on Akaike weights)  References   Burnham, K. P., &amp; Anderson, D. R. (2002). Model selection and multi-model inference: a practical information-theoretic approach. Springer Verlag. Why can't I paste § into a Minecraft command? Can anyone tell me the name of these sentences? Deep learning model (LSTM) with temporal and non temporal attributes Categories other than "off-topic" should allow custom close reasons Custom close reasons are a great boon to Stack Exchange sites, allowing the community to provide more tailored advice to site-specific situations. Their big problem (aside from being limited to three by default) is that they are all lumped under "off-topic". This is often confusing.  I suggest that all close categories but "exact duplicate" should support customized close reasons &mdash; not just the "off-topic" category.  For example, the recommendation close reason     Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam.   This would make more sense as a child of primarily opinion-based.    Similarly, the "why doesn't this work" close reason     Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: .   This would make more sense as a child of unclear what you're asking.  Similar examples can be given for pretty much any of the Stack Exchange sites. What determines the direction of precession of a gyroscope? I understand how torque mathematically causes a change to the direction of angular momentum, thus precessing the .  However, the direction, either clockwise or counterclockwise, of this precession seems to me a bit arbitrary beyond mathematical definitions. (What if torque were defined by a "left hand rule", for example?).  What's the fundamental physical reason that the precession of a gyroscope would be directed in a certain direction? How prove this $\prod_{1\le i<j\le n}\frac{a_{j}-a_{i}}{j-i}$ is integer let $a_{i},i=1,2,\cdots,n$ be postive integer ,show that $$1^{n-1}2^{n-2}\cdots (n-2)^2(n-1)|\prod_{1\le i&lt;j\le n}(a_{i}-a_{j})$$  I know this $\prod_{1\le i&lt;j\le n}(a_{i}-a_{j})$ is  Vandermonde  determinants,and I found $$1^{n-1}2^{n-2}\cdots (n-2)^2\cdot (n-1)=1!2!3!\cdots (n-1)!=\prod_{1\le i&lt;j\le n}(j-i)$$ we only prove $$\prod_{1\le i&lt;j\le n}\dfrac{a_{j}-a_{i}}{j-i}$$ is integer  maybe consider Vandermonde determinants ? But I can't prove this Concurrent and Blocking Queue in Java Can virtual particles be thought of as off-shell Fourier components of a field? I just found  blog post, which gives an interpretation of virtual particles I haven't seen before.  Consider a 1D system of springs and masses, where the springs are slightly nonlinear. A "real particle" is a regular $\cos(kx-\omega t)$ wavepacket moving through the line, where $\omega$ satisfies the dispersion relation $\omega = \omega(k)$. When two real particles collide, the region where they collide temporarily looks really weird, as they interact nonlinearly, pulling and pushing on each other.  Formally, we can write this weird region as the sum of a bunch of $\cos(kx-\omega t)$ waves, but there's no guarantee they'll have the right dispersion relation. Thus, each term in the resulting expansion is a off-shell "virtual particle". If you add up all the virtual particles, you get the actual intermediate field state, which is just a weird ripple in the field where the two particles are interacting.  As another example, consider the statement "a static EM field is made of virtual particles". Under this interpretation, what that really means is, "a static field (e.g. $1/r^2$) is not equal to $\cos(kx-\omega t)$, but may be expanded in terms of such sinusoids", which is much less mysterious sounding. In fact, this is exactly what we do when we consider scattering off a potential in normal QM, e.g. in the Born approximation.  The above gives some intuition for what a 'virtual particle' means in classical field theory. They are the Fourier components of the field with $(\omega, k)$ not satisfying the dispersion relation, and they are useful in classical perturbation theory. However, they are not propagating degrees of freedom, so they only appear during interactions.   The picture above is entirely classical. Does this picture generalize to quantum field theory, giving a physical intuition for virtual particles there? R's lmer cheat sheet There's a lot of discussion going on on this forum about the proper way to specify various hierarchical models using lmer.  I thought it would be great to have all the information in one place. A couple of questions to start:   How to specify multiple levels, where one group is nested within the other: is it (1|group1:group2) or (1+group1|group2)? What's the difference between (~1 + ....) and (1 | ...) and (0 | ...) etc.? How to specify group-level interactions? Cannot find Underground Jungle Temple On my 1.2 Terraria Map I have been mining from left to right in my large underground jungle using my rocket launcher. Despite this, I have had no luck on finding the Underground Jungle Lihzahrd Temple. I have been searching the layer above where lava constantly spawns. Have I simply spawned in a world without one or am I searching in the wrong place? I have also considered using the clentimator with Dark Blue ammo to provide light, should I do that? IList vs IEnumerable for Collections on Entities When I have entities in my domain with lists of things, should they be exposed as ILists or IEnumerables? E.g. Order has a bunch of OrderLines. Can someone use DC generator along with electric motor to make electricity along with mechanical energy? I know this might sound stupid and maybe stupid totally, but I need some clarification....  I came through electric motor principle.  and then I came across the following link on DC generators    Now my question is, can't we combine them both to provide DC current with little DC used in motor side? By "combine," I mean using a DC generator coil only at the other side of the coil of the motor in the motor itself. The condition is that the 2 coils are connected via some apparatus that causes the 2nd coil to move along with the 1st coil.   In this way we can use both the mechanical energy produced by the 1st coil and the electrical energy produced by the 2nd coil, right?   This is a great concept if it works, right? Please throw some light on this. Dynamically Adding/Removing CSS in Nested Div Intuitive explanation for density of transformed variable? Suppose $X$ is a random variable with pdf $f_X(x)$. Then the random variable $Y=X^2$ has the pdf   $$f_Y(y)=\begin{cases}\frac{1}{2\sqrt{y}}\left(f_X(\sqrt{y})+f_X(-\sqrt{y})\right) &amp; y \ge 0 \\ 0 &amp; y \lt 0\end{cases}$$   I understand the calculus behind this. But I'm trying to think of a way to explain it to someone who doesn't know calculus. In particular, I'm trying to explain why the factor $\frac{1}{\sqrt{y}}$ appears out front. I'll take a stab at it:  Suppose $X$ has a Gaussian distribution. Almost all the weight of its pdf is between the values, say, $-3$ and $3.$ But that maps to 0 to 9 for $Y$. So, the heavy weight in the pdf for $X$ has been extended across a wider range of values in the transformation to $Y$. Thus, for $f_Y(y)$ to be a true pdf the extra heavy weight must be downweighted by the multiplicative factor $\frac{1}{\sqrt{y}}$  How does that sound?  If anyone can provide a better explanation of their own or link to one in a document or textbook I'd greatly appreciate it. I find this variable transformation example in several intro mathematical probability/stats books. But I never find an intuitive explanation with it :( What is the T-SQL To grant read and write access to tables in a database in SQL Server? What is the exact SQL to assign db_datareader and db_datawriter roles to a user in SQL Server?  The user name is MYUSER and the database is MYDB.