public static SuperNumber operator -(SuperNumber number) { var res = new SuperNumber(-number.Suret, number.Mexrec); res.Normalize(); return(res); }
public static SuperNumber operator /(ulong number1, SuperNumber number2) { var result = new SuperNumber(number2.Mexrec * number1, number2.Suret); result.Normalize(); return(result); }
public static SuperNumber operator +(SuperNumber number1, float number2) { var num2 = new SuperNumber(number2.ToString(DefaultCultureInfo)); var res = number1 + num2; return(res); }
public static SuperNumber operator /(SuperNumber number1, ulong number2) { var result = new SuperNumber(number1.Suret, number1.Mexrec * number2); result.IxtisarEt(); result.Normalize(); return(result); }
public static SuperNumber operator *(SuperNumber number1, int number2) { var result = new SuperNumber(number1.Suret * number2, number1.Mexrec); result.IxtisarEt(); result.Normalize(); return(result); }
public static SuperNumber operator -(decimal number2, SuperNumber number1) { var num2 = new SuperNumber(number2.ToString(DefaultCultureInfo)); var res = num2 - number1; res.Normalize(); return(res); }
public static SuperNumber operator -(SuperNumber number1, double number2) { var num2 = new SuperNumber(number2.ToString(DefaultCultureInfo)); var res = number1 - num2; res.Normalize(); return(res); }
public static SuperNumber operator +(float number2, SuperNumber number1) { var num2 = new SuperNumber(number2.ToString(DefaultCultureInfo)); var res = number1 + num2; res.Normalize(); return(res); }
public static SuperNumber Sqrt(SuperNumber number) { var sqrtNumber = number / 2; for (var i = 0; i < IterationCount; i++) { sqrtNumber = ((sqrtNumber + number / sqrtNumber) / new SuperNumber("2.0")); } return(sqrtNumber); }
public static SuperNumber Sqrt(ulong numberint) { var number = new SuperNumber(numberint.ToString(DefaultCultureInfo)); var sqrtNumber = number / 2; for (var i = 0; i < IterationCount; i++) { sqrtNumber = ((sqrtNumber + number / sqrtNumber) / new SuperNumber("2.0")); } return(sqrtNumber); }
public static SuperNumber operator -(SuperNumber number1, ulong number2) { /* * a/b-c=(a-bc)/b */ var newsuret = number1.Suret - number1.Mexrec * number2; var result = new SuperNumber(newsuret, number1.Mexrec); result.IxtisarEt(); result.Normalize(); return(result); }
public static SuperNumber operator +(SuperNumber number1, int number2) { /* * a/b+c=(a+bc)/b */ var newsuret = number1.Suret + number1.Mexrec * number2; var result = new SuperNumber(newsuret, number1.Mexrec); result.IxtisarEt(); result.Normalize(); return(result); }
public static SuperNumber operator /(SuperNumber number1, SuperNumber number2) { /* * a/b / c/d=ad/bc */ var newmexrec = number1.Mexrec * number2.Suret; var newsuret = number1.Suret * number2.Mexrec; var result = new SuperNumber(newsuret, newmexrec); result.IxtisarEt(); result.Normalize(); return(result); }
private static SuperNumber exp_0_1(SuperNumber x) { /* * s=1 * s=s*(1+x/4) s=1+x/4 * s=s*() */ //exp(x)=1+x*(1+x/2*(1+x/3*(1+x/4))) var i = IterationCount; SuperNumber s = 1; while (i > 0) { s = 1 + s * x / i; i--; } return(s); }
private static SuperNumber exp_int(BigInteger quvvet) { var bigInteger = quvvet; SuperNumber y = 1; var z = E; BigInteger qaliq; A2: bigInteger = BigInteger.DivRem(bigInteger, 2, out qaliq); if (qaliq == 0) { goto A5; } y = y * z; if (bigInteger == 0) { return(y); } A5: z = z * z; goto A2; }
public static SuperNumber Exp(SuperNumber xNumber) { return(null); }