/usr/share/doc/wadc/include/math.h is in wadc 2.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | /*
* math.h - part of WadC
* Copyright © 2016 Jonathan Dowland <jon@dow.land>
*
* Distributed under the terms of the GNU GPL Version 2
* See file LICENSE.txt
*
* Math routines
*/
pow(a,b) {
eq(b,0) ? 1 : {
mul(a, pow(a, sub(b,1)))
}
}
lshift(a,b) {
mul(a, pow(2,b))
}
rshift(a,b) { -- signed right shift
div(a, pow(2,b))
}
even(x) {
eq(x,mul(2,div(x,2)))
}
odd(x) {
even(x) ? 0 : 1
}
|