Blogs / Personal blogs

Oran Looney

oranlooney.com

Oran Looney's personal blog about math, programming, machine learning, and data visualization.

Popular posts
7
Total points
1,439
HN comments
330
Rank
#1,328 personal

Visit oranlooney.com → RSS feedOn Hacker News Feb 2019 – Nov 2024

Software Engineering 5Math & Algorithms 4AI & Machine Learning 4History & Retro Computing 1

1

How Does GPT-4o Encode Images?

Here’s a fact: GPT-4o charges 170 tokens to process each 512x512 tile used in high-res mode. At ~0.75 tokens/word, this suggests a picture is worth about 227 words—only a factor of four off from the traditional saying. (There’s also an 85 tokens charge for a low-res ‘master thumbnail’ of each picture and higher…

3

Stacking triangles for fun and profit

One thing you may have noticed about the trigonometric functions sine and cosine is that they seem to have no agreed upon definition. Or rather, different authors choose different definitions as the starting point, mainly based on convenience. This isn’t problematic or even particularly unusual in mathematics: as long…

5

A Fairly Fast Fibonacci Function

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…