• Home
  • Raw
  • Download

Lines Matching +full:check +full:- +full:examples

8 fn compute_error32(q: i32, w: u64) -> (i32, u64) {  in compute_error32()
13 fn compute_error64(q: i32, w: u64) -> (i32, u64) { in compute_error64()
18 fn compute_error_scaled32(q: i32, w: u64, lz: i32) -> (i32, u64) { in compute_error_scaled32()
23 fn compute_error_scaled64(q: i32, w: u64, lz: i32) -> (i32, u64) { in compute_error_scaled64()
28 fn compute_float32(q: i32, w: u64) -> (i32, u64) { in compute_float32()
33 fn compute_float64(q: i32, w: u64) -> (i32, u64) { in compute_float64()
40 // These test near-halfway cases for single-precision floats. in compute_error32_test()
47 // These are examples of the above tests, with in compute_error32_test()
50 compute_error32(-10, 167772160000000000), in compute_error32_test()
54 compute_error32(-10, 167772170000000000), in compute_error32_test()
58 compute_error32(-10, 167772180000000000), in compute_error32_test()
61 // Let's check the lines to see if anything is different in table... in compute_error32_test()
63 compute_error32(-10, 167772190000000000), in compute_error32_test()
67 compute_error32(-10, 167772200000000000), in compute_error32_test()
74 // These test near-halfway cases for double-precision floats. in compute_error64_test()
101 // Test a much closer set of examples. in compute_error64_test()
119 compute_error64(-42, 9123456727292927), in compute_error64_test()
123 compute_error64(-43, 91234567272929275), in compute_error64_test()
127 compute_error64(-42, 9123456727292928), in compute_error64_test()
131 // These are examples of the above tests, with in compute_error64_test()
134 compute_error64(-3, 9007199254740992000), in compute_error64_test()
138 compute_error64(-3, 9007199254740993000), in compute_error64_test()
142 compute_error64(-3, 9007199254740994000), in compute_error64_test()
146 compute_error64(-3, 9007199254740995000), in compute_error64_test()
150 compute_error64(-3, 9007199254740996000), in compute_error64_test()
156 compute_error64(-18, 1000000178813934326), in compute_error64_test()
160 // Check edge-cases from previous errors. in compute_error64_test()
162 compute_error64(-342, 2470328229206232720), in compute_error64_test()
163 (-64 + f64::INVALID_FP, 18446744073709551608) in compute_error64_test()
169 // These are the same examples above, just using pre-computed scaled values. in compute_error_scaled32_test()
171 // These test near-halfway cases for single-precision floats. in compute_error_scaled32_test()
194 compute_error_scaled32(-10, 9223372036854775808, 6), in compute_error_scaled32_test()
198 compute_error_scaled32(-10, 9223372586610589696, 6), in compute_error_scaled32_test()
202 compute_error_scaled32(-10, 9223373136366403584, 6), in compute_error_scaled32_test()
206 compute_error_scaled32(-10, 9223373686122217472, 6), in compute_error_scaled32_test()
210 compute_error_scaled32(-10, 9223374235878031360, 6), in compute_error_scaled32_test()
217 // These are the same examples above, just using pre-computed scaled values. in compute_error_scaled64_test()
219 // These test near-halfway cases for double-precision floats. in compute_error_scaled64_test()
261 // Test a much closer set of examples. in compute_error_scaled64_test()
279 compute_error_scaled64(-42, 6510716281765748947, 10), in compute_error_scaled64_test()
283 compute_error_scaled64(-43, 6510716281765749303, 7), in compute_error_scaled64_test()
287 compute_error_scaled64(-42, 6510716281765749660, 10), in compute_error_scaled64_test()
291 // These are examples of the above tests, with in compute_error_scaled64_test()
294 compute_error_scaled64(-3, 9223372036854775808, 1), in compute_error_scaled64_test()
298 compute_error_scaled64(-3, 9223372036854776832, 1), in compute_error_scaled64_test()
302 compute_error_scaled64(-3, 9223372036854777856, 1), in compute_error_scaled64_test()
306 compute_error_scaled64(-3, 9223372036854778880, 1), in compute_error_scaled64_test()
310 compute_error_scaled64(-3, 9223372036854779904, 1), in compute_error_scaled64_test()
316 compute_error_scaled64(-18, 9223373686122217470, 4), in compute_error_scaled64_test()
320 // Check edge-cases from previous errors. in compute_error_scaled64_test()
322 compute_error_scaled64(-342, 9223372036854775804, 2), in compute_error_scaled64_test()
323 (-64 + f64::INVALID_FP, 18446744073709551608) in compute_error_scaled64_test()
329 // These test near-halfway cases for single-precision floats. in compute_float_f32_rounding()
336 // These are examples of the above tests, with in compute_float_f32_rounding()
338 assert_eq!(compute_float32(-10, 167772160000000000), (151, 0)); in compute_float_f32_rounding()
339 assert_eq!(compute_float32(-10, 167772170000000000), (151, 0)); in compute_float_f32_rounding()
340 assert_eq!(compute_float32(-10, 167772180000000000), (151, 1)); in compute_float_f32_rounding()
341 // Let's check the lines to see if anything is different in table... in compute_float_f32_rounding()
342 assert_eq!(compute_float32(-10, 167772190000000000), (151, 2)); in compute_float_f32_rounding()
343 assert_eq!(compute_float32(-10, 167772200000000000), (151, 2)); in compute_float_f32_rounding()
348 // Also need to check halfway cases **inside** that exponent range. in compute_float_f64_rounding()
350 // These test near-halfway cases for double-precision floats. in compute_float_f64_rounding()
362 // Test a much closer set of examples. in compute_float_f64_rounding()
367 assert_eq!(compute_float64(-42, 9123456727292927), (936, 1854521741541368)); in compute_float_f64_rounding()
368 assert_eq!(compute_float64(-43, 91234567272929275), (936, 1854521741541369)); in compute_float_f64_rounding()
369 assert_eq!(compute_float64(-42, 9123456727292928), (936, 1854521741541369)); in compute_float_f64_rounding()
371 // These are examples of the above tests, with in compute_float_f64_rounding()
373 assert_eq!(compute_float64(-3, 9007199254740992000), (1076, 0)); in compute_float_f64_rounding()
374 assert_eq!(compute_float64(-3, 9007199254740993000), (1076, 0)); in compute_float_f64_rounding()
375 assert_eq!(compute_float64(-3, 9007199254740994000), (1076, 1)); in compute_float_f64_rounding()
376 assert_eq!(compute_float64(-3, 9007199254740995000), (1076, 2)); in compute_float_f64_rounding()
377 assert_eq!(compute_float64(-3, 9007199254740996000), (1076, 2)); in compute_float_f64_rounding()