Re: [ljc] A little Friday morning challenge for the group...

From: Michael R.
Sent on: Friday, January 25, 2013 1:13 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 25/01/13 11:43, Wesley Hall wrote:
> I will have to add to the requirements (which I probably should not
> have left implicit), that there must be at least a chance that any
> number in the range provided could be generated.

I guess that rules out solutions based on a single call to
Math.random(), since the number of double values between 0.0 and 1.0
is less than the number of long values between Long.MIN_VALUE and
Long.MAX_VALUE.

Cheers,
Michael

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJRAoTw­AAoJEBEET9GfxSfMQkEI­ALZbhZNudkYzBfo/Pgmx­B+qi
jUo+r2I5zPi/2aZRlmN0­HdgnC3x2tqHqEm1siEVA­A7CMEMZ0B7DYOMBQu11B­yG+B
8uuez8r5J9FORIgqw9Co­dr+sEvX+QrKajVGzV7ru­6i932s70+coSSN/8sqGY­IoqP
jhJcpwz6KV+SQwz+wVrs­d5GYMGTodbT0ed6GgWCq­lga9Irk0My7kim+O1i7h­574U
7l9vUDd4p5WuE3O/HzzH­ASONd2BU+qQLd4N8aWrW­nHXDfxdTZyBDEEd1yLm1­vgec
zyGObAGe9XkvAKKl1xNp­mb/Uaf1xP/c/6DM279uj­Swq5gHa8Qb71EDU/b3kw­qE8=
=PyBO
-----END PGP SIGNATURE-----

Our Sponsors

  • Our Blog

    Read the latest news from the LJC

  • RecWorks Ltd

    Fixing Tech Recruitment using the Power of Community

  • jClarity

    Java/JVM Performance Analysis Tools & mentoring for Java related matters

  • LJC Aggrity

    Our LJC Aggrity site contains blog posts from our members

  • LJC Book Club

    Our Book club with book reviews from our members

  • Devoxx UK

    Java Community Conference, in collaboration with the LJC 12/13 Jun 14

  • SkillsMatter

    "Host, help organise, promote, film many of our meetings."

  • Hazelcast

    Hazelcast is the leader in operating in-memory computing.

  • Packt Publishing

    A publishing company specializing on specific technologies and solutions

  • Java.Net

    We are an official Java User Group recognised by Oracle's JUG program

  • JRebel

    Free 3 month J-Rebel license.

  • O'Reilly

    40% discount on printed books and 50% on e-books.

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy