Skip to content

Commit

Permalink
fixup! squash frac: Rewrite algorithm for speed and simplicity
Browse files Browse the repository at this point in the history
  • Loading branch information
Joakim Nohlgård committed Aug 14, 2018
1 parent 4f320bf commit 443090f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion sys/include/frac.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#ifndef FRAC_H
#define FRAC_H

#include <assert.h>
#include <stdint.h>

#ifdef __cplusplus
Expand Down
6 changes: 1 addition & 5 deletions tests/frac-config/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ int main(void)
printf("Static initialization of frac_t for (%" PRIu32 " / %" PRIu32 "):\n",
num, den);
puts("(Copy and paste into your code)\n");
printf("{\n"
" .num = %" PRIu32 ",\n"
" .den = %" PRIu32 ",\n"
" .div = { .magic = 0x%" PRIx64 "ull, .more = 0x%02x },\n"
"}\n\n", frac.num, frac.den, frac.div.magic, (unsigned)frac.div.more );
printf("{ .frac = 0x%" PRIx32 ", .shift = %u }\n\n", frac.frac, (unsigned)frac.shift);
}
return 0;
}

0 comments on commit 443090f

Please sign in to comment.