﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
23626	wp_convert_bytes_to_hr tests and NaN	soulseekah	SergeyBiryukov	"[1218/tests] were written for the `deprecated wp_convert_bytes_to_hr`, these tests are broken at least on 64-bit machines, at most - on all machines.

On 64-bit PHP (PHP_INT_SIZE == 8) floating point does not match expected output (gets 1022.9990234375MB). The last digits in floating point should not be depended upon due to these inaccuracies. Rounding in PHP < 5.3 is not an option either, since rounding mode was introduced later and different systems get different results (round up vs. round down by default). So perhaps looking at error and discrepancy would be a decent solution (maybe even less error 0.00001?).

Next [23440], in the function itself we get `(int)double(NAN`) result from feeding -1 and 0, which results in `$power` to be a huge negative number instead of 0. This results in both a Warning (undefined array index) being thrown, and the ""B"" missing in tests, i.e. expected ""NANB"" != ""NAN"" and expected ""0B"" != ""0"".

Related #19067"	defect (bug)	closed	normal	3.6	General		normal	fixed	has-patch	kovshenin
