Sorry for not using the correct terminology, the fact is I don't know what you'd call this sort of number so it's making it incredibly difficult to Google.  I want to multiply two numbers together and get the result back as just numbers, but I keep getting a string looking like this: float(8.6135096694932E+15). I need to export this in an XML file so I need a string containing just the numbers not this weird response I am currently getting.  Here is a very simple example:  var_dump(2005489*4294967297) //Actual Result: float(8.6135096694932E+15) //Desired Result: 8613509669493233   My question is simply. How can I multiple those two numbers together and get the desired result listed above?  For a bit more context of what i'm trying to do: I am given an ID, in this instance "2005489" and I need to generate a new ID based on a fermat numbering system, which basically seems to mean that it must be multiplied by "4294967297", I do not fully understand why since I am interacting with third party software. It seems simple enough, but I need to actually be able to print the string "8613509669493233" in an XML file, not the weird response i'm actually getting.  EDIT 2: Found another solution, very simple:  number_format($number, 0, '', '');   Found here:   EDIT: This has been marked as duplicate of this:   However I cannot see how that offers a solution. The only example is:  gmp_strval(gmp_init($n, 10), 2);   However this does not offer any resolution, here is an example:  $number = (string)(2005489*4294967297); $response = gmp_strval(gmp_init($number, 10), 2); var_dump($response); //0   Not using (string) results in:     gmp_init(): Unable to convert variable to GMP - wrong type
Ok, so PHP isn't the best language to be dealing with arbitrarily large integers in, considering that it only natively supports 32-bit signed integers. What I'm trying to do though is create a class that could represent an arbitrarily large binary number and be able to perform simple arithmetic operations on two of them (add/subtract/multiply/divide).  My target is dealing with 128-bit integers.  There's a couple of approaches I'm looking at, and problems I see with them. Any input or commentary on what you would choose and how you might go about it would be greatly appreciated.  Approach #1: Create a 128-bit integer class that stores its integer internally as four 32-bit integers. The only problem with this approach is that I'm not sure how to go about handling overflow/underflow issues when manipulating individual chunks of the two operands.  Approach #2: Use the bcmath extension, as this looks like something it was designed to tackle. My only worry in taking this approach is the scale setting of the bcmath extension, because there can't be any rounding errors in my 128-bit integers; they must be precise. I'm also worried about being able to eventually convert the result of the bcmath functions into a binary string (which I'll later need to shove into some mcrypt encryption functions).  Approach #3: Store the numbers as binary strings (probably LSB first). Theoretically I should be able to store integers of any arbitrary size this way. All I would have to do is write the four basic arithmetic functions to perform add/sub/mult/div on two binary strings and produce a binary string result. This is exactly the format I need to hand over to mcrypt as well, so that's an added plus. This is the approach I think has the most promise at the moment, but the one sticking point I've got is that PHP doesn't offer me any way to manipulate the individual bits (that I know of). I believe I'd have to break it up into byte-sized chunks (no pun intended), at which point my questions about handling overflow/underflow from Approach #1 apply.
I want to know the general formula for $\sum_{n=0}^{m}nr^n$ for some constant r and how it is derived.  For example, when r = 2, the formula is given by: $\sum_{n=0}^{m}n2^n = 2(m2^m - 2^m +1)$ according to   Thanks! How do I restore a Places folder I accidentally deleted in Nautilus? I accidentally deleted my Documents folder and didn't notice it for a couple days. Somewhere in that time, Nautilus auto-updated my list of Places so it no longer includes my Documents folder. I have since restored my Documents folder, but the Places link is still missing. How do I get it back? PCA on correlation or covariance? In simple terms, what is the purpose of flush() in ostream Open program/windows on specific monitor Is there a way to tell Windows on which monitor it should open a windows  independently of where it was closed? Let $a$, $b$, and $c$ be integers, where a $\ne$ 0. Then $$ $$ (i) if $a$ | $b$ and $a$ | $c$, then $a$ | ($b+c$) $$ $$ (ii) if $a$ | $b$ then $a$|$bc$ for all integers $c$; $$ $$ (iii) if $a$ |$b$ and $b$|$c$, then $a$|$c$.  Prove that if $a$|$b$ and $b$|$c$ then $a$|$c$ using a column proof that has steps in the first column and the reason for the step in the second column.  My book is really vague. I'm not really sure what to do..  First I was thinking something like this: $a\mid b\Rightarrow b=as$ and  $b\mid c\Rightarrow c=bt$ and $a\mid c\Rightarrow c = au$ $$ $$ $b + c + c = b + 2c$  $$ $$ $=as + 2(bt+au)$  Yea then I just got lost. How to show $\lim_{x \to 1} \frac{x + x^2 + \dots + x^n - n}{x - 1} = \frac{n(n + 1)}{2}$? I need another LP-E5 type battery for my Canon 450D. Should I buy an original Canon battery or one of the many generic brands available? There are loads of cheapos on , for example.  I should add that the new battery will be added to my existing Canon battery in a battery grip.  Does anyone have any experience (good or bad) of using generic batteries? What is the procedure to load LAS files in QGIS 2.0.1? What is the present procedure to load LAS files in QGIS 2.0.1?  After some searching I found a paper outlining the procedure; however, it was for 1.8.something, and related posts here are all rather dated. How can I extract a page range / a part of a PDF? Do you have any idea how to extract a part of a PDF document and save it as PDF? On OS X it is absolutely trivial by using Preview. I tried PDF editor and other programs but to no avail. I would like a program where I select the part that I want and then save it as a PDF file with a simple command like CMD+N on OS X. I want the extracted part to be saved as PDF and not as JPEG, etc. I'd like to show/hide a column at runtime based on a particular condition. I'm using "Print when expression" to conditionally show/hide this column (and it's header) in my report. When the column is hidden, the space it would have occupied is left blank, which is not particularly attractive.  I would prefer if the extra space was used in a more effective manner, possibilities include:   the width of the report is reduced by the width of the hidden column the extra space is distributed among the remaining columns   In theory, I could achieve the first by setting the width of the column (and header) to 0, but also indicate that the column should resize to fit its contents. But JasperReports does not provide a "resize width to fit contents" option.  Another possibility is to generate reports using the Jasper API instead of defining the report template in XML. But that seems like a lot of effort for such a simple requirement. How to generate Bernoulli random variables with common correlation $\rho$? CSS3's attr() doesn't work in major browsers I have a Samsung Galaxy S5 duos with stock Android Marshmallow, and I'm considering encrypting my SD card to prevent access to its contents in case I lose my phone. The main reason of not doing this is that I'm not sure if there's a way to mount an encrypted SD card on Windows (or other desktop OS's)   When I encrypt the SD card on my Samsung Galaxy S5, is it using a known implementation of encryption, or is it something that only works on Android (or perhaps Samsung) phones?   I do not want to use USB connection to my phone to access my SD card, it's terrible. Mounting the SD card is much easier and faster and less annoying.   EDIT: just to clarify, I am NOT talking about adoptable storage. I want a portable encrypted SD card that can both be read on PCs and Android phones (i.e. I want to be able to remove the SD card from my phone, plug it into my PC, provide a password to decrypt and read/write it like any other SD card) Combinatorics riddle: keys and a safe There are 8 crew members, The leading member wants that only a crew of 5 people or more could open a safe he bought, To each member he gave equal amount of keys, and locked the safe with several locks.  What's the minimal number of locks he should put:   at least 5 crew members would be required to open the safe? Any team of 5 crew members could open the safe, but none of the 4 team crew members.   1,2 stands individually of course. Possible Duplicate:          On Windows I am able to switch between keyboard layouts by pressing Alt+Shift. Is there a similar keyboard shortcut in Ubuntu? "With who" vs. "with whom" Is this correct?     The person with whom I'm doing the project should be here soon.   If it is, is with always a dative preposition (like mit in German)? Integrating the inverse of a function. $f(x)$ is a strictly increasing, and continuous, function on $[0,+\infty)$. Consider the integral,  $$\int_0^a f^{-1}(x) dx.$$  Reasoning  The interval $[0,a]$ is "reflected" across the line $y=x$ onto the interval $0 \leq y \leq a.$  $f(x)$ and $f^{-1}(x)$ are symmetric across the line $y=x$. So, the integral is equivalent to the area bounded by $y = 0$, $y=a$, and $f(x)$.  So, "integrating $f$ along an interval on the $y$-axis" is the same as integrating $f^{-1}$ along the same interval on the $x$-axis?  Question  Is my reasoning correct? What is the purpose of using a FIFO vs a temporary file or a pipe? From APUE     FIFOs can be used to duplicate an output stream in a series of shell   commands. This prevents writing the data to an intermediate disk   ﬁle (similar to using pipes to avoid intermediate  disk  ﬁles).       But  whereas  pipes  can  be  used  only  for  linear  connections   between processes, a FIFO has a name, so it can be used for   nonlinear connections.      Consider  a  procedure that  needs  to  process  a  ﬁltered  input    stream  twice.   mkfifo fifo1 prog3 &lt; fifo1 &amp; prog1 &lt; infile | tee fifo1 | prog2       We create the FIFO and then start prog3 in the background, reading   from the FIFO. We then  start prog1 and  use tee to  send  its  input    to  both  the  FIFO  and prog2.    How does a FIFO "duplicate an output stream in a series of shell commands"? Isn't this done by tee instead of a FIFO? In the example, mkfifo fifo1 creates a file in the current directory, and fifo1 seems replaceable with a regular file . So what is the point of a FIFO "prevent writing the data to an intermediate disk file"? What do "linear connections" and "nonlinear connections" between processes mean? What does it mean that a FIFO can be used for nonlinear connections, while a pipe can be only used for linear connections between processes?   Thanks. Why do non-constant periodic functions have no limit at infinity?