Click or drag to resize

smallestFactorSmallestFactor Method (Int64, NullableInt64)

Get the smallest prime factor of an Int64.

Namespace:  NumberStone
Assembly:  WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntax
C#
public static long SmallestFactor(
	this long value,
	Nullable<long> start = null
)

Parameters

value
Type: SystemInt64
The number to factorize.
start (Optional)
Type: SystemNullableInt64
The smallest prime to check or to check all of them.

Return Value

Type: Int64
The smallest prime number after start that divides value, or value if none found.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Int64. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also