make trunc a macro to avoid multiple linkage