Commit 5b51776a authored by rokka's avatar rokka

ueb4

parent 9045909a
......@@ -16,7 +16,7 @@
)
; Vektor, Vektor -> Vektor
; substracts the second Vektor from the first
; substracts the second Vektor v2 from the first v1
(check-expect (vec-sub (make-posn 1 1) (make-posn 1 1)) (make-posn 0 0))
(check-expect (vec-sub (make-posn 3 3) (make-posn 2 2)) (make-posn 1 1))
(define (vec-sub v1 v2)
......@@ -40,7 +40,7 @@
)
; Vektor -> Number
; compute the absolute value for the given Vektor elements
; compute the absolute value for the given Vektor element v
(check-expect (vec-abs (make-posn 3 4)) 5)
(check-within (vec-abs (make-posn 2 3)) 3.605 3.606)
(define (vec-abs v)
......@@ -54,5 +54,4 @@
(check-expect (vec-norm testVec) testVecNorm)
(define (vec-norm v)
(vec-skal-mult ( / 1 (vec-abs v)) v)
)
\ No newline at end of file
)
\ No newline at end of file
a)
<A> ::= '(' <A>* ')' | '[' <A>* ']' | '{' <A>* '}'
b)
(([]){()})
<A>
'('
<A>
'('
<A>
[]
')'
<A>
'{'
<A>
()
'}'
')'
c)
<P> :: = 'C' | '0' <P> '0' | '1' <P> '1'
d)
1010C0101
<P>
'1'
<P>
'0'
<P>
'1'
<P>
'0'
<P>
'C'
'0'
'1'
'0'
'1'
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment