]> git.gir.st - Chiptunes-pms150c.git/commit - bsv.c
new version
authorTobias Girstmair <tobi@isticktoit.net>
Thu, 4 Mar 2021 12:27:09 +0000 (13:27 +0100)
committerTobias Girstmair <tobi@isticktoit.net>
Thu, 4 Mar 2021 12:36:03 +0000 (13:36 +0100)
commit2ae98f0b3db825606a7ecfdb4cf3e9ea6c6dbbce
treeed31325d7f018065d126deda0f4c99e0d7c1b31d
parent7e0dee10c4afc833c4510933a115dde64c360d80
new version

div6 was prototyped with this program:

typedef unsigned char u8;
int main(void) {
for (int i = 0; i <= 0x78; i++) {
u8 real = i/6;
u8 test = i;

test >>= 1;
test += i;

test >>= 1;
test += 0;

test >>= 1;
test += i;

test >>= 1;
test += 0;

test >>= 1;
test += i;

test >>= 1;
test += 0;

test >>= 1;
test >>= 1;

if (test != real)
printf ("%hhd/6 == %hhd != %hhd\n", i, real, test);
}
return 0;
}
bsv.c
Imprint / Impressum