看板 java 關於我們 聯絡資訊
※ 引述《terry1st (阿甫)》之銘言: : 公式是這樣的 : x[(n-1)b+1-nx]^n = [(n-1)b]^n-1 [((n-1)b-n)x+1] : 現在n跟b我都知道了 ,假如n=3 b=0.6 : x[(3-1)0.6+1-3x]^3 = [2*0.6]^2[(2*0.6-3)x+1] : 化簡後 : x[2.2-x]^3 = -0.36x+1.44 : 重點在 ^3 <===這個地方 用程式碼實在不知道要怎麼下手 : 如果是^4、^5 那要怎麼求出解呢? : 還有另一個問題 : 開根號次方程式碼怎麼算呢? : 例如 2根號3次方,或2根號四次方。 : 以上兩個問題 謝謝 根號就是 1/2 次方 或Math.sqrt() 次方運算請用Math.pow() ex. int x=5; System.out.println(Math.pow(x,3)); //得125 根號二三次方 Math.pow( Math.sqrt(x),3) or Math.pow( Math.pow(x,0.5),3) --  ▄▅▆▇███▇▆▅▄▃        ╰┼╯─╮ ╮         ◥███████████◣       ╰┼╯=│=│         ◥██████───────    *. ╯  ╯ ╯ の 物 語 .*  ◥███████──────◣ ~ ◢◣             ◢◣  ◥██████───────◤   ◥◤  空白的世界.翼 ◥◤  ◥██▁▂▃▄▅▆▇███▆▅▄▃▂▂telnet://tony1223.no-ip.info -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.134.27.68
terry1st:math cannot be resolved 我的錯誤訊息Orz 04/01 00:15
terry1st:import= "java.lang.*" 我有加上這行了,還是錯^^" 04/01 00:16
PsMonkey:Java 是大小寫有別的... 怎麼連這個都... 04/01 00:30
terry1st:sorry 我忘了這回事了 @_@ 04/01 00:35
AmosYang:a friendly reminder: (a^b)^c == a^(b*c) 04/01 14:18
slalala:這好像原PO的學校的寒假作業XD 04/01 17:41