dotnet / dotnet/dotnet-api-docs

IsApproximatelyEqual doesn't work for two negative numbers

Open
#1,058 0 comments 0 reactions 0 assignees View on GitHub
area-System.Runtime dotnet-api/prod Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

IsApproximatelyEqual doesn't work for two negative numbers, the Abs call is not surrounding the divisor.

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 2d4f10e9-c86c-4b01-28ae-9bd9829e7a8a
* Version Independent ID: 6ff9f2d3-23fe-39b9-b08b-1e16a10a95c4
* Content: [Double Struct (System)](https://docs.microsoft.com/en-us/dotnet/api/system.double?view=netframework-4.7.2#testing-for-equality)
* Content Source: [xml/System/Double.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System/Double.xml)
* Product: **dotnet-api**
* GitHub Login: @rpetrusha
* Microsoft Alias: **ronpet**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.