dotnet / dotnet/dotnet-api-docs

Wrong Summary & Return Value Descriptions for BigInteger.MinMagnitude & BigInteger.MaxMagnitude

Open
#9,525 7 comments 0 reactions 1 assignee Claimed by @zacharylayne View on GitHub
:watch: Not Triaged area-System.Numerics Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

[BigInteger.MinMagnitude](https://learn.microsoft.com/en-us/dotnet/api/system.numerics.biginteger.minmagnitude?view=net-8.0) reads:
**Summary:** *Compares two values to compute which is lesser.*

**x**
*The value to compare with y.*
**y**
*The value to compare with x.*


**Returns:** *x if it is less than y; otherwise, y.*


This would indicate the method is no different than [Min](BigInteger.Min).


Instead, **MinMagnitude** should be:

**Summary:** *Returns the [BigInteger](https://learn.microsoft.com/en-us/dotnet/api/system.numerics.biginteger?view=net-8.0) with the smallest absolute value.*

**Returns:** *The [BigInteger](https://learn.microsoft.com/en-us/dotnet/api/system.numerics.biginteger?view=net-8.0) with the smallest absolute value. If the absolute values are equal, returns `x` if `x` < `0` and `y` if `x` >= 0.*


[BigInteger.MaxMagnitude](https://learn.microsoft.com/en-us/dotnet/api/system.numerics.biginteger.maxmagnitude?view=net-8.0) documentation has the same issue.

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.