
第一章
數值
Jenny I’ve got your number
I need to make you mine
Jenny don’t change your number
Eight six seven ve three oh nine
Eight six seven ve three oh nine
Eight six seven ve three oh nine
Eight six seven ve three oh nine
Tommy Tutone, “867-5309/Jenny”
1.0 導論
數值型態
數學領域博大精深,不同領域中定義了許多特別物件,門外漢總以為數學只與數字有
關,儘管數字只能說沾到數學的表面,但本書由數字開始談論起應該還算合理。
Mathematica 支援
整數
Integer
、
分數
Rational
、
實數
Real
以及
複數
Complex
等 4 種
數值型態,以下分別列舉。
(* 註解 *)
為 Mathematica 中表示註解的語法。[Page-001]
1 (* 整數 1*)
1 / 2 (* 分數 1/2*)
1.2
*
^ 8 (* 實數 1.2
Χ
10
^8*)
3 + 2 I (* 複數 3+2i*)
以 上 範 例 均 可 使 用
Head[]
指 令 得 到 其 數 值 形 態。
Head[]
指 令 的 用 途 是 取 出 表 示 式
(expression)的標頭,例如串列的標頭為
List
。
ch01.indd 1 2014/4/2 下午 05:20:30