Get the latest tech news

Crafting formulas: Lambdas all the way down


We build complex mathematical formulas bottom-up using pure lambda calculus. Includes instructions of how to translate Taylor series and other approximations to lambda terms.

Note that all of the definitions (including library imports) have a 1:1 correspondence to pure lambda calculus – bruijn is just syntactic sugar ( syntax explanation). In my experience many readers won’t immediately understand, but working with bruijn and pure lambda calculus in general is really satisfying and enjoyable. If I were to implement something similar in a language like Python or Java, decomposing powers or sqrt into the iteration could even hurt performance, since the traditional functions are already hyper-optimized.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Way

Way

Photo of crafting formulas

crafting formulas

Related news:

News photo

Nvidia chips used to power advanced AI are finding their way to the Chinese military despite US blockade

News photo

Chinese archaeologists are striking out along the Silk Road

News photo

He Skipped College to Become a Repairman. He's on His Way to $175,000 a Year