Zebra_Database::_fix_pow PHP Method

_fix_pow() private method

This function takes care of that and returns the number in the human readable format.
private _fix_pow ( $value )
    private function _fix_pow($value)
    {
        // use value as literal
        $value = (string) $value;
        // if the power is present in the value
        if (preg_match('/E\\-([0-9]+)$/', $value, $matches) > 0) {
            // convert to human readable format
            $value = '0.' . str_repeat('0', $matches[1] - 1) . preg_replace('/\\./', '', substr($value, 0, -strlen($matches[0])));
        }
        // return the value
        return number_format($value * 1000, 3);
    }