Dunno how to describe this and i'm not really sure if it is a bug or not but the result seems wrong to me.

Here the example:
$bytes(1000000000000000000000,3) returns: 9,094
$bytes(1000000000000000000000) returns: 909,494,701.77

And shouldn't $bytes(1,3) return 001?