<div dir="ltr"><div>I guess it isn't a bug, overflow error is better than Inf, I just assumed that 4 ^ (4 ^ (4 ^ 4) ) would be still small enough to be in a Num. But it is one of those numbers whose digit count is roughly the universe's atom count.<br><br>Fast growing functions are fun, every time I read about them, I spend an hour plus in math site & wikipedia rabbit holes reading things I know nothing about.<br><br></div>See you tomorrow at the study session!<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">-y<br></div></div>
<br><div class="gmail_quote">On Sat, Apr 28, 2018 at 9:04 PM, Joseph Brenner <span dir="ltr"><<a href="mailto:doomvox@gmail.com" target="_blank">doomvox@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm not sure where you think the bug is there, Yary.   Do you get that<br>
this is supposed to be a function that grows insanely fast?   It works<br>
like:<br>
<br>
2 ^ 2<br>
3 ^ 3 ^ 3<br>
4 ^ 4 ^ 4 ^ 4<br>
5 ^ 5 ^ 5 ^ 5 ^ 5<br>
6 ^ 6 ^ 6 ^ 6 ^ 6 ^ 6<br>
<br>
(Heinlein used to say that that was the actual "number of the beast".)<br>
<br>
The emacs calc package agrees on the value for 3.<br>
I'm not sure if it'd call the value for 4 infinity, I wasn't willing<br>
to wait for it to finish.<br>
<br>
In perl6 I might do it like this:<br>
<br>
for (1 .. 4) -> $i {  # line 7<br>
    my $r = $i;<br>
    for (2 .. $i) {<br>
      $r = $i ** $r;   # line 10<br>
     }<br>
   print "$i: $r\n";  # line 12<br>
 }<br>
<br>
<br>
Running that it behaves similarly, throwing an overflow error.   It's<br>
funny that it reports three line numbers, though:<br>
<span class=""><br>
1: 1<br>
2: 4<br>
3: 7625597484987<br>
Numeric overflow<br>
</span>  in block  at /home/doom/End/Cave/Eye/bin/<wbr>davids_insane_func.pl6 line 10<br>
  in block <unit> at /home/doom/End/Cave/Eye/bin/<wbr>davids_insane_func.pl6 line 7<br>
<br>
Actually thrown at:<br>
  in block <unit> at /home/doom/End/Cave/Eye/bin/<wbr>davids_insane_func.pl6 line 12<br>
<div><div class="h5"><br>
<br>
<br>
<br>
On Sun, Apr 22, 2018 at 10:30 PM, yary <<a href="mailto:not.com@gmail.com">not.com@gmail.com</a>> wrote:<br>
><br>
><br>
> -y<br>
><br>
> On Sun, Apr 22, 2018 at 10:09 PM, David Christensen<br>
> <<a href="mailto:dpchrist@holgerdanske.com">dpchrist@holgerdanske.com</a>> wrote:<br>
>><br>
>><br>
>><br>
>> print join ' ', $_, f($_), "\n" for 1 .. 4;<br>
>><br>
>><br>
>> 2018-04-22 19:03:30 dpchrist@vstretch ~/sandbox/perl<br>
>> $ perl6 growth<br>
>> 1 1<br>
>> 2 4<br>
>> 3 7625597484987<br>
>> Numeric overflow<br>
>>   in sub f at growth line 6<br>
>>   in block <unit> at growth line 11<br>
>><br>
>> Actually thrown at:<br>
>>   in block <unit> at growth line 11<br>
><br>
><br>
> That looks like a bug- have you reported it? Not that I know where to<br>
> report/check for bugs...<br>
><br>
</div></div>> --<br>
> You received this message because you are subscribed to the Google Groups<br>
> "Vanity Alias - Joe Brenner" group.<br>
> To unsubscribe from this group and stop receiving emails from it, send an<br>
> email to <a href="mailto:doom%2Bunsubscribe@kzsu.stanford.edu">doom+unsubscribe@kzsu.<wbr>stanford.edu</a>.<br>
<div class="HOEnZb"><div class="h5">><br>
> ______________________________<wbr>_________________<br>
> SanFrancisco-pm mailing list<br>
> <a href="mailto:SanFrancisco-pm@pm.org">SanFrancisco-pm@pm.org</a><br>
> <a href="http://mail.pm.org/mailman/listinfo/sanfrancisco-pm" rel="noreferrer" target="_blank">http://mail.pm.org/mailman/<wbr>listinfo/sanfrancisco-pm</a><br>
><br>
</div></div><span class="HOEnZb"><font color="#888888">> --<br>
> You received this message because you are subscribed to the Google Groups<br>
> "Vanity Alias - Joe Brenner" group.<br>
> To unsubscribe from this group and stop receiving emails from it, send an<br>
> email to <a href="mailto:doom%2Bunsubscribe@kzsu.stanford.edu">doom+unsubscribe@kzsu.<wbr>stanford.edu</a>.<br>
><br>
</font></span></blockquote></div><br></div>