The following table shows the fuctions from the lnC.h header, and their equivalents in ln3/nttl.
| lnC Function | New Function | Notes | |
|---|---|---|---|
| Package | Function | ||
| Abs( x ) | ln3 | x.Abs( ) | |
| BetweenBits( x, i, j ) | |||
| Binomial( n, k ) | nttl | Binomial( &x, n, k ) | |
| Bit( x, i ) | ln3 | x.GetBit( i ) | |
| Compare( x, y ) | ln3 | x.Compare( y ) | Note that the return type has changed. |
| CompareAbs( x, y ) | ln3 | x.CompareAbs( y ) | Note that the return type has changed. |
| Digits( x ) | ln3 | x.GetSize( ) | |
| FactorPowerOf2( x, e ) | nttl | FactorPowerOfTwo( x, &e ) | |
| Factorial( n ) | nttl | Factorial( &x, n ) | |
| FastExp | ln3 | FastExp | This will be obsolete soon. Consider using the nttl Power function, instead. |
| Gcd( x, y ) | nttl | GCD( x, y ) | Faster GCD algorithms in development. |
| Index( x ) | Use x.GetSize( ) - 1 | ||
| Inverse( x, m ) | nttl | Inverse( x, m ) | |
| IsEven( x ) | ln3 | x.IsEven( ) | |
| IsNegative( x ) | ln3 | x.IsNegative( ) | |
| IsNotZero( x ) | ln3 | x.IsNotZero( ) | |
| IsOdd( x ) | ln3 | x.IsOdd( ) | |
| IsPositive( x ) | ln3 | x.IsPositive( ) | |
| IsPrime( x, s ) | nttl | IsPrime( x, s ) | |
| IsSmallPrime( x ) | Planned for the prime package. | ||
| IsSquare( x ) | Planned for nttl. | ||
| IsZero( x ) | ln3 | x.IsZero( ) | |
| Jacobi( x, m ) | nttl | Jacobi( x, m ) | |
| LehmerSqrt | Planned for nttl. | ||
| LnPrint( x ) | ln3 | x.Print( cout ) | |
| LnPrintBinary( x ) | Use x.Print( cout, 2 ) | ||
| LnPrintHex( x ) | Use x.Print( cout, 16 ) | ||
| LnPrintIB( x ) | |||
| LnRead( x ) | ln3 | x.Read( cin ) | |
| Max( x, y ) | Use min/max template, instead. | ||
| Min( x, y ) | Use min/max template, instead. | ||
| NextPrime( x ) | Planned for the prime package. | ||
| NumBits( x ) | ln3 | x.NumBits( ) | |
| PowerOfTwo( e ) | Planned for nttl. | ||
| PrevPrime( x ) | Planned for the prime package. | ||
| Product( x, k ) | nttl | Product( x, k ) | |
| Random( s ) | ln3 | x.Random( s ) | |
| RandomPrime( s ) | nttl | RandomPrime( s ) | |
| Sign( x ) | ln3 | x.GetSign( ) | Note that the return type has changed. |
| Sqrt | nttl | Sqrt | |
| SqrtMod | nttl | SqrtMod | |
| Square | Planned for ln3. Use multiplication, for now. | ||