In general this is no problem.

We had an unit problem within temperatures in 1.0 but it was fixed in 1.0.1. You can search for the related issue in jira. In our testbed we tested with several values and checked them against two online conversion libraries.
For all tested measures we found no differences.

Of course we are not able to test all 4000 conversions which are avaiable in all measure classes. So it might be that somewhere there is a potential unit error (false conversion).

But if you have a problem with something it's always better to provide some code to verify instead of saying "this should not work". ;-) And if you have a problem you are always free to open an jira issue and you will get a proper response when you provide proper data ;-)

Greetings
Thomas
I18N Team Leader

----- Original Message ----- From: "Belmin" <[EMAIL PROTECTED]>
To: "ZendFW - General List" <[email protected]>
Sent: Tuesday, August 07, 2007 7:23 PM
Subject: [fw-general] Measure library - Conversions


I was trying to figure out the problem I've had with converting
temperatures and came across what might be an issue. Seems too
'obvious' so I might be totally off but:

While looking at Measure/Abstract.php I realized that in the setType()
function when converting to expected type FROM standard type, as
oppose to going through the operations in reverse, it does it in the
same order as converting TO standard type (although correctly, it does
the opposite operation). Correct me if I'm wrong but isn't this
incorrect math?

For example: When converting from Celsius to Fahrenheit, this function
correctly gets the standard measurement (Kelvin) but then to go from
Kelvin to Fahrenheit it traverses the Fahrenheit conversion array
($this->_UNITS[FAHRENHEIT][0]) in this order:

subtract 459.67
multiply by 1.8

This is incorrect. Should be:

FIRST multiply by 1.8
THEN subtract 459.67

I previously asked about this function but incorrectly assumed that it
was the numbers in the calculations not the order of operations.

Let me know if I'm off (which would be sad being that I am a Math minor).

--Belmin

Reply via email to