                                              decimationFactor: decimationFactor,
                                              filter: filter)
         
-        expectTrue(result.elementsEqual(legacyResult))
-        expectTrue(result.elementsEqual(returnedResult))
+        expectTrue(elementsAlmostEqual(result, legacyResult))
+        expectTrue(elementsAlmostEqual(result, returnedResult))
     }
     
     AccelerateTests.test("vDSP/DownsampleDoublePrecision") {

        let returnedResult = vDSP.linearInterpolate(elementsOf: shortSignal,
                                                    using: controlVector)
        
        expectTrue(result.elementsEqual(legacyResult))
        expectTrue(result.elementsEqual(returnedResult))
    }
}

//===----------------------------------------------------------------------===//
//
//  vDSP difference equation
//
//===----------------------------------------------------------------------===//

if #available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *) {
    
    AccelerateTests.test("vDSP/DifferenceEquationSinglePrecision") {
        let n = 256
        

                                             decimationFactor: decimationFactor,
                                             filter: filter)
        
        expectTrue(elementsAlmostEqual(result, legacyResult))
        expectTrue(elementsAlmostEqual(result, returnedResult))
    }

    //===----------------------------------------------------------------------===//
    //
    //  vDSP polynomial evaluation.
    //
    //===----------------------------------------------------------------------===//

    AccelerateTests.test("vDSP/PolynomialEvaluationSinglePrecision") {
        let coefficients: [Float] = [2, 3, 4, 5, 6, 7, 8, 9, 10]
        let variables = (0 ... 100).map { return Float($0) }
