Please can anyone explain what's happening here? $num1 = 37.29; $num2 = 29.83; $exp1 = round(($num1-$num2)*100); // 746.0 =&gt; OK $exp2 = (($num1-$num2)*100); // 746.0 =&gt; OK $exp1 == $exp2; // false =&gt; expected TRUE 746.0 == 746.0; // true =&gt; OK  OK, perhaps it is the broken floating point math, but I need the most suitable function anyway. I'am trying to round_up prices in this way: 1.2345 Eur = 1.24 Eur 1.2567 Eur = 1.26 Eur but this behavior does me serious headache. Or is there any better way to round up the values? I need this function: function round_up(float $price, int $decimalPlaces = 2): float {...}  EDIT: I also try the ceiling() function (): $num1 = 37.29; $num2 = 29.83; ceiling(7.46, 0.01); // 7.46 =&gt; OK ceiling($num1-$num2, 0.01); // 7.47 =&gt; wrong!!!  EDIT2: This works but it's not very intuitive and do the math this way in the whole application would be bad: ceiling(ceiling($num1, 0.01) - ceiling($num2, 0.01), 0.01); // 7.46 =&gt; OK  Thanks
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Can a legendary creature use a legendary resistance to pass a concentration check? As I was looking through some legendary creatures, I had a thought. Most legendary creatures get three Legendary Resistances per day, which they can use to automatically succeed on a saving throw.  A Concentration check is technically a Constitution saving throw, so does that mean that a creature can use a Legendary Resistance to automatically pass a Concentration check, or is it not considered a saving throw? Can I install Python 3.x and 2.x on the same Windows computer? I find that at the end of a long day, I sometimes have a large number of programs running. All which I will need to use tomorrow. Normally, this isn't an issue, I can simply lock the machine and come back tomorrow. My problem arrises when windows update launches in the middle of the night and force restarts my computer. That in turns closes all my open software. I of course save everything regularly so I don't loose anything, but I waste time reopening all of those resources whenever there is a restart.   [EDIT]  I should clarify that I still want to be able to restart my computer when an update comes down. Preventing the restart only delays the problem until later. I should have been more specific in that I want to be able to recover my working environment after a restart for any reason. Things like scheduled maintence, power loss, updates, and software installs.  [EDIT]  I can't simply have them setup to launch at startup becasuse those files change from week to week. So I need something that monitors what I have open, and gives me the option to "recover" those software sessions when I log back in.  Anyone have any suggestions on what I can do? I'd even be willing to purchase software to do this for me if that is the only option.  Thanks Why do popular but not ideal questions keep being closed? I notice a really worrying trend of some really popular questions being closed and eventually deleted. Some of them became legends already, like this one  ? Yes, it does not fit the format ideally, but what is point of obeying the letter of the law to such extent that it becomes ridiculous? Ok, closing is fine if community leaders became so pedantic, but why go so far as to even delete it? At this point it looks like burning old pictures just because you don't like them.  Update: Summary  For now I heard only two clear arguments:   Those questions pollute search results.  Those questions don't play well with enforcing question and answer standards.   Both of that statements are easily verifiable and to my experience are just false. Comparison between bootstrap percentiles confidence interval and BCa confidence interval? I have generated a nonparametric percentiles bootstrap confidence interval ($32.27143, 51.08571$), and a BCA confidence interval ($33.26, 53.49$) with an initial sample size of $n=7$.  Evidently, the BCA interval is larger than the percentiles interval. Shouldn't the BCA interval be better than the percentiles interval (and by "better" I mean "smaller")? I noticed also that when the sample size is larger, for example $n=40$, BCa confidence interval decreases. I am writing a WP plugin. I have created a button for the user to click in thw WP dashboard. I need to run a function when a user clicks the button, shown with a red arrow. The code snippet for the button is:&lt;p&gt;&lt;button class="button button-primary"&gt;Update Media Titles and ALT Text&lt;/button&gt;&lt;/p&gt;. I have already created the function in my class like so:  public function kh_update_media_seo() {      //update media files title and alt tags here }   I can handle the code that goes in the function alone, I only need help making the button in the WP dashboard fire off this specific function when clicked.  Pardon me if this sounds dump or straight forward. It's my first time doing this.  My plugin is a one file plugin if that helps. FaceTime not working on iPhone 6 Plus purchased from Dubai I bought my iPhone 6 Plus in Dubai. I am using the phone in Sri Lanka and I cannot use the FaceTime. How can I use FaceTime while in Sri Lanka? Superscript outside math mode I have seen in American Sniper, Dead-7 and Carrie that when someone is killed, they are laying on the ground with blood leaking out of their back or somewhere else on the body.  The puddle continuously grows with few signs of slowing down. This is obviously not CGI because it is a real liquid (may not be real blood as that would spark an emergency in real life).   I have seen in American Sniper that when the protagonist kills yet another enemy, they are filmed hitting the ground and blood starts pooling around their body.  In Carrie: In the dance room where Carrie sets her powers loose and kills a lot of teenagers in the process, there are a few that hit the ground with blood pooling under their bodies. Sometimes they would be on their side with blood coming out.  In Dead 7: Kimono and the other six killed lots of zombies. Some of the six were killed in the process as well before they came to Apocalypta to kill her. They were filmed hitting the ground dead with blood pooling around them.  I am not sure how they film this as they are wearing thin shirts for these scenes, and not only that, but the characters also have blood (obviously fake) only just dripping out of the side of their mouths (an indicator they have a ruptured and wounded stomach or lung (in this case the blood would be pink and frothy).  What is the film technique that allows this to happen? A specific file on our production servers is being modified at apparently random times which do not appear to correlate with any log activity.  We can't figure out what program is doing it, and there are many suspects.  How can I find the culprit?  It is always the same file, at the same path, but on different servers and at different times.  The boxes are managed by , but the puppet logs show no activity at the time the file is modified.  What kernel hook, tool, or technique could help us find what process is modifying this file?    lsof is unsuitible for this, because the file is being opened, modified and closed very quickly.  Any solution that relies upon polling (such as running lsof often) is no good.      OS: Debian testing Kernels: Linux, 2.6.32 through 3.9, both 32 and 64-bit. I prefer to use bm package to bold math. However, I noticed that when used with eulervm, this gives inconsistent results for ‘&lt;’ and ‘>’ characters.  I wonder what causes it and can the usage bm be fixed to get proper ‘&lt;’.  \documentclass{article}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  %\usepackage{amsmath}  \usepackage[euler-digits,euler-hat-accent]{eulervm}  \usepackage{bm}  \begin{document}      \texttt{\hphantom{mathbold}\llap{bm}}: \quad $ 1 + 1 &lt; 3; \quad \bm{1 + 1 &lt; 3} $      \texttt{mathbold}: \quad $ 1 + 1 &lt; 3; \quad \mathbold{1 + 1 &lt; 3} $  \end{document} I'm making a map where I want players to be able to choose there kits/classes. The problem I'm having with it though is giving players already enchanted Tools/Armour/Weapons.  I'm not sure if you can use the /give [player] [item] [amount] because you'll have to use the whole {} thing and I'm not sure how to make enchanted Tools/Armour/Weapons using that.  Can anyone help? Consider the sum of $n$ uniform distributions on $[0,1]$, or $Z_n$. Why does the cusp in the PDF of $Z_n$ disappear for $n \geq 3$? I've been wondering about this one for a while; I find it a little weird how abruptly it happens. Basically, why do we need just three uniforms for $Z_n$ to smooth out like it does? And why does the smoothing-out happen so relatively quickly?  $Z_2$:     $Z_3$:    (images shamelessly stolen from John D. Cook's blog: )  Why doesn't it take, say, four uniforms? Or five? Or...? Why does my document 'error' when using '%' I am designing gamecards in LaTeX  Everything is going pretty ok so far but when i try to insert the %-sign for a question about percentages my file keeps giving errors.  I tried putting the percentage between dollarsigns because i know just % will make it a 'remark' and that the dollarsign makes it 'mathematical data'.   Whats the reason for the error?   P.s. the error says: file ended while scanning use of \kaart. ...    Codesample:   {\kaart{Bekijk statistiek kaart F:   Schat het percentage mensen dat als lievelingseten spaghetti opgaven, je mag er slechts $ 2% $ langs zitten. } { $ 11% $}} Invoking JavaScript code in an iframe from the parent page So from what I remember it was on cable TV. The main hero was a TV actor zapped to a alien planet. It had a evil overlord with a virgin priestesses. She wants to get laid but he refuses because the next priestesses is only three. Regardless it's a parody things include a man who was maimed by the evil overlord wants revenge the hero eventually screws the virgin priestesses it cuts to scenes of a train going into a tunnel and a volcano erupting. Show that $\ker \hat{T} = \text{ann}(\text{range } T)$ Error term in equally spaced nodes Using one group separator for integer part and another for decimal part (siunitx) I thought I was able to do something like this before, but I can't find my solution.  I would like to format my large numbers as follows:   12,504.3124 2359 3   I know I can use siunitx to partially set this up, but I'm not getting the results I want:  \documentclass{article} \usepackage{siunitx}  \newcommand\aenumA[1][4]{%%   \num[group-separator={,},        group-digits=integer,        ]}  \newcommand\aenumB[1][4]{%%   \num[group-digits=decimal,        ]}  \pagestyle{empty} \begin{document}    \aenumA{12504.312423593}    \aenumB{12504.312423593}  \end{document}   I would like a hybrid solution (commas in the integer part and spaces in the decimal).  I would actually also like to be able to group differently between the two: every three digits in the integer part, every four digits in the decimal part.  Is there a straight-forward way to do this with siunitx?  Or, do I need to split the number at the decimal and treat the two parts separately and then glue them back together? Why wasn't Sauron invisible when he wore the Ring? When Sauron is shown killing Elendil and then being destroyed by Isildur he is clearly not invisible and he is wearing the Ring.  But any time Bilbo or Frodo put on the Ring they went invisible without fail.  Did the Ring change after Sauron was destroyed or is Sauron capable of controlling the rings power unlike anyone else?