647 karma · joined July 29, 2013
(define (pi digits)
(let* ((A 13591409)
(B 545140134)
(C 640320)
(C^3/24 (quotient (expt 640320 3) 24))
(D 12))
(define (-1^n*g n g) (if (odd? n) (- g) g))
(define (split m n)
(if (= 1 (- n m))
(let* ((6n (* 6 n)) (g (* (- 6n 5) (- (+ n n) 1) (- 6n 1))))
(list g (* C^3/24 (expt n 3)) (* (-1^n*g n g) (+ (* n B) A))))
(let* ((mid (quotient (+ m n) 2))
(gpq1 (split m mid))
(gpq2 (split mid n))
(g1 (car gpq1)) (p1 (cadr gpq1)) (q1 (caddr gpq1))
(g2 (car gpq2)) (p2 (cadr gpq2)) (q2 (caddr gpq2)))
(list (* g1 g2) (* p1 p2) (+ (* q1 p2) (* q2 g1))))))
(let* ((num-terms (inexact->exact (floor (+ 2 (/ digits 14.181647462)))))
(sqrt-C (integer-sqrt (* C (expt 100 digits))))
(gpq (split 0 num-terms))
(g (car gpq)) (p (cadr gpq)) (q (caddr gpq)))
(quotient (* p C sqrt-C) (* D (+ q (* p A)))))))
I am surprised it is much slower in Julia (as per what is noted in the gist).May be provide “addr = mmap_open(path, flags, &size)” ?
For me, it is very different. Almost any genre of music can move me. As for dreams I can even dream when I’m only half asleep. Not sure there is a connection.
The "body in buddha" x-ray showed an iron band supporting the head. There is an explanation in the above paper.
[Edit: covered in Rajpopat's thesis...]
True for most startups.
The Unix renaissance in the ‘90s had a lot to do with open source source OSes such as (primarily) Linux and the BSDs. Until then we had a bunch of corporate unixes, no two alike but expensive and kernel hacking was basically off limits. With the advent of i386 we had affordable & powerful computers that could run “real” OSes and us hackers were hungry for an open source OS. Computing history might’ve been different if plan9 was made open source before Linux became available. But that was not to be.
A bunch of resources are listed near the end including NVC parenting videos.