Skip to content

Instantly share code, notes, and snippets.

@sh1boot
sh1boot / fngen.c
Created June 8, 2016 17:09
odd output
#include <stdio.h>
#include <math.h>
int main(void) {
long double x = 0.0;
long double phi = 0.61803398874989484820458683436563811772030917980576286213544862L;
long double t = 1.0;
for (;;) {
int n = 0;
#include <stdint.h>
class Foo {
uint64_t& data;
uint64_t* const pdata;
public:
Foo(uint64_t& d) : data(d), pdata(&d) { }
inline uint64_t get(void) { return data; }
inline uint64_t pget(void) { return *pdata; }
@sh1boot
sh1boot / gist:5732738
Last active December 18, 2015 05:29
experimental table-based divide operation
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#define TABBITS 8
#if 0
extern uint32_t divfn(uint16_t i, uint16_t j);
#else