symbolic4
polynomial.h
Go to the documentation of this file.
1 
2 /*
3 
4  Copyright (c) 2019 Hannes Eberhard
5 
6  Permission is hereby granted, free of charge, to any person obtaining a copy
7  of this software and associated documentation files (the "Software"), to deal
8  in the Software without restriction, including without limitation the rights
9  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  copies of the Software, and to permit persons to whom the Software is
11  furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in all
14  copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  SOFTWARE.
23 
24  */
25 
26 #ifndef polynomial_h
27 #define polynomial_h
28 
29 #include "symbolic4.h"
30 
35 return_status validate_sparse_polynomial(expression* source, bool allow_decimal_exponents, bool allow_negative_exponents, bool allow_arbitrary_base);
37 return_status polysolve(expression* source, expression* variable);
38 uint8_t poly_div(expression** quotient, expression** remainder, const expression* a, const expression* b, int8_t degree);
39 bool poly_is_square_free(expression* source);
40 void make_monic(expression* source);
41 uint8_t poly_gcd(expression** gcd, const expression* a, const expression* b);
42 void poly_log_gcd(expression** gcd, const expression* source);
43 uint8_t factor_square_free(expression** factors, const expression* source);
44 
45 #endif /* polynomial_h */
symbolic4.h
expression
Definition: expression.h:112
any_expression_to_sparse_polynomial
return_status any_expression_to_sparse_polynomial(expression *source, const expression *variable)
Definition: polynomial.c:53
make_monic
void make_monic(expression *source)
Definition: polynomial.c:580
poly_is_square_free
bool poly_is_square_free(expression *source)
Definition: polynomial.c:560
factor_square_free
uint8_t factor_square_free(expression **factors, const expression *source)
Definition: polynomial.c:680
validate_sparse_polynomial
return_status validate_sparse_polynomial(expression *source, bool allow_decimal_exponents, bool allow_negative_exponents, bool allow_arbitrary_base)
Definition: polynomial.c:82
any_expression_to_expression_recursive
void any_expression_to_expression_recursive(expression *source)
Definition: polynomial.c:44
polysolve
return_status polysolve(expression *source, expression *variable)
Definition: polynomial.c:440
any_expression_to_dense_polynomial
return_status any_expression_to_dense_polynomial(expression *source, const expression *variable)
Definition: polynomial.c:67
sort_sparse_polynomial
void sort_sparse_polynomial(expression *source)
Definition: polynomial.c:134
any_expression_to_expression
void any_expression_to_expression(expression *source)
Definition: polynomial.c:33
poly_log_gcd
void poly_log_gcd(expression **gcd, const expression *source)
Definition: polynomial.c:663
poly_gcd
uint8_t poly_gcd(expression **gcd, const expression *a, const expression *b)
Definition: polynomial.c:603
poly_div
uint8_t poly_div(expression **quotient, expression **remainder, const expression *a, const expression *b, int8_t degree)
Definition: polynomial.c:467
return_status
return_status
Definition: foundation.h:64