Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I ended up just doing a one op conversion. Multiply by a manually eked factor which is the maximum value which the maximum-source-value can be multiplied by and not make 1. That just minimises the gap at the end of the unit interval which is caused by the limited resolution. I judged its not possible to get too close to 1, so just found the biggest float factor which doesn't get to 1. If that last 0.9999... value has a larger chance of occurring than any of the lesser, that seems good to me for numerical purposes as it hides the shortfall of not being able to express 1< There will be irregularities in the meaning of the least significant bits anyway due to rounding 'noise'


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: