If we use a double in c# or a float in python, simple calculations using variables of 1 decimal place seem to not be correct.  In both python and c#, if I perform the calculation 5.2 - 5.1, I get the answer 0.10000000000000053, when it should obviously be 0.1.  Can someone please explain to me why this is?  Also, in c#, we can use the decimal type to avoid this issue. Is there a similar type in python I can use?
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Contracting with Levi-Civita (totally antisymmetric) tensor How many points in RSA, such that $m^e = m \bmod n$ For every RSA-cryptosystem, there exist some messages $m$, for which it holds that $m^e \equiv m \pmod n$ As to the question, how many such messages exist, this question has already been asked and answered here:  However, I do only understand the answer up to a certain point Suppose that $n$ is only 1 prime. Then it holds that the number of unconcealable messages is $\gcd(e-1, p-1)+1$ This is because in $m^e \equiv m \pmod  p$ , either $m = 0$ or $m \not= 0$. In the latter case $m$ can be expressed as $g^t$, where $g$ is a Generator in $\mathbb{Z_p}$ $g^{t*e} \equiv g^t \pmod p$ $g^{t(e-1) \bmod p -1 } \equiv g^{0 \bmod p -1} \pmod p$ $t(e-1) \equiv 0 \pmod {p-1} $ has exactly $\gcd(e-1, p-1)$  solutions, so the total number of unconcealable messages is, together with $m=0$ , $\gcd(e-1, p-1)+1$ When we now look at real RSA, which has two prime factors in its modulus, it holds that the number of unconcealable messages is $(\gcd(e-1, p-1)+1)\cdot(\gcd(e-1, q-1)+1)$ Why is that so? I suppose it has to do with CRT, but I just cant understand why. How to Install Ubuntu on separate hard drive in a dual boot? I have already installed Windows 7 on C: drive. Now I want to install Ubuntu on E: drive which is a free partition. How do I proceed? What does the comma operator , do? What does the , operator do in C? Find all solutions to $x^2\equiv 1\pmod {91},\ 91 = 7\cdot 13$ I split this into $x^2\equiv 1\pmod {7}$ and $x^2\equiv 1\pmod {13}$.  For $x^2\equiv 1\pmod {7}$, i did: $$ (\pm1 )^2\equiv 1\pmod{7}$$ $$(\pm2 )^2\equiv 4\pmod{7}$$ $$(\pm3 )^2\equiv 2\pmod{7}$$ Which shows that the solutions to $x^2\equiv 1\pmod {7}$ are $\pm1$.  For $x^2\equiv 1\pmod {13}$, i did: $$ (\pm1 )^2\equiv 1\pmod{13}$$ $$(\pm2 )^2\equiv 4\pmod{13}$$ $$(\pm3 )^2\equiv 9\pmod{13}$$ $$ (\pm4 )^2\equiv 3\pmod{13}$$ $$(\pm5 )^2\equiv {-1}\pmod{13}$$ $$(\pm6 )^2\equiv 10\pmod{13}$$Which shows that the solutions to $x^2\equiv 1\pmod {13}$ are $\pm1$.  Thus, I concluded that the solutions to $x^2\equiv 1\pmod {91}$ must be $\pm1$. I thought that $\pm1$ were the only solutions, but apparently I am incorrect! How do I go about finding the other solutions to this congruence? Can you cast Mirror Image twice on successive turns and have 6 duplicates of yourself instead of 3? (PHB, pg. 260) is a spell that has a casting time of 1 action, and a duration of 1 minute. My question is, can you cast Mirror image twice on successive turns, gaining 6 images by turn 2?  Sample Turns:  Turn 1: Mirror Image (3 images)  Turn 2: Mirror Image again (6 images, with 3 of them lasting 1 turn less)  Since Mirror Image doesn't require concentration, there should be no interference between the 2 casts in terms of concentration. I know that this could be up to DM Fiat, but I was wondering if there was a proper interpretation of the printed rules for this situation. Is this an equivalent formulation of "surjective" resp. "epimorphism"? I will be writing scripts for ArcGIS Desktop in Python with ArcPy.   Is there a community or open source project where code and models can be shared? I want to know all sets of single-variate functions that fulfill the following qualities: $\forall_{f:R^2 \to R^2} \forall_{g \in CAF} \forall_{h \in CAF} \exists_{k\in CAF} k(x) = f(g(x),h(x))$ where CAF is the set I am wishing to find. I know that the set of constants and the set of piece wise constants each satisfy that equation. Do any others? A guide to moderating chat "The pair was ..." or "the pair were ..." How do I calculate the distance between two points specified by latitude and longitude?  For clarification, I'd like the distance in kilometers; the points use the WGS84 system and I'd like to understand the relative accuracies of the approaches available. Do plugin files have to follow a specific convention to be "picked up" by WordPress? I have a Student object and have a pick list field  "Student Status" in this object. Status can be Full-Time OR Part Time. Now my requirement is i want this student status list, Part-Time or Full-Time in apex controller. how can i do this?  If i get a student record it will only give me that particular student status Full-Time or Part-Time. But i need all options that are available in student status field.  Please help me su options - running command as another user I was wondering how to run a command as another user from a script.  I have the script's owner set as root. I also have the following command being run within the script to run the command as the hudson user:  su -c command hudson   Is this the correct syntax? Can I install any iOS version I wish by picking and choosing which firmware to restore? I'm trying to downgrade my iPhone from the current iOS to an older one, as per .  But every time I try, I always receive this error:     The iPhone could not be restored. This device isn't eligible for the requested build.     I have tried many times with and without DFU mode. Any ideas regarding this? I've heard that you always want the same size of RAM (2x1GB sticks) but does their placement matter? I have four slots on my motherboard but does it matter if the sticks are not adjacent?  This particular question involves the Process substitution and pipe I tried Libreoffice, but its Import option while pasting in the cell is very  annoying.I also tried Gnumeric but I am not able to paste using middle button.Parcellite to make copy paste faster and middle button pasting is not working with Gnumeric. Is there any simple table maker app available that can accept only simple unformatted text? All these software are very complicated for this simple work. How many Marvel Earths (Universes) are there?