Thursday, 7 May 2020

This is how bored I am

After hearing that the cray supercomputer calculated PI to 1.4 quadrillion decimal places in a mere three months, I thought I'd have a go.

    Now, I don't have a computer capable of 1 billion simultaneous calculations, but I built it myself and it's quite nippy. With a quad core processor and a bewildering 16 gig of RAM it's really great for Pacman.

    I wrote the first program in Java, my second fave language. The damned thing required 1,1 million iterations of a very simple loop and nearly half an hour just to calculate PI to 10 places. And even I've managed to memorise that much.



    Right, I thought. Not standing for that. So I tried a slightly modified version (a little of it cut and pasted, I admit) in Golang, my no.1 fave language. 

    This time I instructed my prog to calculate pie to 10, 000 places. Expecting it to take the rest of my life, or at least until I either go back to work or have to look for another job. Both of which options are just as likely depending on what our beloved Prime minister decides this weekend. So imagine my shock when it only took: wait for it, 750 milliseconds to finish - which is not a lot in the scheme of things.

    My wife then informed me that if I didn't paint the bathroom door, that was just about how long it would take her to cut off a piece of me that I hold dear.

    So enough of the computer stuff for a while. She really likes sharp things. I also know where my bread's buttered - and so does she. That's an English colloquialism, but I think you get my drift.

No comments:

Post a Comment

Labels