def ulps_check(expected, got, ulps=20):
 ulps_error = (to_ulps(got) - to_ulps(expected))
 if (abs(ulps_error) <= ulps):
  return None
 return 'error = {} ulps; permitted error = {} ulps'.format(ulps_error, ulps)

def ulps_check ( expected , got , ulps = 20 ) : ulps_error = ( to_ulps ( got ) - to_ulps ( expected ) ) if ( abs ( ulps_error ) <= ulps ) : return None return 'error = {} ulps; permitted error = {} ulps' . format ( ulps_error , ulps )
given non-nan floats expected and got .