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 Rising Eagle  
#1 Posted : 15 December 2012 02:07:44(UTC)
Rising Eagle


Rank: Member

Groups: Registered
Joined: 14/12/2012(UTC)
Posts: 23
Location: Neverland

Was thanked: 15 time(s) in 9 post(s)
There is currently no way to show all variable dependencies that still exist in a given variable. The dynamic assistance (which is not permanent and is sometimes cumbersome) shows what variables are originally assigned to a variable but some variables may themselves be assigned dependencies later. Also, explicit dependencies are not seen in the -> calculation because any variables with a value substituted in will be lost in favor the calculated value of the -> output string. This makes debugging hard and causes a lot of confusion when making even simple math sheets. I request some feature that will identify any explicit dependencies that a variable may have at the current location in the sheet.

eg., a b c
a := 3
b := a
b -> 3
which is correct as b is not dependent on a, however

b := a
a := 3
b -> 3
is not correct because b is dependent on a and if a changes, so will b

a := 3
b := 4 + c + a
b -> 7 + c
is correct because b depends solely on c

b := 4 + c + a
a := 3
b -> 7 + c
is not correct because b depends both on a and c, but -> shows all substitutions

I would rather see in a dependency display (using => as the symbol to mean depends on)

b => 4 + c + a
=> (undefined) (3)
where the second line shows assigned values.

c := a
b := 4 + c + a
a := 5
b -> 14, c -> 5, a -> 5
is not correct because b depends on a, and also c depends on a but -> shows only the calculated result of all substitutions

I would rather see for the three separate inquiries:
b => 4 + a + a , c => a , a => 5
=> (5) (5) , => (5)

Or if the simplification routines are working right
b => 4 + 2a , c => a , a => 5
=> (5) , => (5)

If there is hierarchical dependency, show the dependency tree.
b := 4 + c + a
c := a
a := 5
b -> 14
b => 4 + c + a
=> (a) + (5)
=> (5)

For more complex formulas and expressions, it will be hard to format the equation in a visually clarifying way, but the tool will be very useful and well worth the effort to develop.

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

Offline mkraska  
#2 Posted : 15 December 2012 03:09:23(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,988
Germany

Was thanked: 1126 time(s) in 723 post(s)
I agree that some insight in what the symbolic engine does would be welcome.

Perhaps a sort of variable explorer window would be more handy than output to the sheet. Typically explorations would be made for debugging purposes and as such would be temporary items. May be, some config options for the dynamic assistent would be sufficient (e.g. limiting the substitution level used).

In cases like
b := a
a := 3
b -> 3
the result is just what I expect from a symbolic evaluation (simplification). Thus considering it being wrong or right might be a matter of taste.

Here is another proposal for display format of dependencies:
b -> a | a -> 3
This follows the handwriting format for making substitutions and might be understood by the nonmagic SMath users. One would see that changing a would affect b.


The previous post also reminds me of what was lost by using the same symbol for numeric and symbolic evaluation (the -> operator does not exist any more. Although still present in the arithmetics panel, it shows up as =. Thus, if you get strange results, the reason might be in hidden symbolic evaluation (you must go down the context menu to find out for a particular expression).

I am still failing in really understanding the symbolic evaluation rules of smath. Years ago I used to work with Derive and I can't remember having similar issues with name spaces and substitution surprises. Would be interesting to know what design intent is behind the substitution and namespace concept in SMath. Why does the line function create a separate namespace and function definitions with formal parameters do not (otherwise the formal parameter names inside the definitions would not matter, still they unfortunately do)? Where is the benefit that compensates for being different from usual concepts? To be very clear: I do not complain that there is no benefit, I am just unhappy that I did not find out yet...

Best regards, Martin Kraska

Edited by user 15 December 2012 03:24:21(UTC)  | Reason: Not specified

Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Rising Eagle  
#3 Posted : 16 December 2012 15:20:39(UTC)
Rising Eagle


Rank: Member

Groups: Registered
Joined: 14/12/2012(UTC)
Posts: 23
Location: Neverland

Was thanked: 15 time(s) in 9 post(s)
I have thought of a further extension to this idea based on my experience with excel. In excel (actually I use openoffice Calc), I can highlight a cell and see its formula and color coded highlights on all other cells connected to the formula. smath sheets become long and cumbersome. I would like to be able to highlight an expression and see color coded highlights on all the prior expressions in the global sheet that the highlighted expression directly depends on. If I could hyperlink to them (and hyperlink back), that would also be very useful. It may also be useful to draw lines from the highlighted expression to its ancestors. This would allow me to quickly assess the thinking that smath is going through when is makes its substitutions and calculations and allow me to discover inadvertent errors in the sheet (especially larger sheets) much more easily.
Offline kilele  
#4 Posted : 16 December 2012 15:46:10(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 132 time(s) in 113 post(s)
Hi, this is the F2 key feature you talked about in Excel:
Display the relationships between formulas and cells

I can't help mentioning my similar request for a new equal operator:
http://en.smath.info/for...definition.aspx#post6545
Offline kilele  
#5 Posted : 16 December 2012 22:29:39(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 132 time(s) in 113 post(s)
I was thinking of a feature more for documentation and checking errors than for examining complete dependencies, for example:
- when a teacher writes a resolved problem, this would be useful to avoid writing expansions by hand.
- when checking errors on specific expressions, this way one could set up the exact sequence of terms in the same order as the user entered an expresion, i.e. there wouldn't be symbolic simplifications made by smath.

I would like some additional equal operators to set up a user defined symbolic sequence, for example using some unicode signs (see other equal symbols on this javascript bookmarklet 'mathematical 2' symbols)

y ≡ A*x
I tell smath to remember the sequence in that exact order
when I call ≡ again I want it to output that exact expansion:
y ≡ A*x = 5*8 = 40
what if X had more dependencies whose expansions I want to show ?
then again we could use the ≡ operator
x ≡ 4*z
x ≡ 4*z = 4*2 = 8
If we wanted to make the entire expansion from y with a certain number of expansions, then we could type ≡(x..)
where ≡ is followed by the list of ≡definitions enclosed by parentheses.
y ≡(y,x)
would result in
y ≡ A*4*z = 5*4*2 = 40
SMath's Dynamic Assistance could show the definitions associated with the variable y on this example.

Edited by user 21 January 2013 16:36:52(UTC)  | Reason: Not specified

Users browsing this topic
Guest
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.