ID:               46232
 Updated by:       [EMAIL PROTECTED]
 Reported By:      butterfly110Pro at yahoo dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         MSSQL related
 Operating System: Windows 2003 Server R2
 PHP Version:      5.2.6
 New Comment:

Floating point values have a limited precision. Hence a value might 
not have the same string representation after any processing. That also
includes writing a floating point value in your script and directly 
printing it without any mathematical operations.

If you would like to know more about "floats" and what IEEE
754 is, read this:
http://docs.sun.com/source/806-3568/ncg_goldberg.html
 
Thank you for your interest in PHP.

.


Previous Comments:
------------------------------------------------------------------------

[2008-10-05 07:04:27] butterfly110Pro at yahoo dot com

Description:
------------
Salam,
When I Retrieving A Data From SQL Server With a Column that its Column
Type in SQL Server is Float, I See That Two Type of Numbers Shows,
1. Integer Or Floating Numbers With its Real Writing Style (e.g. 
1200001, 1.200001)
1. Integer (This is What Happened For Me!) Numbers With Scientific
Writing Style (e.g. 1200000 appeares 1.2E+6, 1400000 appeares 1.4E+6)
Fantastic Top That is This Appearance Diferrences Only Happens for (12
With More Than 5 Zeros, and 14 With More than 5 Zeros, I Try This For
1199999 and 1200001 But The Happen Didn't Happen!)

Reproduce code:
---------------
Select * From ATable

Expected result:
----------------
array(
 0 => array(
  FirstFloatColumn => 1199999,
  SecondFloatColumn => 1200000,
  ThirdFloatColumn => 1200001,

  FourthFloatColumn => 1399999,
  FifthFloatColumn => 1400000,
  SixthFloatColumn => 1400001,

  SeventhfFloatColumn => 1100000,
  EightthFloatColumn => 1300000,
  NinethFloatColumn => 1500000,
  TenthFloatColumn => 1600000,

  EleventhFloatColumn => 11999999,
  TwelvethFloatColumn => 12000000,
  ThirteenthFloatColumn => 12000001,

  FourteenthFloatColumn => 13999999,
  FifteenthFloatColumn => 14000000,
  SixteenthFloatColumn => 14000001,

 )
)

Actual result:
--------------
array(
 0 => array(
  FirstFloatColumn => 1199999,
  SecondFloatColumn => 1.2E+6,
  ThirdFloatColumn => 1200001,

  FourthFloatColumn => 1399999,
  FifthFloatColumn => 1.4E+6,
  SixthFloatColumn => 1400001,

  SeventhfFloatColumn => 1100000,
  EightthFloatColumn => 1300000,
  NinethFloatColumn => 1500000,
  TenthFloatColumn => 1600000,

  EleventhFloatColumn => 11999999,
  TwelvethFloatColumn => 1.2E+7,
  ThirteenthFloatColumn => 12000001,

  FourteenthFloatColumn => 13999999,
  FifteenthFloatColumn => 1.4E+7,
  SixteenthFloatColumn => 14000001,

 )
)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=46232&edit=1

Reply via email to