]> git.lizzy.rs Git - rust.git/blob - src/etc/test-float-parse/u64-pow2.rs
Auto merge of #57108 - Mark-Simulacrum:license-remove, r=pietroalbini
[rust.git] / src / etc / test-float-parse / u64-pow2.rs
1 mod _common;
2
3 use _common::validate;
4 use std::u64;
5
6 fn main() {
7     for exp in 19..64 {
8         let power: u64 = 1 << exp;
9         validate(&power.to_string());
10         for offset in 1..123 {
11             validate(&(power + offset).to_string());
12             validate(&(power - offset).to_string());
13         }
14     }
15     for offset in 0..123 {
16         validate(&(u64::MAX - offset).to_string());
17     }
18 }