SwatI18N/SwatI18NLocale.php
protected function formatFractionalPart(
        $value,
        $fractional_digits,
        SwatI18NNumberFormat $format
    ) {
        if ($fractional_digits === 0) {
            $formatted_value = '';
        } else {
            $frac_part = abs(fmod($value, 1));
            $frac_part = round($frac_part * pow(10, $fractional_digits));
            $frac_part = str_pad(
                $frac_part,
                $fractional_digits,
                '0',
                STR_PAD_LEFT
            );

            $formatted_value = $format->decimal_separator . $frac_part;
        }

        return $formatted_value;
    }
protected function formatFractionalPart(
        $value,
        $fractional_digits,
        SwatI18NNumberFormat $format
    ) {
        if ($fractional_digits === 0) {
            $formatted_value = '';
        } else {
            $frac_part = abs(fmod($value, 1));
            $frac_part = round($frac_part * pow(10, $fractional_digits));
            $frac_part = str_pad(
                $frac_part,
                $fractional_digits,
                '0',
                STR_PAD_LEFT
            );

            $formatted_value = $format->decimal_separator . $frac_part;
        }

        return $formatted_value;
    }
protected function formatFractionalPart ( $ value , $ fractional_digits , SwatI18NNumberFormat $ format ) { if ( $ fractional_digits === 0 ) { $ formatted_value = '' ; } else { $ frac_part = abs ( fmod ( $ value , 1 ) ) ; $ frac_part = round ( $ frac_part * pow ( 10 , $ fractional_digits ) ) ; $ frac_part = str_pad ( $ frac_part , $ fractional_digits , '0' , STR_PAD_LEFT ) ; $ formatted_value = $ format -> decimal_separator . $ frac_part ; } return $ formatted_value ; }
Formats the fractional  part of a value

@param float $value the value to format.
@param integer $fractional_digits the number of fractional digits to
include in the returned string.
@param SwatI18NNumberFormat $format the number formatting object to use
to format the fractional digits.

@return string the formatted fractional digits. If the number of
displayed fractional digits is greater than zero, the
string is prepended with the decimal separator character
of the format object.
Formats the fractional part of a value