Category Archives: Math

Wiki + Spreadsheet

The underlying concept is very simple: spreadsheets are a way to organize text, numbers and formulas into what might be seen as a natively numeric environment: a matrix. So what would happen if we loosed some of the bolts of … Continue reading

Posted in Math, Project, Python | 5 Comments

Hey, nice float!

python-nicefloat is a Python module implementing an algorithm based on the paper “Printing Floating-Point Numbers Quickly and Accurately”, by Robert G. Burger and R. Kent Dybvig. The implemented algorithm will find the shortest, correctly rounded output string representing a decimal … Continue reading

Posted in Math, Project, Python | 4 Comments

Problem of the Week at University of Massachusetts

University of Massachusetts has a very nice Problem of the Week service where they post a new math related problem every monday. At that time they report the percentage of people that correctly answered the question as well. To submit … Continue reading

Posted in Math, Puzzle, Python | Leave a comment

All combinations of N elements

Here’s a snippet to compute all combinations of N elements over K positions.

Posted in Math, Python, Snippet | 3 Comments

Permutations of all subsets

Another snippet to compute the permutations of all subsets.

Posted in Math, Python, Snippet | 3 Comments

Permutations and derangements

Two snippets to compute permuatations and derangements in Python.

Posted in Math, Python, Snippet | 4 Comments

Toy interpreter for Linear Algebra

While working with Linear Algebra, I’ve decided to build a toy interpreter in C to play around. This was a quite interesting experiment for myself, since it was the first time I’ve built a complete (with tokenizer, compiler, and interpreter) … Continue reading

Posted in C/C++, Math, Project | 1 Comment