## Numerical Calculations

In[1]:=
`123456789+987654321`
Out[1]=
`1111111110`

In[2]:=
`142857 7`
Out[2]=
`999999`

In[3]:=
`Sqrt[3 2^12/1663]`
Out[3]=
```         3
64 Sqrt[----]
1663```

In[4]:=
`N[%]`
Out[4]=
`2.71828`
N[式, 精度] により，式の値を任意の精度で求めることができる(Log)．
In[5]:=
`N[Log[2], 100]`
Out[5]=
```0.6931471805599453094172321214581765680755001343602552\

541206800094933936219696947156058633269964186875```
Pi, E などの定数も用意されている．
In[6]:=
`N[Pi, 100]`
Out[6]=
```3.1415926535897932384626433832795028841971693993751058\

20974944592307816406286208998628034825342117068```
In[7]:=
`N[E, 100]`
Out[7]=
```2.7182818284590452353602874713526624977572470936999595\

74966967627724076630353547594571382178525166427```

In[8]:=
`(3+4I)^10`
Out[8]=
`-9653287 + 1476984 I`

In[9]:=
`100!`
Out[9]=
```933262154439441526816992388562667004907159682643816214\

6859296389521759999322991560894146397615651828625369\

7920827223758251185210916864000000000000000000000000```

In[10]:=
`FactorInteger[%]`
Out[10]=
```{{2, 97}, {3, 48}, {5, 24}, {7, 16}, {11, 9}, {13, 7},

{17, 5}, {19, 5}, {23, 4}, {29, 3}, {31, 3},

{37, 2}, {41, 2}, {43, 2}, {47, 2}, {53, 1},

{59, 1}, {61, 1}, {67, 1}, {71, 1}, {73, 1},

{79, 1}, {83, 1}, {89, 1}, {97, 1}}```
Prime[n] は n 番目の素数を求める．
In[11]:=
`Prime[10]`
Out[11]=
`29`

Dept. CS / Faculty of Eng. / Kobe Univ. / Naoyuki Tamura