Skip to content

The 1.1.9.964 New Release

July 2, 2010

you may wondering why is this long long version number

actually I don’t want to reach 1.2 soon, thats why I slow down in my releases counting

especially that I am still in ALPHA release

the new release is featuring  the new symbolic quantity concept which makes you do calculations with symbolics like mathematica and maxima BUT with my point of view of units

to declare a symbolic quantity you precede it with dollar sign ‘$’ and any number of charachters

$x+$y   is a valid expression for x plus y

lets have some fun

make a rank two matrix

h = [$x<in> $y<ft>; 4<fm> 3<mm>]

ofcourse <fm> is Femto Meter  😉

get the determinant

Qs> |h| 

Area: 3*x-4.8E-11*y <in.mm>

What about 3 ranked matrix

Qs> m = [$x<in> $y<ft> $z<pm>; 4<fm> 3<mm> 2<yd>; $u<m> $v<ft> $w<rod>]

Qs> |m|

Volume: 3*x*w-110.836363636364*x*v+4363.63636363636*y*u-4.8E-11*y*w+9.54426151276544E-24*z*v-2.34848954546393E-11*z*u <in.mm.rod>

This release also feature a tensor support

the tensor syntax will use ‘<|’  ‘|>’  which I don’t have a names for them now

as I understand (because I am not sure) I was reading the global relativity theory of Einstien (and I repeat I am not sure if  I got it right)  that Tensor is the ability to transfer your point of view from local co-ordinates into another reference co-ordinates

so that when you look into a matrix for example you see it as a square or rectangle

and to go into z-direction you have to use a tensor view like a cube (this is the 3rd order tensor)

however to go into more reference like 4th order tensor you need some sort of recursive representation for this problem

I found that I can use some sort of recursive magic in syntax

for tensor of matrix resemblance you can use the same matrix syntax

T2 = <| 3 4; 8 9 |> 

go into 3rd order tensor

T3 = <| 3 4; 8 9 | 8 7; 3 2|>

go into 4th order

T4 = <| <| 3 4; 8 9 | 8 7; 3 2|> | <| 3 4; 8 9 | 8 7; 3 2|> |>

or

T4 = <| T3 | T3 |>

and yes in storing this in memory I use a lot of inner objects (remember that I didn’t think about performance yet )

etc the 5th and 6th orders to the degree you want

BUT 😦

all sources I read is only dealing with tensor of 2nd order

Needless to say how I get frustrated to understand what the heck is the tensor it really is (but it exists).

covariant, and contra variant vectors and tensors (some help needed here)
Another confusing thing (made my head spin)

If you make a vector, don’t safely consider it a first order tensor, also tensor of first order is NOT a vector

(I don’t know the validity of previous statement)

how is this differ in quantity system

make two vectors

v1 = {3 4 6}

v2 = {9 8 3}

multipy them tensorial ‘(*)

Qs> v1 (*) v2
    QsMatrix:
       27 <1>        24 <1>         9 <1>
       36 <1>        32 <1>        12 <1>
       54 <1>        48 <1>        18 <1>

Great isn’t it

However what about tensor from the first order

Qs> tv1 = <|3 4 6|>
    QsTensor: 1st Order
        3 <1>         4 <1>         6 <1>

Qs> tv2 = <|9 8 3|>
    QsTensor: 1st Order
        9 <1>         8 <1>         3 <1>

Qs> tv1*tv2
    QsTensor: 2nd Order
       27 <1>        24 <1>         9 <1>
       36 <1>        32 <1>        12 <1>
       54 <1>        48 <1>        18 <1>

The difference is that ordinary tensor multiplication is different than the tensorial product of mathematical types other then the tensor.

The first one you have to use ‘(*)’ explicitly and the result was matrix

The second one you only used ‘*’ for multiplication and the result was a tensor from the 2nd order (and it called dyadic product)

another headache product called (kronecker product) for matrices

Try this

Qs> fm = [1 2; 3 4]
    QsMatrix:
        1 <1>         2 <1>
        3 <1>         4 <1>

Qs> sm = [0 5; 6 7]
    QsMatrix:
        0 <1>         5 <1>
        6 <1>         7 <1>

Qs> fm (*) sm
    QsMatrix:
        0 <1>         5 <1>         0 <1>        10 <1>
        6 <1>         7 <1>        12 <1>        14 <1>
        0 <1>        15 <1>         0 <1>        20 <1>
       18 <1>        21 <1>        24 <1>        28 <1>

the result haven’t changed

Note: you may try two regular multiplication between 2nd order tensors but you will get an exception (because I didn’t implement it yet unless I understand)

About understanding all of these I didn’t imagine that I will go into all of this details (so I really walk into it as it appears to me)

I realized that (vectors, marices, and tensors) are another types of quantities

thats why their becomes a must if I would say.

what else ??

yep I tried to speed up things so I tweaked my parser and made a lot of improvements (but as an inner feeling something is not right, the speed is not satisfactory)

that was a long post as usual 🙂

good to write again 🙂  and see you safe and sound later 🙂

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: