Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #38350
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2018-06-06 10:34 -0700 |
| References | (8 earlier) <14ff2945-949d-4fed-b20c-ac13b3bcc64c@googlegroups.com> <57892d98-9bc1-4096-9003-bb237486c737@googlegroups.com> <slrnphf83c.abg.avl@logic.at> <107fab93-d13c-46e0-a677-49aa96cd8756@googlegroups.com> <eaf6c76a-3643-48d1-82ed-0e956feac402@googlegroups.com> |
| Message-ID | <c70674ec-ed1c-4074-9919-9e5cc8599c84@googlegroups.com> (permalink) |
| Subject | Re: Can Java compute 9^(9^9) ? |
| From | bursejan@gmail.com |
Maybe should try to switch to use this gem: "This code has been merged into OpenJDK 8 except for the Schönhage-Strassen and Barrett algorithms which are planned for OpenJDK 9." https://github.com/tbuktu/bigint Oki Doki Am Mittwoch, 6. Juni 2018 11:02:04 UTC+2 schrieb burs...@gmail.com: > Corr.: > I did another test right now, with pow/3, it > > Am Mittwoch, 6. Juni 2018 10:58:44 UTC+2 schrieb burs...@gmail.com: > > No, no, they are not that smart, _ is not some functional > > programming lazy, it only instructs the top-level to not > > show the result. I can 100% assure you that. > > > > Storing the result in on the other hand in a file takes > > like 2 minutes. For the 8.5 secs blinding fast calculation, > > I get file size 369'693'102 bigpow999.txt, so the calculation > > > > is possibly corrrect. > > > > See also here, the Edit 06.06.2018: > > https://math.stackexchange.com/a/2809007/4414 > > > > Its more the problem that Java probably doesn't implement > > FFT multiplication, and the problem is above the threshold > > where FFT would make sense. Or its some other problem > > with GC, dunno yet. > > > > I didn't another test right now, with pow/3, it > > shows that Java gets increasingly slower, whereby > > GNU keeps the runtime for multiplication down: > > > > Java, the (A*A)*B step measured: > > > > % Up 1,059 ms, GC 14 ms, Thread Cpu 1,031 ms (Current 06/06/18 10:07:54) > > % Up 2,320 ms, GC 11 ms, Thread Cpu 2,297 ms (Current 06/06/18 10:07:56) > > % Up 5,852 ms, GC 27 ms, Thread Cpu 5,812 ms (Current 06/06/18 10:08:02) > > % Up 15,949 ms, GC 179 ms, Thread Cpu 15,782 ms (Current 06/06/18 10:08:18) > > % Up 45,419 ms, GC 540 ms, Thread Cpu 44,796 ms (Current 06/06/18 10:09:03) > > % Up 116,740 ms, GC 1,234 ms, Thread Cpu 115,235 ms (Current 06/06/18 10:11:00) > > % Up 326,318 ms, GC 2,266 ms, Thread Cpu 323,765 ms (Current 06/06/18 10:16:26) > > > > GNU, the (A*A)*B step measured. > > > > % 2 inferences, 0.047 CPU in 0.047 seconds (100% CPU, 43 Lips) > > % 2 inferences, 0.094 CPU in 0.109 seconds (86% CPU, 21 Lips) > > % 2 inferences, 0.203 CPU in 0.219 seconds (93% CPU, 10 Lips) > > % 2 inferences, 0.438 CPU in 0.484 seconds (90% CPU, 5 Lips) > > % 2 inferences, 0.875 CPU in 0.984 seconds (89% CPU, 2 Lips) > > % 2 inferences, 1.828 CPU in 2.062 seconds (89% CPU, 1 Lips) > > % 2 inferences, 3.859 CPU in 4.202 seconds (92% CPU, 1 Lips) > > > > Am Mittwoch, 6. Juni 2018 10:51:05 UTC+2 schrieb Andreas Leitgeb: > > > bursejan@gmail.com <bursejan@gmail.com> wrote: > > > > The 8.5 secs are plausible. I already tested another > > > > system, which could do it in around 20 secs. > > > > > > > > ECLiPSe Constraint Logic Programming System [kernel threads] > > > > Version 7.0 #36 (x86_64_nt), Sun Jan 28 10:18 2018 > > > > > > > > [eclipse 2]: _ is 9^(9^9). > > > > Yes (20.09s cpu) > > > > > > > > So the magnitude of this time measure is plausible. > > > > I did not double check the result, the 370 mio digits. > > > > > > > > Not sure whether I should check the result.. > > > > > > Maybe, both SWI-Prolog and ECLiPSe are both smart in detecting > > > and avoiding calculations "assigned" to "_". > > > > > > Unless you can store the result in a variable and query some > > > properties of it for checking it might just have skipped some > > > of the calculations.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Can Java compute 9^(9^9) ? bursejan@gmail.com - 2018-06-01 10:20 -0700
Re: Can Java compute 9^(9^9) ? Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-06-01 13:36 -0400
Re: Can Java compute 9^(9^9) ? j4n bur53 <janburse@fastmail.fm> - 2018-06-01 20:20 +0200
Re: Can Java compute 9^(9^9) ? bursejan@gmail.com - 2018-06-05 07:17 -0700
Re: Can Java compute 9^(9^9) ? bursejan@gmail.com - 2018-06-05 07:29 -0700
Re: Can Java compute 9^(9^9) ? bursejan@gmail.com - 2018-06-05 07:48 -0700
Re: Can Java compute 9^(9^9) ? Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-06-05 10:57 -0400
Re: Can Java compute 9^(9^9) ? bursejan@gmail.com - 2018-06-05 09:32 -0700
Re: Can Java compute 9^(9^9) ? Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-06-05 13:58 -0400
Re: Can Java compute 9^(9^9) ? bursejan@gmail.com - 2018-06-05 11:10 -0700
Re: Can Java compute 9^(9^9) ? bursejan@gmail.com - 2018-06-05 11:21 -0700
Re: Can Java compute 9^(9^9) ? Andreas Leitgeb <avl@logic.at> - 2018-06-06 08:50 +0000
Re: Can Java compute 9^(9^9) ? bursejan@gmail.com - 2018-06-06 01:58 -0700
Re: Can Java compute 9^(9^9) ? bursejan@gmail.com - 2018-06-06 02:01 -0700
Re: Can Java compute 9^(9^9) ? bursejan@gmail.com - 2018-06-06 10:34 -0700
Re: Can Java compute 9^(9^9) ? j4n bur53 <janburse@fastmail.fm> - 2018-06-09 21:06 +0200
Re: Can Java compute 9^(9^9) ? v_borchert@despammed.com (Volker Borchert) - 2018-06-09 23:29 +0000
Re: Can Java compute 9^(9^9) ? Martin Gregorie <martin@mydomain.invalid> - 2018-06-10 09:13 +0000
Re: Can Java compute 9^(9^9) ? bursejan@gmail.com - 2018-06-10 02:31 -0700
Re: Can Java compute 9^(9^9) ? Arne Vajhøj <arne@vajhoej.dk> - 2018-06-10 18:28 -0400
Re: Can Java compute 9^(9^9) ? bursejan@gmail.com - 2018-06-10 15:48 -0700
Re: Can Java compute 9^(9^9) ? bursejan@gmail.com - 2018-06-10 15:52 -0700
Re: Can Java compute 9^(9^9) ? bursejan@gmail.com - 2018-06-10 15:58 -0700
Re: Can Java compute 9^(9^9) ? Arne Vajhøj <arne@vajhoej.dk> - 2018-06-10 21:17 -0400
Re: Can Java compute 9^(9^9) ? bursejan@gmail.com - 2018-06-11 13:20 -0700
Re: Can Java compute 9^(9^9) ? bursejan@gmail.com - 2018-06-14 13:37 -0700
csiph-web