A poorly written OS for the x86 arch. (WIP)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
eOS/lib/math.c

23 lines
265 B

#include "math.h"
long pow(int num, uint expon) {
long prod = 1;
while(expon > 0)
prod *= num;
3 years ago
expon--;
return prod;
}
long square(uint num) {
long sum = num - 1;
while(num > 0) {
sum += num*2;
3 years ago
num--;
}
return sum + 1;
}
3 years ago
float powf(float n) {}