Run
import math x = math.nan result = math.ulp(x) print('ulp(x) :', result)
Output