Overflow error in for loop

Overflow error in for loop - Сообщения

#1 Опубликовано: 30.08.2009 01:52:43
Greg Locock

Greg Locock

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

Группа: User

Using the factorial for loop example

I ran the for loop example, eg with the counter set to 173
a:=1
for i:1,i<173,i:=i+1
a:=a*i

a=


which gives a remarkably small answer without an error message


This software has great potential by the way, thank you.
#2 Опубликовано: 30.08.2009 10:39:14
Radovan Omorjan

Radovan Omorjan

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

Группа: Moderator

I think you are right. I also suppose it is a bug!
[LIVE width=457 height=408]http://smath.info/live/?file=604[/LIVE]
Try yourself, please
[MATH]173!=#[/MATH]
or
[MATH]173!—#[/MATH]
The error has been issued this time - overflow!.

Regards,
Radovan

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Опубликовано: 30.08.2009 11:02:56
Greg Locock

Greg Locock

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

Группа: User

Oh, sure I have no problem with the factorial function overflowing, what I didn't like was the absence of an error message in the little program. You have incidentally answered another puzzle, how to use the "for" keybutton. Cheers greg
#4 Опубликовано: 30.08.2009 11:16:21
Radovan Omorjan

Radovan Omorjan

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

Группа: Moderator

Wrote

Oh, sure I have no problem with the factorial function overflowing, what I didn't like was the absence of an error message in the little program.


A agree with you. Andrey will answer on this, for sure. Btw., I think he is rather busy at the moment. In a day or two a new release should be here.
Wrote

You have incidentally answered another puzzle, how to use the "for" keybutton.


You are welcome. Some things could be a problem at the beginning because there is no Help or Tutorial yet.
Btw., I hope you understood these two ways of "for" loop? The second one is obtained with "range" function. If not, let me know and I will give you a detailed explanation.

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

Andrey Ivashov

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

Группа: Super Administrator

Fixed. Thank you.

#6 Опубликовано: 30.08.2009 12:46:27
Radovan Omorjan

Radovan Omorjan

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

Группа: Moderator

Thank you
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#7 Опубликовано: 30.08.2009 18:19:10
Andrey Ivashov

Andrey Ivashov

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

Группа: Super Administrator

Finally, in order to avoid possible errors in the calculations below I've decided to forbid using variable, that caused an error.


Release will be available tomorrow in the midnight (01.09.2009).
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений