Infinite loop problem?

Infinite loop problem? - Сообщения

#1 Опубликовано: 06.08.2010 17:05:07
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Hello Andrey,

I think this should be a bug.
[MATH]f(x)←5+f(x)[/MATH]
[MATH]f(1)=#[/MATH]
This will not stop executing until it is interrupted. I think this is an infinite loop problem.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#2 Опубликовано: 06.08.2010 20:18:55
Andrey Ivashov

Andrey Ivashov

2269 сообщений из 3729 понравились пользователям.

Группа: Super Administrator

Hello.

Thank you. Will check this later.

Regards.
#3 Опубликовано: 18.08.2010 06:55:06
Greg Locock

Greg Locock

0 сообщений из 53 понравились пользователям.

Группа: User

what behaviour would you expect?

you are asking for 5+5+5....
#4 Опубликовано: 18.08.2010 07:27:35
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Wrote

what behaviour would you expect?

you are asking for 5+5+5....


Yes, Greg, that is the problem. We can have something like this:
[MATH lang=eng]f(x)←x[/MATH]
[MATH lang=eng]f(x)←f(x)/2[/MATH]
[MATH lang=eng]f(5)=2.5[/MATH]
But with this, we get in trouble.
[MATH lang=eng]f(x)←f(x)/2[/MATH]
[MATH lang=eng]f(5)=#@#[/MATH]
The question is - Does it to be the user's problem to interrupt such a calculation or to suppress it by an error message? I was not sure about it, and that was my doubt about "endless loop".

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#5 Опубликовано: 29.09.2010 18:11:03
Andrey Ivashov

Andrey Ivashov

2269 сообщений из 3729 понравились пользователям.

Группа: Super Administrator

Fixed.

#6 Опубликовано: 30.09.2010 03:10:33
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Hello Andrey,

Sorry for being persistent, but I think I was not precise enough. The previous calculation will work in SMath - there was not a problem.
But, try this:

The problem is that this will never stop, until we "Interrupt processing". My question was - Should it be left this way or should it be stopped by SMath.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#7 Опубликовано: 30.09.2010 08:52:55
Andrey Ivashov

Andrey Ivashov

2269 сообщений из 3729 понравились пользователям.

Группа: Super Administrator

This is also fixed. Now SMath Studio understands that it is not good practice to repeat substitution of the already substituted functions with the same names So one will not see infinite loops in such cases anymore.

Regards.
1 пользователям понравился этот пост
Radovan Omorjan 30.09.2010 09:05:00
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений