Casting operands in floating point comparison works not as expected When I want to compare two floating points values. I get strange results.  My example compiled with x86_64-w64-mingw32-g++ test.c -mfpmath=387:  #include "math.h" #include "stdio.h" int main(int argc, char **args) {      double t1 = atof("999990") * 1e-9;     double t2 = atof("999990") * 1e-9;     printf("1) Compare of two variables \"t1 != t2\": ");     if (t1 != t2) {         printf("Not Equal\n");     }     else {         printf("Equal\n");  //This is taken     }     printf("2) Compare of Variable with calculated value \"t1 != atof(\"999990\") * 1e-9\": ");     if (t1 != atof("999990") * 1e-9) {         printf("Not Equal\n");  //This is taken     }     else {         printf("Equal\n");     }     printf("3) Compare of Variable with casted calculated value \"t1 != (double)(atof(\"999990\") * 1e-9)\": ");     if (t1 != (double)(atof("999990") * 1e-9)) {         printf("Not Equal\n");  //This is taken??     }     else {         printf("Equal\n");     }     return 0; }   First comparison: OK  Second comparison: OK (assuming right term is a 80Bit precision)  Why evaluates the third comparison to unequal? Why is the cast to double not recognised? Why is the result of the comparison different than the first case?
Is floating point math broken? Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
My Notes has Title-Task2 and Content is "Talk to customers"  When I run following query:  SELECT Title,Content FROM ContentNote  Output is:  ('Title', 'Task2'), ('Content','/services/data/v42.0/sobjects/ContentNote/0692x000000WFDKAA4/Content')])]  how to get my actual content from this? Is it safe to delete from C:\Windows\Installer? I've been looking on an XP machine what is using all that diskspace, and it turns out C:\Windows\Installer is high up there on the list of directories that use the most diskspace.  It seems to contain a cache of msi and msp files.  Is it safe to delete those? To save diskspace, I've been deleting the "$KB...$" directories for ages without any problems. I want my Windows Updates in my system, why you would want to uninstall them is something that I have never understood. (Except when you're on an update revision board professionally or something of that order.) Product and Box Topologies I am having a hard time understanding why the box topology is finer the the product topology. Of course I know that with finite product, the two are the same. With product topology, the basis elements are defined so that the $U_{\alpha}=X_\alpha$ except for finitely many $\alpha$. So how can this topology be contained in the box topology which has only the product of the  $U_{\alpha}$ as basis. I think it should have been the other way round. Am I missing something here? I need help with this because I have been confused over it for a long time. What does the number in parentheses shown after Unix command names in manpages mean? For example: man(1), find(3), updatedb(2)?   What do the numbers in parentheses (Brit. "brackets") mean? Where can I find sample or real Selenium projects. All the material I can find on github and on internet are basic, and never intermediate or advanced.  How does a real Selenium project look in real life? How can I find sample code? I accidentally disabled my admin account.  After I login to another account I found I can not get admin rights, because all admin accounts on my computer are disabled.  I clicked on 'run as administrator' but only see a smart card choice (all the admin accounts are disabled so no choice provided)    I don't want to re-install my OS, help!    Details:  I have account A on my computer.    I got a new computer so I want to give the old one to my mother.    Creating a new user account B for her and disable account A.    Logout and restart.    Successfully login B, now I found I could not get admin rights because no account choice is provided.    More informations about my machine:  OS is Windows 10 and my admin account is a Microsoft Account.  I have an arch-linux installed on my computer and dual-boot it using GRUB, so maybe I can not use safe mode. iPhone 6s with iOS 12.4 not connecting to MacBook Pro mid2015 with macOS 10.14.6 I am using an iPhone 6s with iOS 12.4 and a MacBook Pro mid2015 with macOS 10.14.6. Since recently (I am not exactly sure when it started), I cannot charge the phone with my computer anymore. As soon as I plug the phone in, it will play the charging sound repeatedly. The right-hand side port sometimes works, the lefthand side port never works. When I connect my old iPhone 5 (using the same cable), it charges without any issues. My iPad mini 4 shows the same issue.  Sometimes the "Do you trust this computer" setting flashes on the phone and disappears before I can click anything.   How can I fix this?  Update 1  Sometimes I get the Software Update dialogue in macOS. After approx. 2 minutes it shows the following:     Update 2  For some reason the issue disappeared for a while but is back now. Disabling "Settings" > "Touch ID &amp; Passcode" > "USB Accessoires" seems like it makes the problem a bit less bad, but not go away.  Update 3  This is driving me crazy. I upgraded to Mojave 10.14.3 mostly to get rid of the issue. It persists. Some more random information: Before logging in (Filevault pre-boot authentication), the phone will charge fine. Only when a user account is loaded, the issue appears. The likelihood of a successful connection increases with the battery state of the iPhone. Workaround 2 in my answer below suggest that this a "Trust issue" from the iPhone's side. I suppose the solution will have to be hidden somewhere there...    What I tried so far (will update):   Reset Privacy settings on iPhone Different (original, almost new Apple) lightning cables   Remove and add "iPhone USB" in Network Settings  SMC reset (), PRAM reset Upgrade to latest iOS 12.4 and MacOS 10.14.6 Question:  Show that $n^2 + 3n + 5$ is not divisible by $121$, where $n$ is an integer. Given $(a_n)$ with $a_n \geq a_{n+1} \geq 0$ show that if $\sum \sqrt{a_n a_{n+1}} < \infty \implies \sum a_n < \infty$ MySQL AUTO_INCREMENT does not ROLLBACK What’s the rule for using “who” and “whom” correctly? I can never figure out whether I should use who and whom. Most people use who for both colloquially, but some people say this is not correct.  What’s the rule for using who and whom correctly? With OpenDNS now needing one to be on the pro package to have filtering turned on, being on a tight budget, we are in need of free DNS filtering.  After reading , I collected SquidGuard blacklists and concatenated domains in the categories i needed into one big list. I then fed it to  generating a file containing about 2 million zones.  named-checkconf parses it just fine, but reloading named takes almost 10 minutes, then it wont resolve anything, and the server slows down to a crawl. Removing the include results in named working properly again.  Whats the proper way to set up BIND9 to work as a DNS firewall efficiently? If it's possible to also block any domain that resolves to specific IP addresses that would solve the whole problem.   I'm running bind as non-authoritative, just a caching server. I try to understand why for a connected Lie group $G$ the first fundamental group $\pi_1(G)$ is abelian, and mainly why the second fundamental group is trivial $\pi_2(G)=0$?  Thanks for anyone who give me references for a 'simple proof' of these results Is it true that for each set $M$ a given injective function $f: M \rightarrow M$ is surjective, too?  Can someone explain why it is true or not and give an example? What is the purpose of using a FIFO vs a temporary file or a pipe? Can airlines deny boarding if my port of entry is different than the country which issued the Schengen visa? Few days back I did a Europe tour from India. As stated by many (I haven't confirmed official documents), I can apply for a visa from the country which is either my first port of entry in this case Paris or the longest stay which in this case was Italy.  Now following is what happened with me.   My flight was New Delhi to Paris via Istanbul with Turkish Airlines I Traveled from New Delhi to Istanbul (no problem here). When I was boarding to flight Istanbul to Paris, zhe airlines officials (the ones who checks the boarding pass before boarding the flight) told me that I could not board the flight because my visa was issued by Italy and I need to go to Italy First. They were denying the longest stay option of the visa. Moreover NONE of the staff of Istanbul airport were able to understand English so I had to go to a lot of problems before I managed to get tickets to Venice. I somehow managed to fly to Venice from Istanbul after almost 24 hours of struggle at Istanbul airport (without food and water).   So, my question is do the airlines staff have a right to deny flight boarding in this case? With services like Google Finance or Yahoo Finance it is very convenient to find the historical stock price metric of a listed company, but if the company is not listed, I can't find the data.  For example, I want to see the price metrics for Macromedia, which had been listed in 1993 on NASDAQ (MACR), then acquired by Adobe in 2005. How could I find its historical price metrics? $e^{mx}$ in solving second order differential equations In a book I am reading on differential equations, the author writes about the solution to a homogenous, linear, second order differential equation with constant coefficients. The author says something like, "Let us suppose that the solution is of the form $y=e^{mx}$ " . After this the author introduces the characteristic equation of a differential equation of the form mentioned above, and proceeds to describe how to solve it w/ undetermined coefficients, variation of parameters, etc.   How did mathematicians first come up with this "assumption" that the solution was of the form $y=e^{mx}$? And, are there any other forms of solutions for these types of equations? The repository 'http://dl.google.com/linux/chrome/deb stable Release' does not have a Release file After executing this command  sudo apt-get update &amp;&amp; sudo apt-get -y upgrade   I get this error  W: The repository 'http://dl.google.com/linux/chrome/deb stable Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details.   I've seen past inquiries on same issue but the answers given are specific to other repositories.  Any help will be appreciated. Do we actually get more sick (flu/cold) during winter? The word flu derives from the Italian phrase "influenza de freddo" meaning "influence of the cold".  Indeed it is that time of the year when my colleagues seem to have the flu/cold more often than not. I remember during university, winter lectures would be riddled with people coughing and sneezing - the so called "freshers flu"  Questions   Is there statistical evidence for this claim? If so, what are the causes/factors involved?   asks why our noses get runnier during cold whether, is this related?