Add rational formula support