Edit report at http://pear.php.net/bugs/bug.php?id=16899&edit=1
ID: 16899
Updated by: [email protected]
Reported By: bergie at iki dot fi
Summary: Pressure conversion from inHg to hPa calculated wrong
-Status: Open
+Status: Closed
Type: Bug
Package: Services_Weather
Operating System: Linux
Package Version: 1.4.5
PHP Version: 5.2.5
-Assigned To:
+Assigned To: eru
Roadmap Versions:
New Comment:
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: eru
This bug has been fixed in SVN.
If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should
be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
Thanks for the report!
Previous Comments:
------------------------------------------------------------------------
[2010-08-02 18:26:26] jespino
That is not a bug, is a precision problem, 1013.25 hPa is 29.9212725, no
29.92.
then 29.92 is 1013.20749904 (rounded to 1013.21)
and 29.9212725 is 1013.2505908362075 (rounded to 1013.25)
The function convertPressure round the result, but internaly all is ok.
------------------------------------------------------------------------
[2009-12-10 14:11:53] bergie
Description:
------------
Converting pressure from 29.92 inHg (the standard atmospheric pressure)
to hPa returns 1013.21, while correct would be 1013.25.
Reverse (hPa to inHg) works correctly.
Test script:
---------------
Services_Weather_Common::convertPressure(1013.25, 'hpa', 'in');
Expected result:
----------------
Returns 1013.25
Actual result:
--------------
Returns 1013.21
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=16899&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.