Comparing arrays of floats?
    Meta via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Fri Oct  9 16:27:55 PDT 2015
    
    
  
On Friday, 9 October 2015 at 22:14:09 UTC, Straivers wrote:
> Forgive me if this has already been discussed, but how are 
> arrays of floating point numbers compared in D? i.e. Is it a 
> bit-by-bit comparison, is the std.math.approxEqual function get 
> called for each element, or is it byte-by-byte across the 
> entire array?
>
> -Straivers
If you want to compare them with approxEqual, you can do:
arr1.equal!approxEqual(arr2)
    
    
More information about the Digitalmars-d-learn
mailing list