Skip to content

Commit

Permalink
libc: more useful stub pow() for aarch64 so Quake plays
Browse files Browse the repository at this point in the history
  • Loading branch information
klange committed Oct 26, 2022
1 parent d996223 commit a24baa2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libc/arch/aarch64/bad.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* bad math */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

double sqrt(double x) {
Expand Down Expand Up @@ -40,7 +42,10 @@ double atan2(double y, double x) {
}

double pow(double x, double y) {
return 0.0;
if (getenv("LIBM_DEBUG")) {
fprintf(stderr, "pow(%f, %f)\n", x, y);
}
return x;
}

double fmod(double x, double y) {
Expand Down

0 comments on commit a24baa2

Please sign in to comment.