Does a lot of work towards the PIT
Added a math library, with clamp and POW. added printf support for printing doubles added a few helper functions in PIT for calcaulting the time in seconds of a clock cycle based on divisor
This commit is contained in:
9
libc/math/pow.c
Normal file
9
libc/math/pow.c
Normal file
@ -0,0 +1,9 @@
|
||||
#include <math.h>
|
||||
|
||||
int pow(int base, int exp)
|
||||
{
|
||||
int res = base;
|
||||
for (int i = 0; i < exp; i++)
|
||||
res *= base;
|
||||
return res;
|
||||
}
|
Reference in New Issue
Block a user