Skip to content
Snippets Groups Projects
Commit c47259c7 authored by Florian Prill's avatar Florian Prill
Browse files

[event_generic_review] example call to print_number.

parent 29599513
No related branches found
No related tags found
1 merge request!3WIP: Event generic
...@@ -88,6 +88,13 @@ int main(void) { ...@@ -88,6 +88,13 @@ int main(void) {
#ifdef HAVE_GMP #ifdef HAVE_GMP
printf(" %d discrepancies reported.\n", cnt); printf(" %d discrepancies reported.\n", cnt);
#endif #endif
/* additional calls (test interfaces). */
t_number p1; /* dividend */
convert_basis(day_fraction1 * (t_int) 20, &p1, 2, 0);
convert_basis(days1, &p1, W_DIGITS-3, 3);
print_number(p1);
printf("test program done after %d tests.\n", NREPEAT); printf("test program done after %d tests.\n", NREPEAT);
exit(0); exit(0);
} }
......
...@@ -25,10 +25,7 @@ typedef int64_t t_int; ...@@ -25,10 +25,7 @@ typedef int64_t t_int;
typedef t_int t_number[W_DIGITS + 1]; typedef t_int t_number[W_DIGITS + 1];
#ifdef DEBUG
void print_number(const t_number x); void print_number(const t_number x);
#endif
void number_init(t_number *x, const t_int val, const unsigned int m); void number_init(t_number *x, const t_int val, const unsigned int m);
unsigned int length(const t_number x); unsigned int length(const t_number x);
void product(t_number *x, const t_number y, const t_int k, const t_int b, int* ret); void product(t_number *x, const t_number y, const t_int k, const t_int b, int* ret);
......
...@@ -240,8 +240,6 @@ int divide_timespan(const t_int days1, const t_int day_fraction1, ...@@ -240,8 +240,6 @@ int divide_timespan(const t_int days1, const t_int day_fraction1,
} }
#ifdef DEBUG
#include <stdio.h> #include <stdio.h>
#include <inttypes.h> #include <inttypes.h>
...@@ -252,4 +250,4 @@ void print_number(const t_number x) { ...@@ -252,4 +250,4 @@ void print_number(const t_number x) {
printf("%" PRId64 " ", x[i]); printf("%" PRId64 " ", x[i]);
printf("\n"); printf("\n");
} }
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment