Recursive functions not working

Recursive functions not working - Recursive functions not working - Poruke

#1 Objavljeno: 30. 11. 2022. 08:53:58
S0lo

S0lo

0 svidjanja u 11 postova.

Grupa: 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 Objavljeno: 30. 11. 2022. 09:40:43
Arie

Arie

94 svidjanja u 285 postova.

Grupa: 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 korisnika je svidelo ovu objavu
sergio 30. 11. 2022. 11:16:00
#3 Objavljeno: 30. 11. 2022. 09:48:02
Arie

Arie

94 svidjanja u 285 postova.

Grupa: 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 Objavljeno: 30. 11. 2022. 14:11:53
Alvaro

Alvaro

1.139 svidjanja u 1.805 postova.

Grupa: 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 korisnika je svidelo ovu objavu
Arie 30. 11. 2022. 21:21:00
#5 Objavljeno: 30. 11. 2022. 15:21:42
S0lo

S0lo

0 svidjanja u 11 postova.

Grupa: 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 Objavljeno: 30. 11. 2022. 18:10:45
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

The Mathematica 4.0 Fibonacci recursion has Smath companion algo style.

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

Alvaro

1.139 svidjanja u 1.805 postova.

Grupa: 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 korisnika je svidelo ovu objavu
sergio 1. 12. 2022. 11:41:00, Davide Carpi 1. 12. 2022. 17:17:00
#8 Objavljeno: 1. 12. 2022. 14:42:17
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Maths Sqrt(x) Heron DEMO.sm (11,66 KiB) preuzeto 1628 put(ova).
#9 Objavljeno: 1. 12. 2022. 22:09:52
Alvaro

Alvaro

1.139 svidjanja u 1.805 postova.

Grupa: User

Wrote

Maths Sqrt(x) Heron DEMO.sm (11,66 KiB) preuzeto 1628 put(ova).



Either.

recursive_versus_iterative.gif

recursive_versus_iterative.sm (40,78 KiB) preuzeto 1696 put(ova).

Alvaro.
2 korisnika je svidelo ovu objavu
NDTM Amarasekera 1. 12. 2022. 23:01:00, churichuro 2. 12. 2022. 01:00:00
  • Novi postovi
  • Nema novih postova