[87] | 1 |
|
---|
| 2 | /*
|
---|
| 3 | *@@sourcefile math.h:
|
---|
| 4 | *
|
---|
| 5 | * Note: Version numbering in this file relates to XWorkplace version
|
---|
| 6 | * numbering.
|
---|
| 7 | *
|
---|
[113] | 8 | *@@include #include "helpers\math.h"
|
---|
[87] | 9 | */
|
---|
| 10 |
|
---|
| 11 | /* Copyright (C) 2001 Ulrich Mller.
|
---|
| 12 | * This file is part of the "XWorkplace helpers" source package.
|
---|
| 13 | * This is free software; you can redistribute it and/or modify
|
---|
| 14 | * it under the terms of the GNU General Public License as published
|
---|
| 15 | * by the Free Software Foundation, in version 2 as it comes in the
|
---|
| 16 | * "COPYING" file of the XWorkplace main distribution.
|
---|
| 17 | * This program is distributed in the hope that it will be useful,
|
---|
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 20 | * GNU General Public License for more details.
|
---|
| 21 | */
|
---|
| 22 |
|
---|
| 23 | #ifndef MATH_HEADER_INCLUDED
|
---|
| 24 | #define MATH_HEADER_INCLUDED
|
---|
| 25 |
|
---|
| 26 | int XWPENTRY mathGCD(int m, int n);
|
---|
| 27 |
|
---|
| 28 | int XWPENTRY mathIsSquare(int x);
|
---|
| 29 |
|
---|
| 30 | int XWPENTRY mathFindFactor(int n);
|
---|
| 31 |
|
---|
| 32 | int XWPENTRY mathIsPrime(unsigned n);
|
---|
| 33 |
|
---|
| 34 | typedef int XWPENTRY FNFACTORCALLBACK(int iFactor,
|
---|
| 35 | int iPower,
|
---|
| 36 | void *pUser);
|
---|
| 37 | typedef FNFACTORCALLBACK *PFNFACTORCALLBACK;
|
---|
| 38 |
|
---|
| 39 | int XWPENTRY mathFactorBrute(int n,
|
---|
| 40 | PFNFACTORCALLBACK pfnCallback,
|
---|
| 41 | void *pUser);
|
---|
| 42 |
|
---|
| 43 | int XWPENTRY mathFactorPrime(double n,
|
---|
| 44 | PFNFACTORCALLBACK pfnCallback,
|
---|
| 45 | void *pUser);
|
---|
| 46 |
|
---|
| 47 | int mathGCDMulti(int *paNs,
|
---|
| 48 | int cNs);
|
---|
| 49 |
|
---|
| 50 | #endif
|
---|
| 51 |
|
---|
| 52 |
|
---|