2025-07-24 –, Main Room 5
Consider this Julia program:
n\y=for t=y:n^y n+=2y^2+2(y=(t*y-n)<<25>>32)^2>0;println(4n/t)end;5\27
At 70 characters, it’s barely longer than this session’s title. Yet it contains a custom PRNG and pairs this with integer overflow to calculate pi by an algorithm explainable to an 8th grader. Though it converges very slowly, it’s no slower than a version written directly in assembly. Here, I’ll discuss how I made this and the surprising number of computer science lessons it can be used to teach.
The project — explainable, teachable, code golfed pi programs in many languages, but perhaps most successfully Julia — can be found here: https://www.gabrielks.com/projects/pi-golf . Desired presentation duration: 10 minutes. Minimum required duration: 3 minutes.
Hello, world! I’m Gabriel, a computational renewable energy researcher from Minneapolis, Minnesota. I’m currently full time at the National Renewable Energy Laboratory (NREL) near Golden, Colorado, where I work in the Grid Planning and Analysis Center developing software models to help create more climate-friendly electrical grids. I’m passionate about applying theoretical computer science for concrete societal benefit. I spend my free time hiking, camping, discussing philosophy, and exploring Wikipedia. You can see some of my projects on my personal website at https://www.gabrielks.com .