Comparing float with double : C++
Is floating point math broken?
The novel centers around a man living a comfortable existence in the pretty distant future.  To support himself, he is occasionally asked to enter a box which will copy his entire body, and send it out faster than the speed of light to some developing world, to work.  His copy on this world wakes up and realizes what a big mistake he's made.  The copy does grueling work, feels lonely, and eventually just dies of radiation sickness.  Back on earth, the man never realizes how bad it is out there, and keeps sending out more copies.  I think the story is probably 80s or earlier - not sure if it's a short story, or the beginning of a novel which I lost &amp; never finished. BJT as a switch: what am I doing wrong? Alternative proof that $(a^2+b^2)/(ab+1)$ is a square when it's an integer Let $a,b$ be positive integers.  When $$k = \frac{a^2 + b^2}{ab+1}$$ is an integer, it is a square.    Proof 1: (Ngô Bảo Châu): Rearrange to get $a^2-akb+b^2-k=0$, as a quadratic in $a$ this has two values: $a$ and $kb - a = (b^2-k)/a$. (The second root is determined in two different ways from the expansion $(x-r_1)(x-r_2) = x^2 - (r_1 + r_2)x + r_1 r_2$.)  Now suppose we have $a,b$ such that $k$ is an integer but not a square, by the investigation about roots we have that the second root is a nonzero integer since $k,b,a$ are integers and $k \not = b^2$, futhermore it is positive which is easily seen from its defining equation.  WLOG assume $a \ge b$ so that the second root is strictly smaller than $a$. This leads to a decent, replacing $a$ with the second root.    Proof 2 (Don Zagier): Apply reduction theory (specifically, Sätze 1 and 2 of Section 13 of my book on quadratic fields) to the quadratic form $x^2 + kxy + y^2$, which is the unique reduced quadratic form in its equivalence class.    Note that Proof 2 is pretty much the same as Proof 1 when written out in explicit detail, but I could not read Zagier's book because I cannot read German.  I would like to know more approaches to this and other alternative proofs of this result if possible! Thanks in advance.  I would also be interested in related problems (especially easier ones of a similar nature) and texts which cover the reduction theory in English. Excessive fields in biblatex could not be removed if using \fullcite Combination of biblatex-chicago and Zotero produces many excessive fileds in the bibliography. This problem could be solved by adding to the preambule caveats like this:  \AtEveryBibitem{% \ifentrytype{online} {} {\clearfield{urlyear}\clearfield{urlmonth}\clearfield{urlday}}}   (Described in detail in the answer to my previous question: .)    This solution worked well for me, but now I have to produce a syllabus using \fullcite command. Unfortunately, this solution does not solve the problem for full bibliographic entries outside of the bibliography itself.  Here is the code with bibliography inside (to get the author's first and last name in the right order I use the following solution: ):    \begin{filecontents*}{database.bib}     @book{dalton_apartisan_2012,         title = {The Apartisan American: Dealignment and Changing Electoral Politics},         isbn = {9781452216942},         url = {http://books.google.com/books?id=eYkczUyX5wMC},         shorttitle = {The Apartisan American},         pagetotal = {241},         publisher = {{CQ} Press},         author = {Dalton, Russell J.},         urldate = {2014-04-03},         date = {2012-02-22},         langid = {english},         keywords = {Political Science / Political Process / Elections, Political Science / Public Policy / General}     } \end{filecontents*} \documentclass[11pt]{article} \usepackage[hmargin=3cm,vmargin=3cm]{geometry} \usepackage[onehalfspacing]{setspace} \usepackage{amssymb,amsmath,amsthm} \usepackage{booktabs,graphicx} \usepackage{paralist} \usepackage{cancel,soul} \usepackage{enumitem} \usepackage[authordate,backend=biber,bibencoding=utf8,bookpages=false,doi=only,isbn=false,footmarkoff]{biblatex-chicago} \usepackage[colorlinks, pdfstartview={XYZ null null 1.25},bookmarksopen=true,bookmarksopenlevel=\maxdimen,citecolor={blue},urlcolor={blue}]{hyperref} \addbibresource{database.bib} \DeclareCiteCommand{\fullcite} {\usebibmacro{prenote}} {\usedriver     {}     {\thefield{entrytype}}} {\multicitedelim} {\usebibmacro{postnote}} \AtEveryBibitem{%     \ifthenelse{\ifentrytype{article}\OR\ifentrytype{book}\OR\ifentrytype{collection}\OR\ifentrytype{incollection}\OR\ifentrytype{mvbook}\OR\ifentrytype{mvcollection}\OR\ifentrytype{mvincollection}}     {\clearfield{month}\clearfield{url}\clearfield{doi}\clearfield{urlyear}\clearfield{urlmonth}\clearfield{urlday}}}   \begin{document} \begin{center} {\huge Partisanship in Old, New and Non-Democracies}\\ \end{center}  \vspace{30pt} \noindent\textbf{Instructor: }  \hfill \textbf{Time and Location:} TBA\\ \textbf{Contact:}  \hfill \hfil \textbf{Office Hours:} TBA\\  \vspace{-20pt}    \subsection*{Partisanship in the United States}   \begin{enumerate}     \item \parencite{dalton_apartisan_2012}     \item \fullcite{dalton_apartisan_2012} \end{enumerate}  \printbibliography[heading=bibintoc]  \end{document}    Here is the output. Note the excessive fileds in the in-text full citation (they are absent in the References):    Any help, especially simple acessible solutions would be greatlly apreciated. Prove that $\left (\frac{a^2 + b^2 +c^2}{a+b+c} \right) ^ {(a+b+c)} > a^a b^b c^c$ Prove that $\left (\dfrac{a^2 + b^2 +c^2}{a+b+c} \right) ^ {(a+b+c)} &gt; a^a b^b c^c$ if $a$, $b$ and $c$ are distinct natural numbers.  Is it possible using induction? How can I work with file uploads during a Webdriver test? This is a canonical question, intended to provide a comprehensive answer to many related questions  During the course of a Webdriver test, I want to upload files. However, this opens a native file picker, which Webdriver doesn't seem to support interacting with. How do I interact with it? Excel VBA code to turn a row with a variable number of columns into fixed-length rows I would like to change this:  Filer   ShareName       IPAddress1    IPpaddres2    IPAddress2    ... ... .... ServerA /share1/tools   192.168.1.52  192.168.1.65  192.168.1.158 ServerA /share/library  192.168.1.65  192.168.1.61  192.168.1.155 ServerB /share/tools    192.168.1.158 192.168.1.159 ServerD /share/misc     192.168.1.7 .. ... ..... .......   To this, in a new worksheet:  Filer   ShareName       IPAddress ServerA /share1/tools   192.168.1.52 ServerA /share1/tools   192.168.1.65 ServerA /share1/tools   192.168.1.158 ServerA /share/library  192.168.1.65  ServerA /share/library  192.168.1.61  ServerA /share/library  192.168.1.155 ServerB ... ... ServerD ... ... .. ... ..... ....... $|p(z)| \leq M$ for $|z| \leq 1$ Show that $|p(z)| \leq M|z|^n$ for $|z| \geq 1$ Proving inequality $(a+\frac{1}{a})^2 + (b+\frac{1}{b})^2 \geq \frac{25}{2}$ for $a+b=1$ Complex numbers - Exponential numbers - Proof Let $z$ be a complex number, and let $n$ be a positive integer such that $z^n = (z + 1)^n = 1$. Prove that $n$ is divisible by 6.  For this problem I am stumped...how should I begin? Also there's a hint for it:  From $z^n = 1$, prove that $|z| = 1$. What does the equation $(z + 1)^n = 1$ tell you? What do the resulting equations tell you about $z$?  Could someone give me a hint on where to begin? thanks in advance XeLaTeX update [20201004] and item ball in Beamer Beamer item balls go missing while compiling in XeLateX since yesterday's TeXlive update, however, the same code works with pdfLaTeX. Any solution, please. Here is my MWE: \documentclass{beamer}  \setbeamertemplate{itemize item}[ball] \setbeamertemplate{enumerate item}[ball]  \begin{document}  \begin{frame} \frametitle{A tested title} text \begin{enumerate}     \item this is an item \end{enumerate} text3 \begin{itemize}     \item this is an item \end{itemize} \end{frame} \end{document} How can I bring STAG back if I have 100% completion? There's a couple of the Saintsbook challenges that require you to have STAG forces available to kill.  After you complete the game, however, the STAG forces are nowhere to be found.  I believe that you can fight a few more STAG forces if you replay the final mission, but I think my save is glitched, so that's not an option.    Is there any way post-game completion to bring STAG back?  I miss their much nicer tanks and VTOLs for hijacking :( Footnotes in tables? I would like to have footnotes in tables, but the \footnote command does not work inside a table environment.  Googling one finds that this is , at least in the UK.  That link contains a list of solutions to the problem, but since the author of the FAQ does not believe that this is good style, no comparison is made between the different methods.  I am sure that there are good typographical reasons why in most situations it is undesirable to have footnotes in tables (although I have never come across them), however I have recently felt the need to do just this in a paper I am currently writing.  Therefore I'd like to ask two questions:   What are the arguments against footnotes in tables? If one really must go against the advice in 1., which method (whether considered in the  or not) would you recommend?   Thanks in advance.  Added  In response to ShreevatsaR's comment: I do not much care for where the text of the footnote appears.  I do however insist on the footnote marks being attached to the relevant entries in the table, so that I can avoid having to reference "the second entry in the eighth line of the table", etc... I was wondering how far in imaging physics had gotten. Do we hold the technology to actually take a picture of, say, an alpha particle, or even a single atom?  I realise we aren't talking about camera pictures, so what kind of imaging techniques have taken images/is most likely to be the technique to take an image of a single atom? In other words, are $\emptyset$ and $\mathbb{R}$ the only open and closed sets in $\mathbb{R}$? Why/Why not?  I tried by assuming a set is equal to its interior points and contains its limit points.  A bounded set will not do since stuff like $[1,4]$ and $\{5\}$ will not work, though that is not really proof. Help please?  Anyway, it must then be unbounded.  If $a$ is a real number then $(a,\infty)$, $(-\infty,a)$, $[a,\infty)$ and $(-\infty,a]$ don't seem to cut it so it must be $\mathbb{R}$. Is it possible to browse a chatroom under invisible mode? E.g.  I know that I can browse the chat when I'm not logged on. But what if I am logged on and want to spare the inconvenience of logging off/multiple browsers? How do I print bold text in Python? When/Why Did Love Escape Voldemort? We know that Voldemort does not love. He does not understand it, nor (generally) the magic that it possesses. He knows  of the sort.  [...] &quot;you possess in such quantities and which Voldemort has not at all.&quot; [...] &quot;because he could not bear to reside in a body so full of the force he detests. In the end, it mattered not that you could not close your mind. It was your heart that saved you.&quot; (Harry Potter and the Order of the Phoenix, page 1075)  The above confirms it (although I believe there is a better quote), though  reinforces it. The fact that he hugs so awkwardly shows that he does not really know how, due to his lack of love. I realize that Voldemort's appearance started to change after he started to create Horcruxes, but surely he had an ounce of love when he was a child? The hugging scene perhaps shows that he never once loved his whole life (possibly due to the love potion with his parents?). If so, when did Voldemort begin to have no love at all, and why? For whatever reason, the "Open With" context menu in Finder is always listing every app four times (exactly).     I've read about (and tried) rebuilding the Launch Services database to restore the context menu to its initial state, but nothing seems to work. I've also used Onyx.app to clear user and system caches, but I'm still left with four repetitions of each app under the "Open With" service. I have restarted the system a few times just to be sure it was not some temporary corruption of the list.  I'm running OS X 10.6.6 on a 2011 17" MacBook Pro with a fresh install of OS X (i.e. I didn't use Migration Assistant.app or a Time Machine backup). I did, however, sync all my preferences and other files using MobileMe like I always do, so I imagine it's feasible that a preference file somewhere is causing problems? I didn't notice whether this was happening before or after my MobileMe sync.  How can I fix this so one app shows? How do I make an HTML text box show a hint when empty? I want the search box on my web page to display the word "Search" in gray italics. When the box receives focus, it should look just like an empty text box. If there is already text in it, it should display the text normally (black, non-italics). This will help me avoid clutter by removing the label.  BTW, this is an on-page  search, so it has no button.