Recursive functions not working

Recursive functions not working - Recursive functions not working - Mensajes

#1 Publicado: 30/11/2022 8:53:58
S0lo

S0lo

0 me gusta en 11 mensajes.

Grupo: 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 Publicado: 30/11/2022 9:40:43
Arie

Arie

94 me gusta en 285 mensajes.

Grupo: 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
A 1 usuarios les gustó este mensaje
sergio 30/11/2022 11:16:00
#3 Publicado: 30/11/2022 9:48:02
Arie

Arie

94 me gusta en 285 mensajes.

Grupo: 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 Publicado: 30/11/2022 14:11:53
Alvaro

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: 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.
A 1 usuarios les gustó este mensaje
Arie 30/11/2022 21:21:00
#5 Publicado: 30/11/2022 15:21:42
S0lo

S0lo

0 me gusta en 11 mensajes.

Grupo: 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 Publicado: 30/11/2022 18:10:45
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

The Mathematica 4.0 Fibonacci recursion has Smath companion algo style.

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

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: 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.
A 2 usuarios les gustó este mensaje
sergio 1/12/2022 11:41:00, Davide Carpi 1/12/2022 17:17:00
#8 Publicado: 1/12/2022 14:42:17
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Maths Sqrt(x) Heron DEMO.sm (11,66 KiB) descargado 1577 vez(es).
#9 Publicado: 1/12/2022 22:09:52
Alvaro

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: User

Wrote

Maths Sqrt(x) Heron DEMO.sm (11,66 KiB) descargado 1577 vez(es).



Either.

recursive_versus_iterative.gif

recursive_versus_iterative.sm (40,78 KiB) descargado 1648 vez(es).

Alvaro.
A 2 usuarios les gustó este mensaje
NDTM Amarasekera 1/12/2022 23:01:00, churichuro 2/12/2022 1:00:00
  • Nuevos mensajes
  • Sin mensajes nuevos