| 1 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 2 | #[ignore] |
| 3 | fn test_f64_random_from_u64rust-analyzer cargo fast-float2 0.2.3 test_f64_random_from_u64().() { |
| 4 | const N_ITERrust-analyzer cargo fast-float2 0.2.3 N_ITER.: u64 = 1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u64][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u64][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u64][`Shl<i32>`]shl().32; |
| 5 | |
| 6 | let mut rng = fastrandrust-analyzer cargo fastrand 2.5.0 crate/::Rngrust-analyzer cargo fastrand 2.5.0 Rng#::with_seedrust-analyzer cargo fastrand 2.5.0 impl#[Rng]with_seed().(0); |
| 7 | let mut buf = ryurust-analyzer cargo ryu 1.0.23 crate/::Bufferrust-analyzer cargo ryu 1.0.23 buffer/Buffer#::newrust-analyzer cargo ryu 1.0.23 buffer/impl#[Buffer]new().(); |
| 8 | for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#N_ITERrust-analyzer cargo fast-float2 0.2.3 N_ITER. { |
| 9 | let i: u64 = rng.u64rust-analyzer cargo fastrand 2.5.0 impl#[Rng]u64().(0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#0xFFFF_FFFF_FFFF_FFFF); |
| 10 | let a: f64 = unsafe { corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::transmuterust-analyzer cargo core https://github.com/rust-lang/rust/library/core intrinsics/transmute().(i) }; |
| 11 | let s = buf.formatrust-analyzer cargo ryu 1.0.23 buffer/impl#[Buffer]format().(a); |
| 12 | let b: f64 = fast_float2rust-analyzer cargo fast-float2 0.2.3 crate/::parserust-analyzer cargo fast-float2 0.2.3 parse().(s).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 13 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(a == b || (a.is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() && b.is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().())); |
| 14 | } |
| 15 | } |