diff --git a/code/math/abs.c b/code/math/abs.c deleted file mode 100644 index 246376b..0000000 --- a/code/math/abs.c +++ /dev/null @@ -1,16 +0,0 @@ - -#include - -double fabs(double x) { - if(x >= 0) { - return x; - } - return -x; -} - -float fabsf(float x) { - if(x >= 0) { - return x; - } - return -x; -} diff --git a/code/math/fmod.c b/code/math/basic.c similarity index 54% rename from code/math/fmod.c rename to code/math/basic.c index 2029d25..a8baeac 100644 --- a/code/math/fmod.c +++ b/code/math/basic.c @@ -1,4 +1,20 @@ +#include + +double fabs(double x) { + if(x >= 0) { + return x; + } + return -x; +} + +float fabsf(float x) { + if(x >= 0) { + return x; + } + return -x; +} + double fmod(double x, double y) { int n = 0; while(y < x*n) { diff --git a/code/math/copysign.c b/code/math/copysign.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/cosh.c b/code/math/cosh.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/erf.c b/code/math/erf.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/erfc.c b/code/math/erfc.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/exp.c b/code/math/exp.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/acos.c b/code/math/exponential.c similarity index 100% rename from code/math/acos.c rename to code/math/exponential.c diff --git a/code/math/fdim.c b/code/math/fdim.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/acosh.c b/code/math/float-classify.c similarity index 100% rename from code/math/acosh.c rename to code/math/float-classify.c diff --git a/code/math/asin.c b/code/math/float-manupulation.c similarity index 100% rename from code/math/asin.c rename to code/math/float-manupulation.c diff --git a/code/math/floats.c b/code/math/floats.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/floor.c b/code/math/floor.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/fma.c b/code/math/fma.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/fmax.c b/code/math/fmax.c deleted file mode 100644 index ca5193a..0000000 --- a/code/math/fmax.c +++ /dev/null @@ -1,12 +0,0 @@ - -double fmax(double x, double y) { - if(x>y) return x; - return y; -} - -float fmaxf(float x, float y) { - if(x>y) return x; - return y; -} - - diff --git a/code/math/frexp.c b/code/math/frexp.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/asinh.c b/code/math/hyperbolic.c similarity index 100% rename from code/math/asinh.c rename to code/math/hyperbolic.c diff --git a/code/math/hypot.c b/code/math/hypot.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/ilogb.c b/code/math/ilogb.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/ldexp.c b/code/math/ldexp.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/lgamma.c b/code/math/lgamma.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/llrint.c b/code/math/llrint.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/llround.c b/code/math/llround.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/log.c b/code/math/log.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/lrint.c b/code/math/lrint.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/mod.c b/code/math/mod.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/nan.c b/code/math/nan.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/nearbyint.c b/code/math/nearbyint.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/atan.c b/code/math/nearest-int.c similarity index 100% rename from code/math/atan.c rename to code/math/nearest-int.c diff --git a/code/math/nextafter.c b/code/math/nextafter.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/pow.c b/code/math/pow.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/atanh.c b/code/math/power.c similarity index 100% rename from code/math/atanh.c rename to code/math/power.c diff --git a/code/math/cbrt.c b/code/math/probability-statistics.c similarity index 100% rename from code/math/cbrt.c rename to code/math/probability-statistics.c diff --git a/code/math/remainder.c b/code/math/remainder.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/remquo.c b/code/math/remquo.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/rint.c b/code/math/rint.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/scalbln.c b/code/math/scalbln.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/scalbnf.c b/code/math/scalbnf.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/sin.c b/code/math/sin.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/sinh.c b/code/math/sinh.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/sqrt.c b/code/math/sqrt.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/tan.c b/code/math/tan.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/tanh.c b/code/math/tanh.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/tgamma.c b/code/math/tgamma.c deleted file mode 100644 index e69de29..0000000 diff --git a/code/math/ceil.c b/code/math/trigonometry.c similarity index 100% rename from code/math/ceil.c rename to code/math/trigonometry.c diff --git a/code/math/trunc.c b/code/math/trunc.c deleted file mode 100644 index e69de29..0000000