Mercurial > hg > Members > kent > dotfiles
annotate bcrc @ 9:2eceeda82a9f
from gentoo on ibook
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 16 Aug 2009 14:30:17 +0900 |
parents | 6d5c73fe5744 |
children |
rev | line source |
---|---|
0
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 define atan(a){ |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 return a(a) |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3 } |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 define log_e(a){ |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 return l(a) |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 } |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 define log(a,b){ |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 return l(b)/l(a) |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9 } |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10 define sin(a){ |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 return s(a) |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 } |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
13 define cos(a){ |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
14 return c(a) |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
15 } |
9 | 16 define tan(a){ |
17 return s(a)/c(a) | |
18 } | |
0
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
19 define exp(a){ |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
20 return e(a) |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
21 } |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
22 define pow(a,b){ |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
23 return e(b*l(a)) |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
24 } |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
25 define fact(n){ |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
26 if(n>1) { |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
27 return n*fact(n-1); |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
28 }else{ |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
29 return 1; |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
30 } |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
31 } |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
32 |
6d5c73fe5744
Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
33 pi = 4*atan(1); |