Check OS X version

I know how to check a major version number of OS X (e.g. 10.4., 10.5, etc.) with:

(system attribute “sysv”) mod 4096 div 16

But how do I check a minor update version (e.g. 10.5.1, 10.5.2, etc.)?

Try something like this:

(system attribute "sysv") mod 4096 mod 16

What are you trying to do with this?