bugfix: 修复浮点数打印错误的bug

This commit is contained in:
fslongjin
2022-07-12 13:19:51 +08:00
parent 676260c537
commit 7670031b11
16 changed files with 235 additions and 35 deletions

10
user/libs/libc/math/pow.c Normal file
View File

@ -0,0 +1,10 @@
#include "math.h"
#include <libc/stddef.h>
int64_t pow(int64_t x, int y)
{
int64_t res = 1;
for (int i = 0; i < y; ++i)
res *= x;
return res;
}