$bytes cannot do it even for extremely small number,if you want to support decimals, only regex will do a great job. For integer only, then $bytes will do the trick... until you use a very large integer.
With large integer, by default $bytes will stop being 'accurate' at the 2^53 limit. You could enable bigfloat, but that will make it slower AND is that is still limited (a much much larger value than 2^53 but still limited) whereas doing the operation on the string, via regex for example, is extremely fast and should be the prefered method here.
Sat's demonstration:
https://forums.mirc.com/ubbthreads.php/ubb/showflat/Number/259070/ ($bytes(1000000000000000.09,db) returns 1,000,000,000,000,000.1)
alias insertcomma var %d $gettok($1,2,46),%r $regsubex($gettok($1,1,46),/(\d)(?=(\d{3})+$)/g,\1 $+ $chr(44)) | if (%d) return $+(%r,.,%d) | return %r
//echo -ag $insertcomma(653471830)
//echo -ag $insertcomma(653471830.2528507487)
653,471,830
653,471,830.2528507487