Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Andreas Leitgeb Newsgroups: comp.lang.java.programmer Subject: Re: Can Java compute 9^(9^9) ? Date: Wed, 6 Jun 2018 08:50:52 -0000 (UTC) Organization: A noiseless patient Spider Lines: 22 Message-ID: References: <34305606-daa5-444d-b64e-fb5d3b70e0bf@googlegroups.com> <759db7ea-c012-45d2-bcd4-57620cb082c8@googlegroups.com> <14ff2945-949d-4fed-b20c-ac13b3bcc64c@googlegroups.com> <57892d98-9bc1-4096-9003-bb237486c737@googlegroups.com> Reply-To: avl@logic.at Injection-Date: Wed, 6 Jun 2018 08:50:52 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="a691db1745ea9910744a1eb3389e0123"; logging-data="4134"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19m5+BUkmd2znAmY6MkoFbs" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:n5nB2fobNQ1OZn9ma0vGc3caOI4= Xref: csiph.com comp.lang.java.programmer:38347 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.