Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Product Lifecycle
  3. Collaboration / Beta Testing
  4. Pi Day and Swapnajit's Pi Webservice

Pi Day and Swapnajit's Pi Webservice

Scheduled Pinned Locked Moved Collaboration / Beta Testing
helpcsharpphpdatabasealgorithms
1 Posts 1 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mittra
    wrote on last edited by
    #1

    Happy belated Pi Day! Someone came up with the idea that 14th of March (written as 3.14 in US) should be celebrated as Pi Day. Of course, since in many countries, such as in India, people write the date as 14/3 or 14.3, no word on why it would be called Pi Day there. But no harm in harmless celebration, and I thought why not use this occasion to upload a major update of my hexpi (pronounced as 'Hex-Pie') including 'Swapnajit's Pi Webservice' on Sourceforge (http://hexpi.sourceforge.net). Soon enough, the revision 0.3 of hexpi was uploaded yesterday. Hexpi has three parts. First, it just lists first 62,500 and 1,000,000 digits of Pi in hexadecimal. Download it and use it whichever way you like. The second part is the C program pi-in-hex.c that lists an arbitrary number of digits of Pi in hexadecimal from an arbitrary location specified by the user. The program is an extension of original work by David H Bailey in early 2000 and uses the same BBP algorithm that he co-developed. But the real intention of Hexpi is to provide a webservice that returns user specified number of hex digits from a specified location. For example, if you want to generate first 200 hexadecimal digits of Pi right after the decimal point (meaning starting from 0th location), you simply load the following web address: http://hexpi.sourceforge.net/webservices/index.php?s=0&n=200 The idea is that since Pi is an irrational transcendental number (i.e. its digits do not repeat itself in any pattern), it must be possible to use consecutive sets of n such digits as random number. This idea, as it turned out, was not new - some cryptographic algorithms (including blowfish) already uses this concept. NIST published tests for checking randomness of digits in Pi. However, such a webservice will provide a tool that provides those random sets starting from s=s1 and n=n1 and then s=s1+n1 and n=n1 on the next call and so on. So, there is my small gift to all of you on this Pi day. Enjoy! And do not forget to file bug if you find one. Your help can only make the service better. PS: The concept can be extended to other transcendental irrational numbers, such as sqrt(2), e and many others.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups