4 ms·
I wondering why Ruby's binary search uses infinity as the max to kick off the search, instead of max float.
by hohenheim 6y ago
I wondering why Ruby's binary search uses infinity as the max to kick off the search, instead of max float.
- rm445 6y agoThe programmer wrote 'found_value = (0..Float::INFINITY).bsearch do'...