View Single Post
  #1 (permalink)  
Old 05-07-2008, 08:45 PM
michcio michcio is offline
Member
 
Join Date: Nov 2007
Posts: 17
michcio has a little shameless behaviour in the past
get more decimals?!?! please help!
hello I wonder if there is a way to easy store a huge amount decimals. I have done a program that returns PI with many decimals that are right...But double can only store up to 14 decimals...how could I show my PI(System.out.println) ?? please help!!!

here is my short code

Code:
public static void main(String[] args) { double summa = 0; for(double i=0; i<100; i++) summa += Math.pow((-1),i)/(2*i+1) * (4/(Math.pow(5,(2*i+1)))-(1/Math.pow(239, (2*i+1)))); summa *= 4; System.out.println(summa); } }
it's a really short program that only add 100 of elemnts and then I got 14 deciomals right...but please help how do I do so I can see more then 14 decimals??????
Reply With Quote
Sponsored Links