Lines Matching refs:EPSILON
142 use core::$f_scalar::EPSILON;
147 fraction.into_float_with_exponent(0) - (1.0 - EPSILON / 2.0)
178 const EPSILON32: f32 = ::core::f32::EPSILON;
179 const EPSILON64: f64 = ::core::f64::EPSILON;
182 ($fnn:ident, $ty:ident, $ZERO:expr, $EPSILON:expr) => {
189 assert_eq!(one.gen::<$ty>(), $EPSILON / 2.0);
191 assert_eq!(max.gen::<$ty>(), 1.0 - $EPSILON / 2.0);
195 assert_eq!(zeros.sample::<$ty, _>(OpenClosed01), 0.0 + $EPSILON / 2.0);
197 assert_eq!(one.sample::<$ty, _>(OpenClosed01), $EPSILON);
203 assert_eq!(zeros.sample::<$ty, _>(Open01), 0.0 + $EPSILON / 2.0);
205 assert_eq!(one.sample::<$ty, _>(Open01), $EPSILON / 2.0 * 3.0);
207 assert_eq!(max.sample::<$ty, _>(Open01), 1.0 - $EPSILON / 2.0);
222 ($fnn:ident, $ty:ident, $ZERO:expr, $EPSILON:expr) => {
229 assert_eq!(one.gen::<$ty>(), $EPSILON / 2.0);
231 assert_eq!(max.gen::<$ty>(), 1.0 - $EPSILON / 2.0);
235 assert_eq!(zeros.sample::<$ty, _>(OpenClosed01), 0.0 + $EPSILON / 2.0);
237 assert_eq!(one.sample::<$ty, _>(OpenClosed01), $EPSILON);
243 assert_eq!(zeros.sample::<$ty, _>(Open01), 0.0 + $EPSILON / 2.0);
245 assert_eq!(one.sample::<$ty, _>(Open01), $EPSILON / 2.0 * 3.0);
247 assert_eq!(max.sample::<$ty, _>(Open01), 1.0 - $EPSILON / 2.0);