fixed numeric_limits for fvar and added tests