joeylib2/make/support/atarist/include-shim/math.h

25 lines
722 B
C

// Minimal math.h shim for the m68k-atari-mint toolchain (mintlib
// doesn't ship <math.h> or libm). Declares only what libxmp-lite
// reaches for; the implementations live in math_shim.c next to this
// header. Accuracy is sufficient for libxmp-lite's note-period
// conversion, not for general-purpose use.
#ifndef JOEY_ATARIST_MATH_SHIM_H
#define JOEY_ATARIST_MATH_SHIM_H
#define M_LN2 0.69314718055994530942
#define M_PI 3.14159265358979323846
double ceil(double x);
double floor(double x);
double log(double x);
double pow(double base, double exp);
double trunc(double x);
float ceilf(float x);
float floorf(float x);
float logf(float x);
float powf(float base, float exp);
float truncf(float x);
#endif