Arithmetic functions for the Obsidian framework