Python does not seem to want to return the correct answer on this loop. I believe the code should stop after the evaluation of t=1.8 as the next value of t, 2.0, is equal to b, not less than.  a=0.0 b=2.0 h=0.2 t=a print "t = ",t while t&lt;b:     t+=h;     print "t = ",t;   The output is   t =  0.0 t =  0.2 t =  0.4 t =  0.6 t =  0.8 t =  1.0 t =  1.2 t =  1.4 t =  1.6 t =  1.8 t =  2.0 t =  2.2   Any help or recognition of an error would be massively appreciated.
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
The dimension of the Hilbert space is determined by the number of independent basis vectors. There is a infinite discrete energy eigenbasis $\{|n\rangle\}$ in the problem of particle in a box which can be used to expand a general state $|\psi\rangle$ as: $$|\psi\rangle=\sum\limits_{n=0}^{\infty} C_n |n\rangle$$ Here, the basis implies that the Hilbert space has countably infinite number of basis vectors. But one could well expand $|\psi\rangle$ in any other basis as well, say the continuous position basis. Then that superposition, $$|\psi\rangle=\int dx \psi(x)|x\rangle$$ is also possible. But this basis $\{|x\rangle\}$ is continuous and uncountably infinite. Such sets cannot be equal because they have different cardinality. Then my questions is how many independent basis vectors are really there in this Hilbert space? Relativity and Galaxy Rotation Speed Why is triple-DES using three different keys vulnerable to a meet-in-the-middle-attack? Among other sources,  states that triple DES using three seperate keys (k1, k2, k3) is vulnerable to meet-in-the-middle-attacks, while triple DES using only two keys (k1, k2, k1) is not.  Why is this attack possible if all the keys are different, but not if the first and the third are the same? Suppose $G$ has odd order, show the function $f:G\rightarrow G$ defined by $f(x)=x^2$ is injective. This proposition is easily provable if we assume $G$ is Abelian, but I don't know how to start this without the assumption of being Abelian. How do you use Excel server-side? A client wants to "Web-enable" a spreadsheet calculation -- the user to specify the values of certain cells, then show them the resulting values in other cells.  (They do NOT want to show the user a "spreadsheet-like" interface. This is not a UI question.)  They have a huge spreadsheet with lots of calculations over many, many sheets.  But, in the end, only two things matter -- (1) you put numbers in a couple cells on one sheet, and (2) you get corresponding numbers off a couple cells in another sheet.  The rest of it is a black box.  I want to present a UI to the user to enter the numbers they want, then I'd like to programatically open the Excel file, set the numbers, tell it to re-calc, and read the result out.  Is this possible/advisable?  Is there a commercial component that makes this easier?  Are their pitfalls I'm not considering?  (I know I can use Office Automation to do this, but I know it's not recommended to do that server-side, since it tries to run in the context of a user, etc.)  A lot of people are saying I need to recreate the formulas in code.  However, this would be staggeringly complex. What is the effect of the number of cross-type focus points on sharp focus? Minimum of $\sqrt{\frac{a}{b+c}}+\sqrt{\frac{b}{c+a}}+\sqrt{\frac{c}{a+b}}$ What is the minimum of $$f(a,b,c):=\sqrt{\dfrac{a}{b+c}}+\sqrt{\dfrac{b}{c+a}}+\sqrt{\dfrac{c}{a+b}}$$ where $a,b,c$ are positive real numbers?  When $a=b=c$, we have $f(a,b,c)=\dfrac{3}{\sqrt{2}}\approx 2.12$  When $a=1,b=c\rightarrow\infty$, we have $f(a,b,c)\rightarrow 2$. So the minimum is at most $2$. Why is there no article in "We are Family"? This is a follow up from this .  I'm using this slightly modified script to enumerate all installed MSI packages:  strComputer = "."  Set objWMIService = GetObject("winmgmts:" &amp; _     "{impersonationLevel=impersonate}!\\" &amp; _     strComputer &amp; _     "\root\cimv2")  Set colSoftware = objWMIService.ExecQuery _     ("SELECT * FROM Win32_Product")     If colSoftware.Count &gt; 0 Then     For Each objSoftware in colSoftware         WScript.Echo objSoftware.Caption &amp; vbtab &amp; _         objSoftware.Version     Next Else     WScript.Echo "Cannot retrieve software from this computer." End If   What is surprising however, is its abysmal performance. Enumerating the 34 installed MSI packages on my XP box takes between 3 and 5 minutes !  By comparison, the Linux box that sits besides is taking 7s to enumerate 1400+ RPMs... sigh  Any clues on this ? When looking at my objects in 3d view I'm seeing a gray cone that seems to be hiding other objects.   Can anyone help me turn this off and explain what it is please.  Screenshots attached. I am aware of the basics of evolutionary theory, however I don't understand how mutations can add genes over time.   Am I correct in thinking that creatures within the same species who mutate to have an additional gene in their genome would normally be infertile?  Or am I misunderstanding that?  Can someone explain the process of the creation of genetic material through evolution?  Citation to a decent academic paper or book on the matter would be appreciated too. How to compute the  formula $\sum  \limits_{r=1}^d r \cdot 2^r$? Given $$1\cdot 2^1 + 2\cdot 2^2 + 3\cdot 2^3 + 4\cdot 2^4 + \cdots + d \cdot 2^d = \sum_{r=1}^d r \cdot 2^r,$$ how can we infer to the following solution? $$2 (d-1) \cdot 2^d + 2. $$   Thank you Formula based on picklist I am trying to create a formula that will put a 1 in a hidden field if the value of a picklist is equal to a specific value.  I keep getting stuck here and I can't figure out what I am missing?  IF(ISPICKVAL( Examiner_Type__c ="Pending Examiner Status","1","",)) Proving that the unities of a ring form a group under multiplication I'm planning to use USB port for an application(from a device to a PC) but the distance between the device and the PC will be around 15m. The recommended maximum USB cable length is 5m.  How can I buffer the data without loosing any information, safely? Would a USB hub work? How can I make a single event handler handle ALL Button.Click events? How to calculate the division and remainder of a big number manually Let $x = 2017^{2017}$. How can I manually determine:   The remainder of the division of $x$ by $31$ The least significant digit of $x$ Which tools and technologies are used to build the Stack Exchange Network? What tools and technologies are used to build the Stack Exchange Network?  See also: Proving that $\sum\limits_{k=0}^{n} {{m+k} \choose{m}} = { m+n+1 \choose m+1 }$ I have to prove that:     $$\sum_{k=0}^{n} {{m+k} \choose{m}} = { m+n+1 \choose m+1 }$$   I tried to open up the right side with Pascal's definition that: $$ { n \choose k} = {n-1 \choose {k}} + {n-1 \choose {k-1}}$$  Here is what I came up with, and I am sure it is wrong because it does not equal the left side:  $$ {m+n+1 \choose m+1} = {m+n \choose m+1} + {m+n \choose m} = ... ={m+n \choose m+1} + {m+n-1 \choose m} + {m+n-2 \choose m-1} + ... + {m \choose m+1} = \sum_{k=0}^{n} {m+k \choose m+k-n+1 }  $$  Which, again, probably is wrong because it is not equal $\sum_{k=0}^{n} { m+k \choose m}$. Any help is appreciated How do I use the Chinese remainder theorem to find all the square roots of 11 in $\mathbb Z_{35}$?