aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Weigt <juw@posteo.de>2026-02-09 22:31:37 +0100
committerJulian Weigt <juw@posteo.de>2026-02-09 22:34:48 +0100
commite02b151999af3e2fdc74d302173000f562930cb6 (patch)
tree0d98b26eb98bca14f44e8a8258a3c797dfedced8
parent98399651862197ddf0f8215460ca91c8592c761f (diff)
Write some instructions.
-rw-r--r--README.md10
-rw-r--r--charf.c16
2 files changed, 22 insertions, 4 deletions
diff --git a/README.md b/README.md
index f422ba8..a4ed6f1 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,14 @@ builds three files:
- `charf_error` does computations using floating point (`double`) numbers and gives an upper bound for the total rounding error.
- `charf_exact` does exact computations using fractions. Nominator and denominator are of type `unsigned long long` and bounded in size accordingly.
+# Computation
+
+By default, the program goes through all possible characteristic functions on circles from length 2 to 36, considers derivatives from order 0 to 64 and exponents p = 1,2,4,8,∞.
+Computing the maximal function of a function is the most computationally complex part. This means it is time efficient to consider several orders of derivative and exponents at the same time, in particular since the (k+1)th derivative is computed using the kth derivative.
+
+The program continuously outputs whenever it finds a function that beats the last record for the largest ratio of the L<sup>p</sup> norm of the kth derivative of the maximal function and the function.
+It is also possible to print the results in human readable format and as a latex table.
+
# Correctness
-I am relatively confident that the error bounds are correct for all operations except exponentiation, which is not used for p∈{1,∞}.
+I am relatively confident that the computed error bounds are correct for all operations except exponentiation, which is not used for p∈{1,∞}.
diff --git a/charf.c b/charf.c
index 56e7b74..d1dbd33 100644
--- a/charf.c
+++ b/charf.c
@@ -40,13 +40,17 @@ Floating point without error bounds are the default.*/
typedef unsigned long index_t;
-/*maximum length of the circle*/
+/*maximum length of the circle
+Adjust as desired.*/
#define N 36
-/*maximal order of derivative*/
+/*maximal order of derivative
+Adjust as desired.*/
#define K 64
-/*maximal number of exponents*/
+/*maximal number of exponents
+Adjust as desired.
+Which exponents are considered is set using the array exponents in the beginning of the main routine.*/
#define P 5
/*Given function f on domain [0,D-1], compute derivative of order k and store result in df.*/
@@ -523,6 +527,12 @@ void* handle_threads(void* arguments){
}
int main() {
+ /*
+ Array of exponents to be considered.
+ Default: 1,2,4,8,∞.
+ Adjust as desired.
+ Note, that the macro P defined in the beginning of the file has to be adjusted in case fewer or more exponents are to be considered.
+ */
EXPTYPE exponents[P];
exponents[0] = int_to_exptype(1);
exponents[1] = int_to_exptype(2);