formula: add/improve more API docs.

Closes #35266.