Re: Problem with php 5.2.4 on wamp5 ?



On 23 sep, 11:44, Anonymous <anonym...@xxxxxxxxxxxxxxx> wrote:
Christophe Charron wrote:

Hi,

is there a known bug on php 5.2.4 in wamp5 (http://www.wampserver.com/
en/index.php) about having different kinds of printing for some
numeric values.

This script works perfectly on an linux based server on internet but
doesn't on my local wamp5. (here is the screnshot)
http://test03.christophe-charron.org/public/php/2007_09_20/2007-09-22...

the 8100*1000 and 8200*1000 looks like "bizarre" but not 8099*1000 or
8201*1000!!
Any explanation ?

And sorry for my poor english, I'm french

The result is not bizarre it is absolutely correct. The only difference
is that it is written in scientific notation.

http://en.wikipedia.org/wiki/Scientific_notation

I don't know why one PHP version switches to scientific notation earlier
than the other, but that might have something to do with the precision
setting in php.ini.

; The number of significant digits displayed in floating point numbers.
precision = 14

Check whether precision is set to the same value on both servers.

Bye!

Hi,
when i say bizarre, it is because I dont understand why php displays
scientific notation for 8100.000*1000 or 8200.000*1000 and standard
notation for 8099.000*1000 or 8201.000*1000. I'd like to understand
that !
The localeinfo() are the same for both servers and precision is 12 in
both ini files.

--
Cordially,
Christophe Charron

.



Relevant Pages

  • Re: Proposal for an Improved Scientific Notation
    ... Proposal for an Improved Scientific Notation ... There are ABSOLUTELY reasons ... that you need more than two digits of precision. ...
    (sci.physics)
  • Re: Kids can do math better than x86 cpus.
    ... > When I went to secondary school I learned scientific notation and how to use ... > logarithms. ... >I was also taught the limits of precision, you answer can not be more precise ...
    (comp.arch)
  • Re: ES format
    ... >double precision scientific notation. ... Software Products Division ... User communities for Intel Software Development Products ...
    (comp.lang.fortran)
  • Re: how do I get more numbers past the decimal?
    ... significant digits of precision is *insufficient* ?? ... My math is pretty weak, so I looked this stuff up online ... and started playing around with it, using a simple PHP script to ... or is PHP shortening this? ...
    (comp.lang.php)
  • Re: [PHP] Working with internal data formats
    ... > having the bytes misinterpreted as a character string. ... Consider double the same as float; the two names exist only for historic reasons." ... which is the internal double precision float representation of the decimal value 99.99. ... how can I create a PHP variable whose value is 99.99? ...
    (php.general)