<PackageReference Include="NUnit" Version="4.0.1" />

FloatingPointNumerics

static class FloatingPointNumerics
Helper routines for working with floating point numbers
public static bool AreAlmostEqualUlps(float left, float right, int maxUlps)

Compares two floating point values for equality

public static bool AreAlmostEqualUlps(double left, double right, long maxUlps)

Compares two double precision floating point values for equality