num returns the truncated value of a double <var>, as a number.
This is different from trunc() in that trunc() returns a double value. If your goal is to obtain a number from a double value where the decimal part is removed, use num(); if you want the same but the result should be a double, use trunc().
If you wish to get a number from a double by some other method, consider floor(), ceil() and round() (all of which return a double) and then apply num() to the result.