Closed
Description
fn main() {
let a: f64 = 2.0f64.powi(64);
println!("{}", a);
let a: f64 = 18446744073709551616.0f64;
println!("{}", a);
// wii output
// 18446744073709552000
// 18446744073709552000
}
#include <stdio.h>
int main() {
double a = 18446744073709551616.0;
float b = 18446744073709551616.0;
printf("%lf, %f\n", a, b);
// will output
//18446744073709551616.000000, 18446744073709551616.000000
}
(1<<64) == 18446744073709551616
, so IEEE754 can represent it use 64 or 32 float number