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

I wondering why Ruby's binary search uses infinity as the max to kick off the search, instead of max float.


The programmer wrote 'found_value = (0..Float::INFINITY).bsearch do'...




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

Search: