Created
May 23, 2013 22:59
-
-
Save bchetty/5640150 to your computer and use it in GitHub Desktop.
Googol Number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Googol { | |
public static void main(String[] args) { | |
long googol1 = (long) Math.pow(10,100); | |
System.out.println("Googol1 : " + googol1); | |
System.out.println("Max Value of Long : " + Long.MAX_VALUE); | |
BigDecimal googol2 = new BigDecimal(Math.pow(10,100) + ""); | |
System.out.println("Googol2 : " + googol2); | |
BigDecimal bigDecimal = googol2.multiply(new BigDecimal(Math.PI + "")); | |
System.out.println("Googol Multiplied By PI : " + bigDecimal); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment