(val1 - val2).abs() < f64::EPSILON
val1.to_ne_bytes() == val2.to_ne_bytes()
或者
val1.to_bits() == val2.to_bits()
标签:bytes,ne,val2,val1,f64,bits,比较,rust
From: https://www.cnblogs.com/pythonClub/p/16587905.html
(val1 - val2).abs() < f64::EPSILON
val1.to_ne_bytes() == val2.to_ne_bytes()
或者
val1.to_bits() == val2.to_bits()
标签:bytes,ne,val2,val1,f64,bits,比较,rust
From: https://www.cnblogs.com/pythonClub/p/16587905.html