This is the C++ program I've written to get fibonacci numbers from 1 to 100.   #include &lt;iostream&gt; #include &lt;vector&gt; #include &lt;iomanip&gt; using namespace std;  int main() {     int n;     vector&lt;double&gt; f;      //adding first two fibonacci numbers to vector     f.push_back(0);     f.push_back(1);      cout&lt;&lt;"How many fibonacci numbers do you want : ";     cin&gt;&gt;n;      for(int i=0; i&lt;n; i++)     {         if(i&gt;1)     f[i] = f[i-1] + f[i-2];         cout&lt;&lt;(i+1)&lt;&lt;": "&lt;&lt;fixed&lt;&lt;setprecision(0)&lt;&lt;f[i]&lt;&lt;endl;     } }   All the results are correct upto 79 values but then after the 80th value is not exactly the sum of 78 and 79 values. The output is:  .... 78: 5527939700884757 79: 8944394323791464 80: 14472334024676220 ....   Here the last digit should be 1 but it shows 0, why did this happen?
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 to use itemize in Table environment I want to create a table like the picture below, and i wish to itemize the lamba_1 > lamba_2 > 0 using 'item style', which is the cell of each categories. Can someone help me? How to re-enable tray icons for applications in Ubuntu? Suppose we define the following relationship of ordering between propositions in PROP: $$ \phi &lt; \psi := (\models \phi \rightarrow \psi \land \lnot(\models \psi \rightarrow \phi) ) $$ Show that if exists $\phi$ and $\psi$ such that: $$ \phi &lt; \psi $$ Then there is a $\sigma$ such that: $$ \phi &lt; \sigma &lt; \psi $$ I have tried to use valuation to find what $\sigma$ could possibly be, so for all valuations v:  If $v(\phi)=0$ and $v(\psi)=0$ then, since $\models \sigma \rightarrow \psi$, $v(\sigma)=0$  If $v(\phi)=1$ and $v(\psi)=1$ then, since $\models \phi \rightarrow \sigma$, $v(\sigma)=1$  It is impossible that $v(\phi)=1$ and $v(\psi)=0$ since $\models \phi \rightarrow \psi$  If $v(\phi)=1$ and $v(\psi)=0$ then $v(\sigma)$ could be either 0 or 1, and it would satisfy the tautologies, but if:  $v(\sigma)=0$, then the valuation of $\sigma$ would be equal to valuation of $\psi$ for all valuations and thus $\models \psi \rightarrow \sigma$, which is a contraditcion; $v(\sigma)=1$, then the valuation of $\sigma$ would be equal to valuation of $\phi$ for all valuations and thus $\models \sigma \rightarrow \phi$, which is a contraditcion. How to compress / reduce the size of JPEG photos for archiving? I have 50,000 high resolution JPEG photos, where a couple of them might occasionally be needed, about once a year.  I wanted to zip them to save disk space, except that zipping gives no space benefit - so trying to reduce the images disk usage using winzip, winrar or 7zip was not successful.  Is there any software or algorithm similar to zip to compress image size on hard disk for storage without loosing any image information? Shutdown Cause -128 How to remove spikes from switching transistor? I always wondered if children who graduate from Hogwarts have an education that is actually worth while in the real world.  Do the children learn math and English?  I can see History of Magic as practical. I know of Arithmancy, but that's the study of the magical properties of numbers, not math.   Since Hogsmead is one of the very last all-magical towns, it's a fair assumption that a majority of the students at Hogwarts will be living in non-magical towns or cities. If practical classes (like math or English) aren't taught, then how do these students function in the non-magical cities? I understand that division by zero isn't allowed, but we merely just multiplied $f(x) = 1$ by $\frac{x-1}{x-1}$ to get $f(x) = \frac{x-1}{x-1}$ and $a\cdot 1 = 1\cdot a = a$ so they're the same function but with different domain how is this possible?  Or in other words why don't we simplify $f(x) = \frac{x-1}{x-1}$ to $f(x) = 1$ before plotting the points. Is it just defined this way or is there a particular reason ?  Note: my book says the domain of $f(x) = 1$ is $\mathbb{R}$ and the domain of  $f(x) = \frac{x-1}{x-1}$ is $\mathbb{R}$ except $1$. Why do I get the error "failed unmounting /var" during shutdown? I have a fresh install of Debian 9.0.0. It has a separate 1 GB partition for /var formatted at ext4. When I shutdown from the terminal, using shutdown -h now, there is a bright-red error message stating "failed unmounting /var".  What is the fix for this error? Height of an HTML select box (dropdown) Creating fillable PDFs Intersection of two parabolae Problem: Consider two parabolae such that their axes of symmetry form a right angle. Prove that all four points of intersection lie on a common circle (it is an assumption that there exist such four points). Could you help me obtain a non-algebraic solution? (The algebraic one I did is given below.)  Algebraic solution:  There is a very simple algebraic approach, just introduce a Cartesian coordinate system such that the parabolae are given by equations:  $$y = \alpha_1 x^2 + \beta_1 $$ $$x = \alpha_2 y^2 + \beta_2 $$  and by scaling, adding and simplifying we can get the following ordinary circle equation (the right-hand side is positive because parabolae intersect): $$ \left(x-\frac{1}{2\alpha_2}\right)^2 + \left(y - \frac{1}{2\alpha_1}\right)^2 = \frac{-\beta_1}{\alpha_1} + \frac{-\beta_2}{\alpha_2} + \left(\frac{1}{2\alpha_1}\right)^2 + \left(\frac{1}{2\alpha_2}\right)^2$$  Non-algebraic solution: ?? String formatting in Python I want to do something like String.Format("[{0}, {1}, {2}]", 1, 2, 3) which returns:  [1, 2, 3]   How do I do this in Python? CentOS 7 DVD ISO vs Everything ISO different Proving that $a \mathbb{Z} \cap b\mathbb{Z} = \operatorname{lcm}(a,b)\mathbb Z$ Given $m \in \mathbb{Z}$, let $m\mathbb{Z}$ denote the set of integer multiples of $m$, i.e. $m\mathbb{Z} := \{mk\mid k \in \mathbb{Z}\}$.   Now let $a,b \in \mathbb{Z}$ with $a,b$ not both $0$. Prove that $a\mathbb{Z} \cap b\mathbb{Z} = \operatorname{lcm}(a,b)\mathbb{Z}$.   I am trying to write a proof for this, but I am unsure of what method to use. Also I am confused by $mk\mid k$, because wouldn't $m=1$ for this to be true. Prove that $\mathrm{Res}[f/g,z_0]=\frac{f(z_0)}{g'(z_0)}$ I need to prove that if $f$ and $g$ are analytic in $D_r(z_0)$ and $g$ has a simple zero at $z_0$, then $$\mathrm{Res}[f/g,z_0]=\frac{f(z_0)}{g'(z_0)}$$   When $f(z_0)\neq 0$ and since $1/g$ has a simple pole at $z_0$ $$\mathrm{Res}[f/g,z_0]=\lim_{z\to z_0}(z-z_0)\frac{f(z)}{g(z)}=\frac{f(z_0)}{g'(z_0)}$$ But what do I need to do when $f(z_0)=0$? Any help will be appreciated thanks Can someone explain the dollar sign in Javascript? How to format numbers as currency strings Explain $\iint \mathrm dx\,\mathrm dy = \iint r \,\mathrm \,d\alpha\,\mathrm dr$ It is changing the coordinate from one coordinate to another. There is an angle and radius on the right side. What is it? And why?  I got:  $2\,\mathrm dy\,\mathrm dx = r(\cos^2\alpha-\sin^2\alpha)\,\mathrm d\alpha \,\mathrm dr$,  where $x = r \cos(\alpha)$ and $y = r \sin(\alpha)$.  but cannot understand and get the right side. The problem emerged when trying to integrate $\displaystyle \int_0^\infty e^{\frac{-x^2}{n^2}}\,\mathrm dx$ where I tried to change the problem knowing $r^2=x^2+y^2$ but stuck to this part. What is the change in the title called and why is it so? How can I join these two meshes in a proper way? I know I can Ctrl J to join them, but how can I do so without having overlapping faces?