Dot product: Difference between revisions
Content added Content deleted
Line 1,924: | Line 1,924: | ||
object a1=each(a), b1=each(b) |
object a1=each(a), b1=each(b) |
||
// take type by first item in a() |
// take type by first item in a() |
||
long lowbound=dimension(a,1, |
long lowbound=dimension(a,1,0) |
||
sum=a#val(lowbound)-a#val(lowbound) |
sum=a#val(lowbound)-a#val(lowbound) |
||
While a1, b1 {sum+=array(a1)*array(b1)} |
While a1, b1 {sum+=array(a1)*array(b1)} |
||
Line 1,935: | Line 1,935: | ||
z(0)=4,-2,-1 |
z(0)=4,-2,-1 |
||
result=Dot(k(), z()) |
result=Dot(k(), z()) |
||
Print result=3, type$(result)="Long Long" |
Print result=3, type$(result)="Long Long" |
||
} |
} |
||
Module dot_product |
Module dot_product |