[Info-vax] VMS Software Q1 '23 Update
Jan-Erik Söderholm
jan-erik.soderholm at telia.com
Wed Feb 1 10:40:26 EST 2023
Den 2023-02-01 kl. 15:11, skrev Arne Vajhøj:
> On 2/1/2023 8:17 AM, Simon Clubley wrote:
>> Something just occurred to me while writing this: does the latest solution
>> to everything :-) (ie: Rust) still allow you to directly compare two
>> floating
>> point numbers ?
>>
>> Based on a quick search, the answer would appear to be yes, which was
>> a bit of a surprise...
>
> It does but Clippy complains unless you instruct it not to.
>
> #[allow(clippy::float_cmp)]
>
> fn main() {
> let x:f64 = 123.456;
> let y:f64 = 123.456;
> let eq1:bool = x == y;
> println!("{0} = {1} is {2}", x, y, eq1);
> }
>
>
> Arne
>
>
Is that true for < or > compares also?
That seems as less of an issue...
More information about the Info-vax
mailing list