Files
CervusOS/libc/src/math/pow10.c
T
alexvoste 1a9fd27a31 push
2026-05-07 02:22:25 +03:00

17 lines
286 B
C

#include <math.h>
double pow10(int n) {
double result = 1.0;
if (n >= 0) {
for (int i = 0; i < n; i++) {
result *= 10.0;
}
} else {
for (int i = 0; i < -n; i++) {
result /= 10.0;
}
}
return result;
}