Raster values are modified when writing to external files, due to the classical problem of internal representation of numbers, I suppose:
> r <- rast(nc