abs()是一个内置函数,而fabs()在math模块中定义的。 fabs()函数只适用于float和integer类型,而abs()也适用于复数。 abs()返回是float和int类型,math.fabs()返回是float类型