1 страниц (6 вхождений)
bug in matrix function involving a double loop - Сообщения
#1 Опубликовано: 29.03.2022 12:52:52
Hello, there is a simple turnaround so it's not a big deal, but still... This looks like a bug...
Or is there something I didn't understand?
I like to see the numbers in my engineering calculations, that why I use matrices.
Thanks everyone for your help/advice,
Thank you Andrey for this incredible software.
Regards
Laurent
Файл не найден.Файл не найден.
Or is there something I didn't understand?
I like to see the numbers in my engineering calculations, that why I use matrices.
Thanks everyone for your help/advice,
Thank you Andrey for this incredible software.
Regards
Laurent
Файл не найден.Файл не найден.
#2 Опубликовано: 29.03.2022 15:10:10
It's not really a bug but a smath behavior. If you add an "eval" that forces the numerical evaluation of the nested producer, it works
bug(s).sm (6 КиБ) скачан 29 раз(а).
sergio
bug(s).sm (6 КиБ) скачан 29 раз(а).
sergio
1 пользователям понравился этот пост
Alvaro Diaz Falconi 30.03.2022 14:23:00
#3 Опубликовано: 29.03.2022 16:00:13
I'd still call it a bug. Is there any good reason why definition and display in separate cells behave differently from definition and display in the same cell?
There is no problem with def and display in different cells with the original definition (without eval). You also can use M:eval(sumofproduct(Ma))=
One would expect that the combination a:b=c would store b in a and then display a just as it would be displayed with a= in a subsequent cell.
Obviously this is not the case, either because
- there is a good reason from usage point of view (which I don't know) or
- there is a good reason from development point of view (e.g. too complicated to do it this way) or
- it is just a bug.
The error message "j not defined" is definitely a bug, why would one expect loop variables to require an additional definition.
In case the behaviour is too hard to fix, I would even recommend to remove the feature of display and def in the same cell. I know I was among those who asked for it many years ago but not at the cost of having to weave eval() into the sheet wherever it might help.
There is no problem with def and display in different cells with the original definition (without eval). You also can use M:eval(sumofproduct(Ma))=
One would expect that the combination a:b=c would store b in a and then display a just as it would be displayed with a= in a subsequent cell.
Obviously this is not the case, either because
- there is a good reason from usage point of view (which I don't know) or
- there is a good reason from development point of view (e.g. too complicated to do it this way) or
- it is just a bug.
The error message "j not defined" is definitely a bug, why would one expect loop variables to require an additional definition.
In case the behaviour is too hard to fix, I would even recommend to remove the feature of display and def in the same cell. I know I was among those who asked for it many years ago but not at the cost of having to weave eval() into the sheet wherever it might help.
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
2 пользователям понравился этот пост
#4 Опубликовано: 29.03.2022 16:24:05
Augmented version ... no red SS 6179
If you don't see or have red the 3 blocks,
please let me know for a snippet image.
Cheers ... Jean.
bug 6179.sm (39 КиБ) скачан 27 раз(а).
If you don't see or have red the 3 blocks,
please let me know for a snippet image.
Cheers ... Jean.
bug 6179.sm (39 КиБ) скачан 27 раз(а).
#5 Опубликовано: 29.03.2022 19:11:50
#6 Опубликовано: 30.03.2022 08:09:09
1 страниц (6 вхождений)
-
Новые сообщения
-
Нет новых сообщений