summary refs log tree commit diff
path: root/src/etc/test-float-parse/u64-pow2.rs
blob: 1c9bda948ffd3d41f8095adf5a7dd511457d8832 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mod _common;

use _common::validate;
use std::u64;

fn main() {
    for exp in 19..64 {
        let power: u64 = 1 << exp;
        validate(&power.to_string());
        for offset in 1..123 {
            validate(&(power + offset).to_string());
            validate(&(power - offset).to_string());
        }
    }
    for offset in 0..123 {
        validate(&(u64::MAX - offset).to_string());
    }
}