User blog comment:B1mb0w/Beta Function Code Version 4/@comment-24920136-20160519164811

You will never be fully rid of undesired values simply because no function can map reals to integers.