Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 3
    $\begingroup$ GeometricFunctions`BinarySearch[S, #] & /@ list1 almost does what you want. $\endgroup$ Commented Sep 1, 2017 at 16:38
  • $\begingroup$ Sidenote: Does BinarySearch really use binary search? Because the running time seems to increase linearly with the length of the list?? $\endgroup$ Commented Sep 1, 2017 at 18:28
  • $\begingroup$ Could you please clarify if you mean "first $s \in S$ with $s > l$" or "last $s \in S$ with $s <l$"? $\endgroup$ Commented Sep 1, 2017 at 20:23
  • $\begingroup$ i don't get why the first number for 6.0669 is at position 2 and not 1, do you mean the higher element of s such that s<l ? $\endgroup$ Commented Sep 2, 2017 at 3:50
  • $\begingroup$ Yes, I had a mistake in the description, hopefully it's clear now. $\endgroup$ Commented Sep 2, 2017 at 4:12