title: High-precision random numbers on iOS
body: <p>I have been trying this for a while but thus far haven't had any luck.</p>
  
  <p>What is the easiest way to retrieve a random number between two very precise numbers on iOS?</p>
  
  <p>For example, I want a random number between 41.37783830549337 and 41.377730629131634, how would I accomplish this?</p>
  
  <p>Thank you so much in advance!</p>
  
  <p>Edit: I tried this:</p>
  
  <pre><code>double min = 41.37783830549337;
  double max = 41.377730629131634;
  double test = ((double)rand() / RAND_MAX) * (max - min) + min;
  NSLog(@"Min:%lf, max:%lf, result:%lf",min,max,test);
  </code></pre>
  
  <p>But the results weren't quite as precise as I was hoping, and ended up like this::</p>
  
  <pre><code>Min:41.377838, max:41.377731, result:41.377838
  </code></pre>