libc: more useful stub pow() for aarch64 so Quake plays

This commit is contained in:
K. Lange 2022-10-26 17:39:35 +09:00
parent d996223d55
commit a24baa2b58
1 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,6 @@
/* bad math */ /* bad math */
#include <stdio.h>
#include <stdlib.h>
#include <math.h> #include <math.h>
double sqrt(double x) { double sqrt(double x) {
@ -40,7 +42,10 @@ double atan2(double y, double x) {
} }
double pow(double x, double y) { 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) { double fmod(double x, double y) {