Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Stefan Weisskircher  
#1 Posted : 17 May 2021 10:01:01(UTC)
Stefan Weisskircher

Rank: Newbie

Groups: Registered
Joined: 23/07/2019(UTC)
Posts: 7
Germany
Location: Saarbrücken

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 (12kb) downloaded 3 time(s).






Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Ber7  
#2 Posted : 17 May 2021 10:20:37(UTC)
Ber7


Rank: Advanced Member

Groups: Registered
Joined: 15/07/2010(UTC)
Posts: 437
Man
Israel
Location: Beer-Sheva

Was thanked: 520 time(s) in 288 post(s)
Use the function eval()
eval.sm (12kb) downloaded 16 time(s).
Offline Stefan Weisskircher  
#3 Posted : 17 May 2021 10:43:54(UTC)
Stefan Weisskircher

Rank: Newbie

Groups: Registered
Joined: 23/07/2019(UTC)
Posts: 7
Germany
Location: Saarbrücken

Seems to work! Thank you for your fast response!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.