Recursive functions not working

Recursive functions not working - Recursive functions not working - Messaggi

#1 Pubblicato: 30/11/2022 08:53:58
S0lo

S0lo

0 apprezzamenti in 11 post.

Gruppo: User

I'm not sure, but I think I might have found a bug:

Noname.jpg

I remember this used to work before. Am I doing something wrong?
#2 Pubblicato: 30/11/2022 09:40:43
Arie

Arie

94 apprezzamenti in 285 post.

Gruppo: User

Wrote

I'm not sure, but I think I might have found a bug:

error

I remember this used to work before. Am I doing something wrong?



You need to use line operator in function definition.

2022-11-30 07_40_07-SMath Solver - [Worksheet1_].png

Edit: A note about recursion. I do believe that Andrey limited the recursion depth that can take place. I think its somewhere around 50.
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
1 utenti hanno apprezzato questo post
sergio 30/11/2022 11:16:00
#3 Pubblicato: 30/11/2022 09:48:02
Arie

Arie

94 apprezzamenti in 285 post.

Gruppo: User

Example of recursion limit.

2022-11-30 07_47_11-SMath Solver - [Worksheet1_].png
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#4 Pubblicato: 30/11/2022 14:11:53
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: User

Hi. Every CAS should have a recursion limit. The point would be to be able to control it, like in Mathematica: https://reference.wolfram.com/language/ref/$RecursionLimit.html

Best regards.
Alvaro.
1 utenti hanno apprezzato questo post
Arie 30/11/2022 21:21:00
#5 Pubblicato: 30/11/2022 15:21:42
S0lo

S0lo

0 apprezzamenti in 11 post.

Gruppo: User

Wrote

Wrote

I'm not sure, but I think I might have found a bug:

error

I remember this used to work before. Am I doing something wrong?



You need to use line operator in function definition.

2022-11-30 07_40_07-SMath Solver - [Worksheet1_].png

Edit: A note about recursion. I do believe that Andrey limited the recursion depth that can take place. I think its somewhere around 50.



Thanks!! How did I forget that. heh.

#6 Pubblicato: 30/11/2022 18:10:45
Jean Giraud

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: User

The Mathematica 4.0 Fibonacci recursion has Smath companion algo style.

Recursive Fibonacci.PNG
#7 Pubblicato: 30/11/2022 21:57:13
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: User

Wrote

The Mathematica 4.0 Fibonacci recursion has Smath companion algo style.

Recursive Fibonacci.PNG



That is not an example of recursion, that is an iterative method. Try googling something like "iterative vs recursive Fibonacci".

Alvaro.
2 utenti hanno apprezzato questo post
sergio 01/12/2022 11:41:00, Davide Carpi 01/12/2022 17:17:00
#8 Pubblicato: 01/12/2022 14:42:17
Jean Giraud

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: User

Maths Sqrt(x) Heron DEMO.sm (11,66 KiB) scaricato 1584 volta(e).
#9 Pubblicato: 01/12/2022 22:09:52
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: User

Wrote

Maths Sqrt(x) Heron DEMO.sm (11,66 KiB) scaricato 1584 volta(e).



Either.

recursive_versus_iterative.gif

recursive_versus_iterative.sm (40,78 KiB) scaricato 1654 volta(e).

Alvaro.
2 utenti hanno apprezzato questo post
NDTM Amarasekera 01/12/2022 23:01:00, churichuro 02/12/2022 01:00:00
  • Nuovi post
  • Nessun nuovo post