ranges

ranges - Сообщения

#1 Опубликовано: 03.05.2023 21:02:41
soomoon

soomoon

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

Группа: User

I am studying with Introduction to the use of SMath Studio Prepared by Gilberto E. Urroz, May 2010.

I don't understand something in ranges and would like some explanation.

Example1 is a definition error, and I'm curious how increment is defined in examples 2-4.

2023-05-04 09 01 47.png
#2 Опубликовано: 03.05.2023 21:34:54
Jean Giraud

Jean Giraud

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

Группа: User

Wrote

I am studying with Introduction to the use of SMath Studio Prepared by Gilberto E. Urroz, May 2010.
I don't understand something in ranges and would like some explanation.


By far obsolete for productive maths.
Think in term of ranging pi 0..0.1,pi ,,,
No matter how small ► can't never exactly end pi.

Utilities Discrete Algo Range Preferred Copy.sm (127 КиБ) скачан 23 раз(а).

#3 Опубликовано: 03.05.2023 22:34:30
overlord

overlord

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

Группа: Moderator

Wrote

Example1 is a definition error, and I'm curious how increment is defined in examples 2-4.


range() function has two sub functions.
One is with two, other with three parameters.

range() with two parameters has step 1 or -1.
It depends on whether a less or greater than b.

range() with three parameters is relation of start, stop and added.
added is equal to start+step. step can be negative or positive.
When added is greater than start, range will increase.
If added is less than start, range will decrease.

I hope picture below helps to clarify.

Regards.

2023-05-04_04-25.png
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений