Loading [MathJax]/jax/output/SVG/config.js
symbolic4
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
math_foundation.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 math_foundation_h
27 #define math_foundation_h
28 
29 #include "symbolic4.h"
30 
31 uintmax_t min(uintmax_t a, uintmax_t b);
32 uintmax_t max(uintmax_t a, uintmax_t b);
33 uintmax_t euclidean_gcd(uintmax_t a, uintmax_t b);
34 expression* prime_factors(uintmax_t source);
35 uintmax_t* binomial_coefficients(uint8_t n);
36 uint8_t addition(uintmax_t* result, uintmax_t a, uintmax_t b);
37 uint8_t multiplication(uintmax_t* result, uintmax_t a, uintmax_t b);
38 uint8_t int_power(uintmax_t* result, uintmax_t base, uintmax_t exponent);
39 void int_root(uintmax_t* factor, uintmax_t* remainder, uintmax_t base, uintmax_t degree);
40 
41 #endif /* math_foundation_h */
symbolic4.h
int_root
void int_root(uintmax_t *factor, uintmax_t *remainder, uintmax_t base, uintmax_t degree)
Definition: math_foundation.c:152
int_power
uint8_t int_power(uintmax_t *result, uintmax_t base, uintmax_t exponent)
Definition: math_foundation.c:142
prime_factors
expression * prime_factors(uintmax_t source)
Definition: math_foundation.c:65
expression
Definition: expression.h:112
min
uintmax_t min(uintmax_t a, uintmax_t b)
Definition: math_foundation.c:28
euclidean_gcd
uintmax_t euclidean_gcd(uintmax_t a, uintmax_t b)
Computes the GCD of two integers.
Definition: math_foundation.c:51
max
uintmax_t max(uintmax_t a, uintmax_t b)
Definition: math_foundation.c:32
binomial_coefficients
uintmax_t * binomial_coefficients(uint8_t n)
Definition: math_foundation.c:106
multiplication
uint8_t multiplication(uintmax_t *result, uintmax_t a, uintmax_t b)
Definition: math_foundation.c:133
addition
uint8_t addition(uintmax_t *result, uintmax_t a, uintmax_t b)
Definition: math_foundation.c:124