Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #34913
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Will Math.random return 0.0? |
| Date | Sat, 16 Jul 2016 12:49:33 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 20 |
| Message-ID | <nmdoj4$s2i$1@dont-email.me> (permalink) |
| References | <rand-20160716162126@ram.dialup.fu-berlin.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Sat, 16 Jul 2016 16:49:41 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="e2ba9259a23cbf39c20975fbc1121d9b"; logging-data="28754"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19LIdD8NxiGYb5+JVccYIrX" |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
| In-Reply-To | <rand-20160716162126@ram.dialup.fu-berlin.de> |
| Cancel-Lock | sha1:gNCnL3UzHD1OrQxSIitnZThXu5U= |
| Xref | csiph.com comp.lang.java.programmer:34913 |
Show key headers only | View raw
On 7/16/2016 11:24 AM, Stefan Ram wrote:
> I wrote the following program.
>
> public final class Main
> { public static void main( final java.lang.String[] args )
> { while( java.lang.Math.random() != 0.0 );
> java.lang.System.out.println( "0.0" ); }}
>
> What do you expect it's (average) runtime to be
> on average hardware?
Longer than my attention span.
> Can we be sure that it will ever terminate?
Yes.
--
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Will Math.random return 0.0? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-07-16 12:49 -0400
Re: Will Math.random return 0.0? Thomas Richter <thor@math.tu-berlin.de> - 2016-07-16 18:53 +0200
Re: Will Math.random return 0.0? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-07-16 13:11 -0400
Re: Will Math.random return 0.0? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-07-17 08:06 -0400
Re: Will Math.random return 0.0? Arne Vajhøj <arne@vajhoej.dk> - 2016-07-16 14:17 -0400
csiph-web