Jump to content




Pi calculator V2 Infinite decimals!


  • You cannot reply to this topic
7 replies to this topic

#1 TurtleHunter

  • Members
  • 112 posts

Posted 16 March 2014 - 02:10 PM

I made a program when I was bored to calculate pi. One of the problems of it was it didnt have support for infinite decimals, so i took over it and remaded it based on http://rosettacode.org/wiki/Pi#Lua, also is nicer :P. If you cant see the entire screen for reading the number, it saves it to a file called piresult with the real time and date when it was created, if that timeout, it prints time and date of your minecraft world

pastebin get aBGkfgxd picalc

Edit: fixed derp

Screenshots

Edited by TurtleHunter, 16 June 2014 - 09:56 PM.


#2 Tjakka5

  • Members
  • 256 posts

Posted 16 March 2014 - 04:13 PM

Gah, why didnt you post this 2 days ago?!
It was Pi day then!

#3 TurtleHunter

  • Members
  • 112 posts

Posted 16 March 2014 - 05:09 PM

I know! I couldnt, but the idea was there so i posted it

#4 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 16 March 2014 - 09:04 PM

Looks good. Could you increase the number of decimal places though?

#5 TurtleHunter

  • Members
  • 112 posts

Posted 16 March 2014 - 11:50 PM

View Postoeed, on 16 March 2014 - 09:04 PM, said:

Looks good. Could you increase the number of decimal places though?
Thats on the TODO, but i dont find a bigInt api that supports negative values

#6 Konlab

  • Members
  • 595 posts
  • LocationKerbin

Posted 03 April 2014 - 01:51 PM

Useless.
Write in your program:
pinum = math.pi()
print(pinum)

And done, you have and done,
But if you incerase the decimal places,
Congratulation!

#7 TurtleHunter

  • Members
  • 112 posts

Posted 16 June 2014 - 12:17 AM

New version! now with infinite decimals!

#8 TurtleHunter

  • Members
  • 112 posts

Posted 16 June 2014 - 09:56 PM

Added screenshots and fixed a bug





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users