Why does Rust only use 16 significant digits for f64 equality checks?

后端 未结 0 857
执笔经年
执笔经年 2021-01-14 19:41

I have the following Rust code:

use std::f64::consts as f64;

fn main() {
    println!("Checking f64 PI...");
    // f64::PI definition: https://git         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题