推 costbook:數值方法 11/06 20:36
推 ducksteven:用逼近法 (誤) 11/06 20:44
推 liuyt:static double squareRoot(double x) { 11/06 20:50
→ liuyt: int a, b, c; 11/06 20:52
→ liuyt: double sum1 = 0, sum2 = 0; 11/06 20:53
→ liuyt: if (x < 0) { 11/06 20:54
→ liuyt: errorMessage(); 11/06 20:56
→ liuyt: return -1; 11/06 20:57
→ liuyt: } 11/06 20:58
→ liuyt: for (a = (int) x; a >= 0; a--) { 11/06 21:01
→ liuyt:囧"這樣推文太累,我用回文的好了orz 11/06 21:02
→ TonyQ:沒有沒教就不能用的道理吧 -_-;; 11/06 21:36
→ remmurds:老實說這根本已經是在考數學了...= = 11/06 22:12
→ know1869:老師是沒說沒教不能用…但是助教改的時候會在意= =... 11/07 02:11
→ TonyQ:直接上課問老師說能不能用 Math 吧 , 老實說我個人認為所謂 11/07 08:51
推 achio:直接看原始碼來學 理解方法再用自己想法寫一次應該可以吧? 11/07 09:58
推 qrtt1:Math.sqrt 內部的實作追到最後是用 jni 寫的 XD 11/07 11:53
→ hirabbitt:用三角函數 11/09 08:23
推 Dreamlgw:我覺得老師並沒有一定要你算出數值才會出這個題目 11/09 17:35
推 jaw109:其實可以玩的東西還很多, 模擬退火, 基因, 粒子群聚.... 11/09 20:56