/usr/include/singular/singular/Singular/misc_ip.h is in libsingular4-dev-common 1:4.1.0-p3+ds-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | /*****************************************************************************\
* Computer Algebra System SINGULAR
\*****************************************************************************/
/** @file misc_ip.h
*
* This file provides miscellaneous functionality.
*
* ABSTRACT: This file provides the following miscellaneous functionality:
* - prime factorisation of bigints with prime factors < 2^31
* (This will require at most 256 MByte of RAM.)
* - approximate square root of a bigint
*
* Most of the functioanlity implemented here had earlier been
* coded in SINGULAR in some library. Due to performance reasons
* these algorithms have been moved to the C/C++ kernel.
*
* @author Frank Seelisch
*
*
**/
/*****************************************************************************/
#ifndef MISC_H
#define MISC_H
#include <kernel/mod2.h>
#include <coeffs/si_gmp.h>
#include <coeffs/coeffs.h>
#include <Singular/lists.h>
/**
* Factorises a given bigint number n into its prime factors less
* than or equal to a given bound, with corresponding multiplicities.
*
* The method finds all prime factors with multiplicities. If a positive
* bound is given, then only the prime factors <= pBound are being found.
* In this case, there may remain an unfactored portion m of n.
* Also, when n is negative, m will contain the sign. If n is zero, m will
* be zero.
* The method returns a list L filled with three entries:
* L[1] a list; L[1][i] contains the i-th prime factor of |n| as int or
* bigint (sorted in ascending order),
* L[2] a list; L[2][i] contains the multiplicity of L[1, i] in |n| as int
* L[3] contains the remainder m as int or bigint, depending on the size,
*
* We thus have: n = L[1][1]^L[2][1] * ... * L[1][k]^L[2][k] * L[3], where
* k is the number of mutually distinct prime factors (<= a provided non-
* zero bound).
* Note that for n = 0, L[1] and L[2] will be emtpy lists and L[3] will be
* zero.
*
* @return the factorisation data in a SINGULAR-internal list
**/
lists primeFactorisation(
const number n, /**< [in] the bigint > 0 to be factorised */
const int pBound /**< [in] bound on the prime factors
seeked */
);
#ifdef PDEBUG
#if (OM_TRACK > 2) && defined(OM_TRACK_CUSTOM)
// #include <kernel/polys.h>
/* Needed for debug Version of p_SetRingOfLeftv, Oliver */
#include <kernel/structs.h>
void p_SetRingOfLeftv(leftv l, ring r);
#endif
#endif
#endif
/* MISC_H */
|