WordPress at a glance
function is not described

getid3_lib::Float2BinaryDecimal() public WP 1.0

{} It's a method of the class: getid3_lib{}

No Hooks.

Return

String. Nothing.

Usage

$result = getid3_lib::Float2BinaryDecimal( $floatvalue );
$floatvalue(float) (required)
-

Code of getid3_lib::Float2BinaryDecimal() WP 5.7.2

<?php
public static function Float2BinaryDecimal($floatvalue) {
	$maxbits = 128; // to how many bits of precision should the calculations be taken?
	$intpart   = self::trunc($floatvalue);
	$floatpart = abs($floatvalue - $intpart);
	$pointbitstring = '';
	while (($floatpart != 0) && (strlen($pointbitstring) < $maxbits)) {
		$floatpart *= 2;
		$pointbitstring .= (string) self::trunc($floatpart);
		$floatpart -= self::trunc($floatpart);
	}
	$binarypointnumber = decbin($intpart).'.'.$pointbitstring;
	return $binarypointnumber;
}