Click or drag to resize

MathUtils Class

A static class of interesting maths methods that are of little practical value.
Inheritance Hierarchy
SystemObject
  Orthogonal.Common.BasicMathUtils

Namespace: Orthogonal.Common.Basic
Assembly: Orthogonal.Common.Basic (in Orthogonal.Common.Basic.dll) Version: 2024-04-15 18:00 GMT+10.f27da1471008deaf16b803c17e24a5955690aef1
Syntax
C#
public static class MathUtils

The MathUtils type exposes the following members.

Methods
 NameDescription
Public methodStatic memberFactorNaive A simple naive factoring method that uses division by the sequence 2,3,6n±1 up to the square root
Public methodStatic memberIsMillerRabinPrime Borrowed from rosettacode.org for some experiments. For more information see Miller-Rabin primality test.
Public methodStatic memberPollardRhoFactor Attempts to fully factor an integer by looking for small prime factors combined with the Pollard Rho Algorithm.
Public methodStatic memberRhoFactor Attempts to find a factor of a number, searching for a small factor first before using the Pollard Rho algorithm.
Top
Fields
 NameDescription
Public fieldStatic memberSmallPrimes The first 1000 primes as an array of Int16.
Top
See Also