Whenever I'm dealing with numbers in PHP which represent money, I'm forced to use bcadd() and the other functions in that &quot;family&quot;, instead of simply using the nice symbols such as +, -, / and *. The reason is something about &quot;floats&quot; being inaccurate for some reason. I've many times tried to understand why exactly this is, but I can't make any sense of it. It would be much nicer to use the symbols instead of the BC Math functions. Why aren't the floats just accurate instead? Or made into &quot;numerics&quot; if &quot;floats&quot; by their nature are inaccurate? It's not a problem anymore because I know about this, but for most of my life when I'm coded PHP, I had no clue even about the existence of those functions, let alone the need to use them.
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Polynomials with integer coefficients such that $p(a)=b,p(b)=c,p(c)=a$ While studying polynomials a question struck in my mind that  To have a polynomial $p(x)$ with integer coefficients and $a,b,c$ are three distinct integers, then is it possible to have $$p(a)=b$$$$p(b)=c$$$$p(c)=a$$ Apparently this is a  and should hopefully be fixed in an upcoming update.    I have installed SQL Server Management Studio v17.9 on a clean Windows 10 installation.  This associated all .sql files with SSMS.  I want to associate .sql files with a plain text editor (eg: Sublime) but I am unable to change the default application.  I have tried:   Right click .sql file -> Open With -> Sublime + "Always use this program". Settings -> Default Applications by File Type -> Find .sql -> Change to Sublime Right click .sql file -> Properties -> "Change" button -> Sublime. Using ftype via elevated command prompt as seen    In all 3 cases, my selection is not reflected in any way, anywhere.  The icon remains SSMS, and the file opens with SSMS.  Is there some kind of "File Association retention" setting within SSMS I am unaware of?  Edit: I can change the default application for non-SSMS-associated extensions without issue.  Edit: after deleting registry key HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.sql, .sql files show a VSCode icon:    If I then double-click New Users.sql, it opens with SSMS and a refresh of regedit shows the .sql entry recreated with ssms.exe associated (the icon remains VSCode):    If I then right-click -> open with -> Choose Another App -> Select Sublime and hit "Always use this to open .sql files", it opens with Sublime and a refresh of regedit shows a new "b" entry created for Sublime.  The icon remains VSCode, and double-clicking opens it in SSMS:    If I then delete the a entry for ssms.exe and rename b -> a such that only sublime exists, then double-click the .sql file, it opens with SSMS and generates a new b entry for itself: I have command prompt in tcsh that shows the current working directory. The problem is that the command prompt becomes very big once I am in a deep hierarchy of folders. How do I set the command prompt to show, let's say, only the last 3 directory names? When a 0-1-matrix with exactly two 1’s on each column and on each row is non-degenerated? [1] What to do when OP answers his/her own question in an edit? Reference question:   Sometimes users solve their own questions, which is great. Sometimes they say they've solved it and move on, which is not so great. The above question is middle-ground: the user posted an answer to his own question, but as an edit to the question instead of as a real answer.  Should any action be taken in such a case? The obvious solution is to copy the edit into a real answer. But is this the right solution? In this case, the answer is a little hidden and there are no other answers, so it appears on the unanswered list.     Related: My Android device won't connect. I've never got MTP to work, I've only ever got it to connect by USB mass storage, which was how it was working most recently. But now, since 13.04, it seems that option has been taken away entirely.  I need to be able to connect by USB to transfer files.  When I plug in the device I get an error that says Unable to open MTP device '[usb:002,003]':    After some web searching, I found that I might need a program called go-mtpfs, so I tried that, and it failed:  $ go-mtpfs /media/MyAndroid 2013/07/16 16:41:43 compiled against libmtp 1.1.5 Device 0 (VID=04e8 and PID=685e) is a Samsung Galaxy Y. 2013/07/16 16:41:43 found device Samsung: Galaxy Y (04e8:685e) @ bus 2, dev 3 :  LIBMTP PANIC: Unable to find interface &amp; endpoints of device 2013/07/16 16:41:43 rdev.open failed: open: open returned nil   How do I get my USB device to just connect, automatically, like it used to? I want to find an example of a homomorphism $f:G\to H$ such that $A$ is a normal subgroup of $G,$ but $f(A)$ is not so in $H.$  I know that if $f$ was onto $f(A )$ must be normal , but otherwise i want to find an example! Proof that there must exist infinitely many solutions to a homogeneous system of equations when more unknowns than equations Prove that $x^{2} \equiv -1 \pmod p$ has no solutions if prime $p \equiv 3 \pmod 4$. Why is $ 561 = 3*11*17 $ the smallest Carmichael number? A composite integer n is a Carmichael number if the only Fermat   witnesses for $n$ are those $a \in \mathbb Z_n^+$ which are not   coprime with $n$. The smallest example of such a number is $561 = 3 ·  11 · 17$   I think I understand the definition, but I don't quite understand why is the smallest Carmichael number is the above mentioned number. Please clarify. Python ( or general programming ). Why use  instead of != and are there risks? Possible cardinality of power sets What cardinals can provably not occur as the cardinality of a power set? I know that $\mathbb N$ and natural numbers that are not powers of two are such cardinals. What else is out there? Why are there two Address lines in Address forms? Experience and a quick Google Images search suggests that it's standard to provide two fields for Address/Street. A colleague argues that it's perceived as two alternative addresses, and that the fact that there's only one country, state, zip, phone just makes it more confusing. I tried to think of a good explanation for having two fields but couldn't. To the reason of "there are some very long addresses" he replies "then why don't they use a multiline input field which would make it clearer that it's the same address".  So, what's the reason? And is it only standard for the US or for Europe as well? Why is a geometric progression called so? Just curious about why geometric progression is called so. Is it related to geometry? I'm looking for an answer considering both technical limitations and user experience.   Does it need a reload from a technical standpoint? Using past tense when referencing a still-true fact In the sentence: "I didn't know she had a son,"   Can I say "I didn't know she has a son" instead, because he is a teenager now?  Or are both correct? Why are tar archive formats switching to xz compression to replace bzip2 and what about gzip? How can I propose a new site? (Posted here as probably applies to all sites).  I was examining my reputation gain yesterday on Stack Overflow: 190. I believe I should have hit the 200 cap. Mainly due to         Respectively, I had 10, 7, 3, and 2 upvotes on those questions alone. There are a couple of other minnows in the list but the above alone should enable me to hit the cap.  There was a user removed sometime yesterday which knocked off 10 points (and possibly accounts for the disparity) but I think (1) the cap should have been recalibrated and (2) I answered (3) after this event before turning in for the night.  I checked all the usual suspects: the reputation graph on your profile and  the achievements tab, but they are all showing 190. How many attacks can a fighter with two-weapon fighting make at 5th level?