slightly optimized adler with forced casts