Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
20
Task/Vector-products/EchoLisp/vector-products.echolisp
Normal file
20
Task/Vector-products/EchoLisp/vector-products.echolisp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
(lib 'math)
|
||||
|
||||
(define (scalar-triple-product a b c)
|
||||
(dot-product a (cross-product b c)))
|
||||
|
||||
(define (vector-triple-product a b c)
|
||||
(cross-product a (cross-product b c)))
|
||||
|
||||
(define a #(3 4 5))
|
||||
(define b #(4 3 5))
|
||||
(define c #(-5 -12 -13))
|
||||
|
||||
(cross-product a b)
|
||||
→ #( 5 5 -7)
|
||||
(dot-product a b)
|
||||
→ 49
|
||||
(scalar-triple-product a b c)
|
||||
→ 6
|
||||
(vector-triple-product a b c)
|
||||
→ #( -267 204 -3)
|
||||
Loading…
Add table
Add a link
Reference in a new issue