Error in element-wise calculation with nested functions

Error in element-wise calculation with nested functions - Сообщения

#1 Опубликовано: 17.05.2021 04:01:01
Stefan Weisskircher

Stefan Weisskircher

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

Группа: User

Hello,
the (very smart) element-wise calculation seems to be buggy if applied to nested functions. The result can be calculated correctly, but cannot be assigned to a new variable. I found this issue in a complex calculation and simplified it to the attached problem:
- A first function uses an if-statement to calculate the result
- A second funtion calls the first function and multiplies the result with "1"
If either the if-statement or the multiplication is removed, everything works fine. This seems to be strange...

Used SMath-version: 0.99.7610, but also with current Beta-version 0.99.7804

Example_elementwiseCalc.png

For own tests: TestElem.sm (11 КиБ) скачан 56 раз(а).






#2 Опубликовано: 17.05.2021 04:20:37
Fridel Selitsky

Fridel Selitsky

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

Группа: User

Use the function eval()
eval.sm (11 КиБ) скачан 67 раз(а).
#3 Опубликовано: 17.05.2021 04:43:54
Stefan Weisskircher

Stefan Weisskircher

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

Группа: User

Seems to work! Thank you for your fast response!
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений