 
      
    | You are here | fredrikj.net | ||
| | | | | randorithms.com | |
| | | | | The Taylor series is a widely-used method to approximate a function, with many applications. Given a function \(y = f(x)\), we can express \(f(x)\) in terms ... | |
| | | | | www.oranlooney.com | |
| | | | | A common example of recursion is the function to calculate the \(n\)-th Fibonacci number: def naive_fib(n): if n < 2: return n else: return naive_fib(n-1) + naive_fib(n-2) This follows the mathematical definition very closely but it's performance is terrible: roughly \(\mathcal{O}(2^n)\). This is commonly patched up with dynamic programming. Specifically, either the memoization: from functools import lru_cache @lru_cache(100) def memoized_fib(n): if n < 2: return n else: return memoized_fib(n-1) + memoiz... | |
| | | | | www.jeremykun.com | |
| | | | | So far in this series we've seen elliptic curves from many perspectives, including the elementary, algebraic, and programmatic ones. We implemented finite field arithmetic and connected it to our elliptic curve code. So we're in a perfect position to feast on the main course: how do we use elliptic curves to actually do cryptography? History As the reader has heard countless times in this series, an elliptic curve is a geometric object whose points have a surprising and well-defined notion of addition. | |
| | | | | bloeys.com | |
| | | In 'Thought 2: Regex is Like Assembly' I wondered why we are still doing regex in this kind of hard to understand, symbolic way, when we have already invented high level programming languages. There is no reason regex can't be written as clearly as any other programming language we use today. I thought doing this would be an interesting project, and so I came up with Regexl, a high level language for writing regex, that can be used as a simple library. | ||