Straight to the chase I want to create a function which calculates the length of a step.  This is what I have:  def humanstep(angle):     global human     human[1]+=math.sin(math.radians(angle))*0.06     human[2]+=math.cos(math.radians(angle))*0.06   So if the angle is 90 then the x value (human[1]) should equal 0.06 and the y value equal to 0.  Instead  the conversion between radians and degrees is not quite perfect and these values are returned.  [5.99999999999999, 3.6739403974420643e-16]   Is there anyway to fix this?
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Hyphenation of words containing slash How can I tell LaTeX to automatically split up the german word  Kontrast/Rausch-Verhältnis    into   Kontrast/Rausch-|Ver|hält|nis   LaTeX complains that "/" is not a letter. How can one set the executable bit on files using umask? According to documentation, a umask of 000 should work, but in practice this only works on directories.  Also open to other methods of automatically setting +rwx on a particular user's created files if you have any. I have updated my kubuntu 14.10 to kubuntu 15.04. And now after boot, when I enter my password on welcome screen, I will get black screen. It's looks like screen powered off. No cursor, no change brightness. Nothing. And when I try switch to text consoles (Ctrl+Alt+F1) nothing happening. If I doesn't login in welcome screen I can switch to text console. I think I have heard that the following is true before, but I don't know how to prove it:     Let $A$ be a matrix with real entries. Then the minimal polynomial of $A$ over $\mathbb{C}$ is the same as the minimal polynomial of $A$ over $\mathbb{R}$.   Is this true? Would anyone be willing to provide a proof?    Attempt at a proof:  Let $M(t)$ be the minimal polynomial over the reals, and $P(t)$ over the complex numbers. We can look at $M$ as a polynomial over $\Bbb C$, in which case it will fulfil $M(A)=0$, and therefore $P(t)$ divides it. In addition, we can look at $P(t)$ as the sum of two polynomials: $R(t)+iK(t)$. Plugging $A$ we get that $R(A)+iK(A)=P(A)=0$, but this forces both $R(A)=0$ and $K(A)=0$. Looking at both $K$ and $R$ as real polynomials, we get that $M(t)$ divides them both, and therefore divides $R+iK=P$.   Now $M$ and $P$ are monic polynomials, and they divide each other, therefore $M=P$.  Does this look to be correct?    More generally, one might prove the following     Let $A$ be any square matrix with entries in a field$~K$, and let $F$ be an extension field of$~K$. Then the minimal polynomial of$~A$ over$~F$ is the same as the minimal polynomial of $A$ over$~K$. Is it possible to use Matcap materials as an actual material for a model so that I can render with it? There are certain parts that I want to apply specific Matcaps textures to but I want to actually use them to render and not just for sculpting purposes.  Is this at all do-able? Meaning of 'const' last in a function declaration of a class? The description of the  says:     Your Intelligence score is 19 while you wear this headband. It has no   effect on you if your Intelligence is already 19 or higher.   The  spell description says that my Intelligence score becomes 1 on a failed save:     [...] On a failed save, the creature's Intelligence and Charisma   scores become 1. The creature can't cast spells, activate magic items,   understand language, or communicate in any intelligible way. [...]   If I am affected by Feeblemind and I am wearing the Headband of Intellect, would I have an Intelligence score of 19 or 1?   Also, what about the other effects like not being able to cast, activate magic items, understand languages or communicate in any way? Those seem Intelligence-related, but are mentioned additionally to the reduction.   If the Intelligence score becomes 19, are the other effects still active? #!/bin/bash  SUBJECT="WARNING CPU USAGE HIGH" TO=gmail id MESSAGE=/tmp/messages echo "#######################" &gt; $MESSAGE echo "CPU statistics as follows.." &gt;&gt; $MESSAGE mpstat &gt;&gt; $MESSAGE echo "#######################" &gt;&gt; $MESSAGE CPU_USAGE=$(top -b -n1 | awk '/^Cpu/ {print $2}' | cut -d. -f1) [ $CPU_USAGE -gt 85 ] &amp;&amp; mail -s "$SUBJECT" "$TO" &lt; $MESSAGE`   ./cpu.sh: line 11: [: -gt: unary operator expected What might be the reason Beamer and pseudocode I know we can use both Present Simple and Present Continuous to describe future actions. But I don't know when to use the correct form.   For example:  We fly to Paris next week.  We are flying to Paris next week.   These sentences both seem correct to me.  Can anyone explain me how to correctly use these tenses? How can I represent an 'Enum' in Python? I'm mainly a C# developer, but I'm currently working on a project in Python.  How can I represent the equivalent of an Enum in Python? Invoking JavaScript code in an iframe from the parent page How caret calculates R Squared From the training output below, it looks like R squared is not calculated by the traditional formula 1 - SSE/SST, since lower error rate has lower R squared. So how is it calculated?    colsample_bytree  min_child_weight  RMSE      Rsquared    0.4               3                 16963.39  0.8799191   0.4               5                 16813.24  0.8788395 Why is $a^{-1}$ mod $p$ equal to $a^{p-2}$ mod $p$ in modular arithmetic? Bring a window to the front in WPF Show by induction: $(1+\frac{1}{n})^{n}<n$ Show by induction that for all natural numbers n>3  $(1+\frac{1}{n})^n&lt;n$  Let $(1+\frac{1}{n})^n&lt;n$ be true !   We show that $(1+\frac{1}{n+1})^{n+1})&lt;n+1$  $(1+\frac{1}{n})^n(1+\frac{1}{n})&lt;n(1+\frac{1}{n})$   $(1+\frac{1}{n})^{n+1}&lt;n+1$  So now we just need to show that   $(1+\frac{1}{n+1})^{n+1}&lt;(1+\frac{1}{n})^{n+1}$  So here , If I show that :   $(1+\frac{1}{n+1})&lt;(1+\frac{1}{n})$   Does that mean im done with exercise ? The bounty I offered on  is now in its grace period and the information box tells me:     you must award this bounty as soon as possible   But there are no answers - what do I do? for any ring $A$ the matrix ring $M_n(A)$ is simple if and only if $A$ is simple Let integer $n\geq 1$. I have obtained that for any field $k$, the matrix ring $M_n(k)$ is simple, i.e., $M_n(k)$ contains no nonzero proper two sided ideals. Now I want to prove that: for any ring $A$ (not necessarily commutative), the matrix ring $M_n(A)$ is simple if and only if $A$ is simple.   How to prove? Is there a way to adjust the torch/flash brightness level on an iOS device? How should we handle downvote retaliation? I have a situation where I'm trying to figure out what the right thing to do is on SO.    I see a question.  I answer the question.  I see there are a couple other answers.  One answers the question well, though with less explanation than my answer.  The other answer seems both wrong and irrelevant to the question (doesn't answer the question at all).  I comment to that effect.  The "wrong" part is edited out, but the author of the answer doesn't respond to how their answer actually answers the question.  In fact, they seem offended that I don't "get" it.  After giving them several chances to explain how their answer is relevant to the question and seeing their attitude, I decide to downvote their answer as I don't see how it addresses the question at all and the author won't explain.  They retaliate and downvote my answer and admit in their comments that their downvote of my answer has nothing to do with the content of my answer and only because they don't like me disputing their answer.  Did I do the right thing by downvoting their answer?  Do I just have to live with their downvote retaliation?  Anything I should have done differently?  I also have no way of knowing this for sure, but the next question I answered was upvoted, then downvoted so perhaps this same person is stalking my answers and downvoting other answers of mine too with no comment.  As long as this doesn't continue, I'm not losing sleep over a couple downvotes, but I do wonder if I should have done anything differently.  Followup Later After I Posted This Question: After thinking about it for a little while, the person who disagreed with me decided to delete their post.  So, eventually the message did get through to them.  I don't know if they rescinded their downvote or not (or if they even could).