libc: change some math debugging
This commit is contained in:
parent
be02291b53
commit
b73316b5f5
@ -2,7 +2,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define BAD do { if (getenv("LIBM_DEBUG")) { fprintf(stderr, "Called bad math function %s\n", __func__); } } while (0)
|
||||
extern char * _argv_0;
|
||||
#define BAD do { if (getenv("LIBM_DEBUG")) { fprintf(stderr, "%s called bad math function %s\n", _argv_0, __func__); } } while (0)
|
||||
|
||||
double acos(double x) {
|
||||
BAD;
|
||||
|
@ -3,8 +3,12 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
//#define MATH do { fprintf(stderr, "Executed math function %s\n", __func__); } while (0)
|
||||
#if 0
|
||||
extern char * _argv_0;
|
||||
#define MATH do { if (getenv("LIBM_DEBUG")) { fprintf(stderr, "%s called math function %s\n", _argv_0, __func__); } } while (0)
|
||||
#else
|
||||
#define MATH (void)0
|
||||
#endif
|
||||
|
||||
double exp(double x) {
|
||||
return pow(2.71828182846, x);
|
||||
|
Loading…
Reference in New Issue
Block a user