code: def test_float_int_spread():
      # Test rounding error for spread of values
      powers = np.arange(-10, 10, 0.5)
      arr = np.concatenate((-(10**powers), 10**powers))
      for in_dt in (np.float32, np.float64):
          arr_t = arr.astype(in_dt)
          for out_dt in IUINT_TYPES:
              aw = SlopeInterArrayWriter(arr_t, out_dt)
              arr_back_sc = round_trip(aw)
              # Get estimate for error
              max_miss = rt_err_estimate(
                  arr_t, arr_back_sc.dtype, aw.slope, aw.inter
              )
              # Simulate allclose test with large atol
              diff = np.abs(arr_t - arr_back_sc)
              rdiff = diff / np.abs(arr_t)
              assert np.all((diff <= max_miss) | (rdiff <= 1e-5))
  
imports: import itertools
  from io import BytesIO
  from platform import machine, python_compiler
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from ..arraywriters import ArrayWriter, ScalingError, SlopeArrayWriter, SlopeInterArrayWriter, WriterError, get_slope_inter, make_array_writer
  from ..casting import int_abs, sctypes, shared_range, type_info
  from ..testing import assert_allclose_safely, suppress_warnings
  from ..volumeutils import _dt_min_max, apply_read_scaling, array_from_file
label_desc: Use image node_id 24 for calling a global function with example usage: test_float_int_spread() without return types