Skip to content

Instantly share code, notes, and snippets.

@joelandman
joelandman / gist:191bf56e64d8393ff79057480aae0ce5
Created November 29, 2017 22:03
Julia code for overflow play
#!/usr/bin/env julia
x = "1234"
while length(x) < 100 * 1024
x *= x;
end
y = parse(BigInt,x)
@joelandman
joelandman / gist:ec6f3abef9bc5f1c7b0e
Created December 12, 2014 18:14
Quick and dirty log_2 tester ...
#include <stdio.h>
#include <math.h>
#include <sys/time.h>
#define NUMBER_OF_CALIPER_POINTS 10
struct timeval ti,tf,caliper[NUMBER_OF_CALIPER_POINTS];
struct timezone tzi,tzf;
int log_2 (unsigned int v)