octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #63355] Increasing max_recursion_depth has no


From: Siegbert Steinlechner
Subject: [Octave-bug-tracker] [bug #63355] Increasing max_recursion_depth has no effect
Date: Sun, 13 Nov 2022 05:28:39 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?63355>

                 Summary: Increasing max_recursion_depth has no effect
                 Project: GNU Octave
               Submitter: sigi_s
               Submitted: Sun 13 Nov 2022 10:28:36 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 7.2.0
         Discussion Lock: Any
        Operating System: Microsoft Windows


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sun 13 Nov 2022 10:28:36 AM UTC By: Siegbert Steinlechner <sigi_s>
This is my recursive test function, which calculates the sum of 1 to x:
%-------------------------------------
function y=S(x)
  if x==0, y=0; else y=x+S(x-1); endif
endfunction
%-------------------------------------

The default value of max_recursion_depth is 256:
>> max_recursion_depth
ans = 256

>> S(253)
ans = 32131

>> S(254)
error: max_recursion_depth exceeded
error: called from
    S
    S at line 6 column 6

Increasing max_recursion_depth doesn't help:

>> max_recursion_depth=512
max_recursion_depth = 512

>> S(254)
error: max_recursion_depth exceeded
error: called from
    S
    S at line 6 column 6








    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63355>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]