Re: getting a double out of scientific notation

From: Date: Fri, 13 Oct 2000 00:30:53 +0000
Subject: Re: getting a double out of scientific notation
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-19923@lists.php.net to get a copy of this message
This might work--I haven't had an opportunity to test it. //$double is a number in scientific notation if(preg_match("/(\d\.\d+)E[+|-](\d+)/",$double,$regs)){ $double=pow(10,$regs[2])*$regs[1]; } http://www.artwells.com/ That which indicates nothing introduces everything. On Wed, 11 Oct 2000, Dean Hall wrote: > Does anyone know how I can get a double like '9.7128666293887E+16' out of > scientific notation into plain decimal notation without using bcmath > functions? > > Dean. > >

« previous php.general (#19923) next »