Skip to content

Instantly share code, notes, and snippets.

@mystasly48
Last active June 3, 2018 12:55
Show Gist options
  • Save mystasly48/743adb6a2f6072ba491aa8aeb5c32c53 to your computer and use it in GitHub Desktop.
Save mystasly48/743adb6a2f6072ba491aa8aeb5c32c53 to your computer and use it in GitHub Desktop.
doubleの最大値
using System;
using System.Numerics;
public class MaxAndMinValue {
public static void Main() {
BigInteger i = (BigInteger)double.MaxValue;
string j = i.ToString();
int k = j.Length - 1;
double l = int.Parse(j[0].ToString()) + (double)int.Parse(j[1].ToString())/10;
string m = (l == 1) ? "" : l + "*";
Console.WriteLine("double.MaxValue = {0}{1}≒ {2}10^{3}", i, Environment.NewLine, m, k);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment