18.1 |
Experiment with與display 函數 roots=: 3 : script
and 13 : script (which are equivalent).
|
18.2 |
See discussion of 控制結構 在dictionary,
and use m in defining furr 動詞.
|
18.3 |
Experiment with expressions such as ! d b=: i.7 ,
after defining 副詞 d :
d=: 1 : 0
+:@x.
)
|
18.4 |
Using program pol from Exercise 14.2,
perform following experiments與comment on ir results:
g=: 11 7 5 3 2 & pol
e=: 11 0 5 0 2 & pol
o=: 0 7 0 3 0 & pol
(g = e + o) b=: i.6
(e = e@-) b
(o = -@o@-) b
解答:函數 g is sum of 函數 e
and o .Moreover, e is an even 函數
(whose graph is reflected 在vertical axis), and o
is an odd 函數 (reflected 在origin).
|
18.5 |
Review Section H of Part II與
use scripts to make furr 明確定義.
|
18.6 |
Enter following 明確 定義
of 副詞 even and perform
suggested experiments with it, using 函數 defined
在preceding exercise:
even=: 2 : 0
-:@(x.f. + x.f.@-)
)
ge=: g even
(e = ge) b
(e = e even) b
|
18.7 |
Define an 副詞 odd and use it 在
following experiments:
exp=: ^
sinh=: 5&o.
cosh=: 6&o.
(sinh = exp odd) b
(sinh = exp .: -) b 基本單字 odd 副詞 .: -
(cosh = exp even) b
(exp = exp even + exp odd) b
|
18.8 |
following experiments involve complex numbers,
and should perhaps be ignored by anyone unfamiliar with m:
sin=: 1&o.
cos=: 2&o.
(cos = ^@j. even) b
(j.@sin = ^@j. odd) b
|