def test_fresnel_sin_small(self, dtype):
   x = np.random.uniform(0., 1., size=int(1e4)).astype(dtype)
   try:
     from scipy import special  # pylint: disable=g-import-not-at-top
     self.assertAllClose(
         special.fresnel(x)[0], self.evaluate(special_math_ops.fresnel_sin(x)))
   except ImportError as e:
     tf_logging.warn('Cannot test special functions: %s' % str(e))
 def test_fresnel_sin_odd(self, dtype):
   x = np.random.uniform(-100., 100., size=int(1e4)).astype(dtype)
   self.assertAllClose(
       self.evaluate(special_math_ops.fresnel_sin(x)),
       self.evaluate(-special_math_ops.fresnel_sin(-x)))
 def test_fresnel_sin_boundary(self):
   self.assertAllClose(0., special_math_ops.fresnel_sin(0.))
   self.assertTrue(
       np.isnan(self.evaluate(special_math_ops.fresnel_sin(np.nan))))