class_docstr: Generic superclass for strategies which produce floats.
class_docstr_tok: ["Generic","superclass","for","strategies","which","produce","floats","."]
code: def __init__(self, allow_infinity, allow_nan, width):
      SearchStrategy.__init__(self)
      assert isinstance(allow_infinity, bool)
      assert isinstance(allow_nan, bool)
      assert width in (16, 32, 64)
      self.allow_infinity = allow_infinity
      self.allow_nan = allow_nan
      self.width = width
  
      self.nasty_floats = [
          float_of(f, self.width)
          for f in NASTY_FLOATS
          if self.permitted(f)
      ]
      weights = [0.2 * len(self.nasty_floats)] + [0.8] * len(
          self.nasty_floats
      )
      self.sampler = d.Sampler(weights)
  
imports: from __future__ import absolute_import, division, print_function
  import math
  import hypothesis.internal.conjecture.floats
  import hypothesis.internal.conjecture.utils
  from hypothesis.control import assume, reject
  from hypothesis.internal.conjecture.utils import calc_label_from_name
  from hypothesis.internal.floats import float_of
  from hypothesis.strategies._internal.strategies import SearchStrategy
label_desc: Use image node_id 1 to create a new FloatStrategy object from inherited base classes: SearchStrategy with example: obj = FloatStrategy(allow_infinity, allow_nan, width)