Skip to content

Commit a24baa2

Browse files
committed
libc: more useful stub pow() for aarch64 so Quake plays
1 parent d996223 commit a24baa2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

libc/arch/aarch64/bad.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* bad math */
2+
#include <stdio.h>
3+
#include <stdlib.h>
24
#include <math.h>
35

46
double sqrt(double x) {
@@ -40,7 +42,10 @@ double atan2(double y, double x) {
4042
}
4143

4244
double pow(double x, double y) {
43-
return 0.0;
45+
if (getenv("LIBM_DEBUG")) {
46+
fprintf(stderr, "pow(%f, %f)\n", x, y);
47+
}
48+
return x;
4449
}
4550

4651
double fmod(double x, double y) {

0 commit comments

Comments
 (0)