tested machine epsilon and template functions