Skip to content

Commit d21af28

Browse files
authored
Merge pull request #230 from Arithmomaniac/Arithmomaniac-patch-1
Fixed link to sqrt algo
2 parents 645a34d + 737acae commit d21af28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DotNext/Numerics/Number.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public static bool IsPrime<T>(T value)
131131

132132
return value == two;
133133

134-
// https://math.stackexchange.com/questions/2469446/what-is-a-fast-algorithm-for-finding-the-integer-square-root
134+
// https://math.stackexchange.com/questions/2469446/what-is-a-fast-algorithm-for-finding-the-integer-square-root/4674078#4674078
135135
static T Sqrt(T value)
136136
{
137137
var log2x = T.Log2(value) - T.One;
@@ -221,4 +221,4 @@ static bool TryGetFromTable(ReadOnlySpan<T> cachedPrimes, T value, out T result)
221221
return success;
222222
}
223223
}
224-
}
224+
}

0 commit comments

Comments
 (0)