當我爲每月利率和1年的投資金額4.25輸入1000時,爲什麼我會得到結果4.384414858452464E11而不是預期的1043.34? import java.util.Scanner;
public class FinancialApplicationFutureInvestment_13 {
public static void main(String[] args) {
此代碼工作正常 Dim bc As Long = Math.Pow(36, ((IBase36.Length - 1) - i))
!在VB Math.Pow下返回DOUBLE數據類型。 當我把它轉換成C#我有 long bc = Math.Pow(36, ((IBase36.Length - 1) - i));
而且我有一個投語法問題。 如何解決?
從http://msdn.microsoft.com/en-us/library/system.math.pow.aspx int value = 2;
for (int power = 0; power <= 32; power++)
Console.WriteLine("{0}^{1} = {2:N0}",
value, power, (long) Math.P
我寫了bcmath擴展的包裝,並bug #10116關於bcpow()特別討厭 - 它施放$right_operand($exp)到(原生PHP,沒有任意長度)整數,因此當您嘗試計算一個數字的平方根(或任何其他高於1的根)時,您總是以1而非正確結果結束。 我開始尋找算法,讓我計算出一個數的n次方根,我found this answer看起來非常穩固,其實我expanded the formula使