This is an attempt to quantify the "coincidence" shown by this tweet:
https://twitter.com/SciencePorn/status/663497649908260865
Writing some basic C code:
#include <stdio.h>
int main(void)
{
In [1]: import numpy as np | |
In [2]: A = np.random.normal(size=(5000, 5000)) | |
In [3]: x = np.random.normal(size=5000) + 1j * np.random.normal(size=5000) | |
In [4]: %timeit np.dot(A, x) | |
1 loop, best of 3: 280 ms per loop | |
In [5]: %timeit np.dot(A, x.real) + 1j * np.dot(A, x.imag) |
import ghalton | |
from pylab import * | |
from scipy.stats import gamma | |
def qmc_gamma(alpha, N): | |
M = len(alpha) | |
sequencer = ghalton.Halton(2*M) | |
valid = ones(shape=(N,), dtype=bool) | |
hs = array(sequencer.get(N)).transpose() |
This is an attempt to quantify the "coincidence" shown by this tweet:
https://twitter.com/SciencePorn/status/663497649908260865
Writing some basic C code:
#include <stdio.h>
int main(void)
{
;; FizzBuzz in x86-64 ASM without conditional branches | |
section .data | |
fizz: db 'Fizz' | |
buzz: db 'Buzz' | |
nl: db 10 | |
section .bss | |
digits: resb 2 |