Index: boot/Makefile.common
===================================================================
--- boot/Makefile.common	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ boot/Makefile.common	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -244,4 +244,5 @@
 	$(USPACE_PATH)/lib/sif/test-libsif \
 	$(USPACE_PATH)/lib/uri/test-liburi \
+	$(USPACE_PATH)/lib/math/test-libmath \
 	$(USPACE_PATH)/drv/bus/usb/xhci/test-xhci \
 	$(USPACE_PATH)/app/bdsh/test-bdsh \
Index: uspace/Makefile.common
===================================================================
--- uspace/Makefile.common	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ uspace/Makefile.common	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -109,10 +109,4 @@
 LIBSOFTINT_PREFIX = $(LIB_PREFIX)/softint
 
-LIBMATH_PREFIX = $(LIB_PREFIX)/math
-LIBMATH_INCLUDES_FLAGS = \
-	-I$(LIBMATH_PREFIX)/include \
-	-I$(LIBMATH_PREFIX)/arch/$(UARCH)/include
-
-LIBPOSIX_PREFIX = $(LIB_PREFIX)/posix
 LIBDLTEST_PREFIX = $(LIB_PREFIX)/dltest
 
Index: uspace/app/tester/float/float2.c
===================================================================
--- uspace/app/tester/float/float2.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ uspace/app/tester/float/float2.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -43,61 +43,4 @@
 };
 
-static double arguments_acos[OPERANDS] = {
-	-0.936456687291, -0.504846104600, 0.862318872288, 0.964966028492,
-	0.987353618220, 1.0, -0.194939922623, 0.978471923925, -0.999023478833,
-	0.540302305868
-};
-
-static double arguments_asin[OPERANDS] = {
-	-0.350783227690, -0.863209366649, -0.506365641110, -0.262374853704,
-	0.158533380044, 0.0, 0.980815184715, -0.206379975025, -0.044182448332,
-	0.841470984808
-};
-
-static double arguments_atan[OPERANDS] = {
-	3.5, 100.0, 50.0, 768.3156, 1080.499999, 1.0, 66.0,
-	2.718281828459045, 9.9, 0.001
-};
-
-static double arguments_exp[OPERANDS] = {
-	3.5, -2.1, 50.0, 0.0, 1.0, 13.2, -1.1, -5.5, 0.1, -66.0
-};
-
-static double arguments_log[OPERANDS] = {
-	3.5, 100.0, 50.0, 768.3156, 1080.499999, 1.0, 66.0,
-	2.718281828459045, 9.9, 0.001
-};
-
-static double arguments_sqrt[OPERANDS] = {
-	3.5, 100.0, 50.0, 768.3156, 1080.499999, 1.0, 66.0,
-	2.718281828459045, 9.9, 0.001
-};
-
-static double arguments_tanh[OPERANDS] = {
-	3.5, -2.1, 50.0, 0.0, 1.0, 13.2, -1.1, -5.5, 0.000001, -66000000.0
-};
-
-static double results_acos[OPERANDS] = {
-	2.783185307180, 2.100000000000, 0.530964914873, 0.265482457437,
-	0.159205070272, 0.000000000000, 1.766992524091, 0.207873834887,
-	3.097395817941, 1.000000000000
-};
-
-static double results_asin[OPERANDS] = {
-	-0.358407346411, -1.041592653590, -0.530964914874, -0.265482457437,
-	0.159205070273, 0.000000000000, 1.374600129498, -0.207873834889,
-	-0.044196835651, 1.000000000000
-};
-
-static double results_atan[OPERANDS] = {
-	1.292496667790, 1.560796660108, 1.550798992822, 1.569494779052,
-	1.569870829603, 0.785398163397, 1.555645970920, 1.218282905017,
-	1.470127674637, 0.000999999667
-};
-
-static double results_ceil[OPERANDS] = {
-	4.0, -2.0, 100.0, 50.0, -1024.0, 0.0, 769.0, 1081.0, -600.0, 1.0
-};
-
 static double results_cos[OPERANDS] = {
 	-0.936456687291, -0.504846104600, 0.862318872288, 0.964966028492,
@@ -106,70 +49,8 @@
 };
 
-static double results_cosh[OPERANDS] = {
-	16.572824671057, 4.144313170410, 2592352764293536022528.000000000000,
-	1.000000000000, 1.543080634815, 270182.468624271103, 1.668518553822,
-	122.348009517829, 1.005004168056, 23035933171656458903220125696.0
-};
-
-static double results_fabs[OPERANDS] = {
-	3.5, 2.1, 100.0, 50.0, 1024.0, 0.0, 768.3156, 1080.499999, 600.0, 1.0
-};
-
-static double results_floor[OPERANDS] = {
-	3.0, -3.0, 100.0, 50.0, -1024.0, 0.0, 768.0, 1080.0, -600.0, 1.0
-};
-
-static double results_exp[OPERANDS] = {
-	33.115451958692, 0.122456428253, 5184705528587072045056.0,
-	1.000000000000, 2.718281828459, 540364.937246691552, 0.332871083698,
-	0.004086771438, 1.105170918076, 0.000000000000
-};
-
-static double results_log[OPERANDS] = {
-	1.252762968495, 4.605170185988, 3.912023005428, 6.644200586236,
-	6.985179175021, 0.000000000000, 4.189654742026, 1.000000000000,
-	2.292534757141, -6.907755278982
-};
-
-static double results_log10[OPERANDS] = {
-	0.544068044350, 2.000000000000, 1.698970004336, 2.885539651261,
-	3.033624770817, 0.000000000000, 1.819543935542, 0.434294481903,
-	0.995635194598, -3.000000000000
-};
-
-static double results_log2[OPERANDS] = {
-	1.807354922058, 6.643856189775, 5.643856189775, 9.585555236434,
-	10.077483355524, 0.000000000000, 6.044394119358, 1.442695040889,
-	3.307428525192, -9.965784284662
-};
-
 static double results_sin[OPERANDS] = {
 	-0.350783227690, -0.863209366649, -0.506365641110, -0.262374853704,
 	0.158533380044, 0.0, 0.980815184715, -0.206379975025, -0.044182448332,
 	0.841470984808
-};
-
-static double results_sinh[OPERANDS] = {
-	16.542627287635, -4.021856742157, 2592352764293536022528.000000000000,
-	0.000000000000, 1.175201193644, 270182.468622420449, -1.335647470124,
-	-122.343922746391, 0.100166750020, -23035933171656458903220125696.0
-};
-
-static double results_sqrt[OPERANDS] = {
-	1.870828693387, 10.000000000000, 7.071067811865, 27.718506453271,
-	32.870959812576, 1.000000000000, 8.124038404636, 1.648721270700,
-	3.146426544510, 0.031622776602
-};
-
-static double results_tan[OPERANDS] = {
-	0.374585640159, 1.709846542905, -0.587213915157, -0.271900611998,
-	0.160563932839, 0.000000000000, -5.031371570891, -0.210920691722,
-	0.044225635601, 1.557407724655
-};
-
-static double results_tanh[OPERANDS] = {
-	0.998177897611, -0.970451936613, 1.000000000000, 0.000000000000,
-	0.761594155956, 0.999999999993, -0.800499021761, -0.999966597156,
-	0.000001000000, -1.000000000000
 };
 
@@ -217,84 +98,4 @@
 
 	for (unsigned int i = 0; i < OPERANDS; i++) {
-		double res = acos(arguments_acos[i]);
-
-		if (!cmp_double(res, results_acos[i])) {
-			TPRINTF("Double precision acos failed "
-			    "(%lf != %lf, arg %u)\n", res, results_acos[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		float res = acosf(arguments_acos[i]);
-
-		if (!cmp_float(res, results_acos[i])) {
-			TPRINTF("Single precision acos failed "
-			    "(%f != %lf, arg %u)\n", res, results_acos[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		double res = asin(arguments_asin[i]);
-
-		if (!cmp_double(res, results_asin[i])) {
-			TPRINTF("Double precision asin failed "
-			    "(%lf != %lf, arg %u)\n", res, results_asin[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		float res = asinf(arguments_asin[i]);
-
-		if (!cmp_float(res, results_asin[i])) {
-			TPRINTF("Single precision asin failed "
-			    "(%f != %lf, arg %u)\n", res, results_asin[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		double res = atan(arguments_atan[i]);
-
-		if (!cmp_double(res, results_atan[i])) {
-			TPRINTF("Double precision atan failed "
-			    "(%.12lf != %.12lf, arg %u)\n", res, results_atan[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		float res = atanf(arguments_atan[i]);
-
-		if (!cmp_float(res, results_atan[i])) {
-			TPRINTF("Single precision atan failed "
-			    "(%f != %lf, arg %u)\n", res, results_atan[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		double res = ceil(arguments[i]);
-
-		if (!cmp_double(res, results_ceil[i])) {
-			TPRINTF("Double precision ceil failed "
-			    "(%lf != %lf, arg %u)\n", res, results_ceil[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		float res = ceilf(arguments[i]);
-
-		if (!cmp_float(res, results_ceil[i])) {
-			TPRINTF("Single precision ceil failed "
-			    "(%f != %lf, arg %u)\n", res, results_ceil[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
 		double res = cos(arguments[i]);
 
@@ -317,144 +118,4 @@
 
 	for (unsigned int i = 0; i < OPERANDS; i++) {
-		double res = cosh(arguments_exp[i]);
-
-		if (!cmp_double(res, results_cosh[i])) {
-			TPRINTF("Double precision cosh failed "
-			    "(%lf != %lf, arg %u)\n", res, results_cosh[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		float res = coshf(arguments_exp[i]);
-
-		if (!cmp_float(res, results_cosh[i])) {
-			TPRINTF("Single precision cosh failed "
-			    "(%f != %lf, arg %u)\n", res, results_cosh[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		double res = exp(arguments_exp[i]);
-
-		if (!cmp_double(res, results_exp[i])) {
-			TPRINTF("Double precision exp failed "
-			    "(%lf != %lf, arg %u)\n", res, results_exp[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		float res = expf(arguments_exp[i]);
-
-		if (!cmp_float(res, results_exp[i])) {
-			TPRINTF("Single precision exp failed "
-			    "(%f != %lf, arg %u)\n", res, results_exp[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		double res = fabs(arguments[i]);
-
-		if (!cmp_double(res, results_fabs[i])) {
-			TPRINTF("Double precision fabs failed "
-			    "(%lf != %lf, arg %u)\n", res, results_fabs[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		float res = fabsf(arguments[i]);
-
-		if (!cmp_float(res, results_fabs[i])) {
-			TPRINTF("Single precision fabs failed "
-			    "(%f != %lf, arg %u)\n", res, results_fabs[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		double res = floor(arguments[i]);
-
-		if (!cmp_double(res, results_floor[i])) {
-			TPRINTF("Double precision floor failed "
-			    "(%lf != %lf, arg %u)\n", res, results_floor[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		float res = floorf(arguments[i]);
-
-		if (!cmp_float(res, results_floor[i])) {
-			TPRINTF("Single precision floor failed "
-			    "(%f != %lf, arg %u)\n", res, results_floor[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		double res = log(arguments_log[i]);
-
-		if (!cmp_double(res, results_log[i])) {
-			TPRINTF("Double precision log failed "
-			    "(%lf != %lf, arg %u)\n", res, results_log[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		float res = logf(arguments_log[i]);
-
-		if (!cmp_float(res, results_log[i])) {
-			TPRINTF("Single precision log failed "
-			    "(%f != %lf, arg %u)\n", res, results_log[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		double res = log10(arguments_log[i]);
-
-		if (!cmp_double(res, results_log10[i])) {
-			TPRINTF("Double precision log10 failed "
-			    "(%lf != %lf, arg %u)\n", res, results_log10[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		float res = log10f(arguments_log[i]);
-
-		if (!cmp_float(res, results_log10[i])) {
-			TPRINTF("Single precision log10 failed "
-			    "(%f != %lf, arg %u)\n", res, results_log10[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		double res = log2(arguments_log[i]);
-
-		if (!cmp_double(res, results_log2[i])) {
-			TPRINTF("Double precision log2 failed "
-			    "(%lf != %lf, arg %u)\n", res, results_log2[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		float res = log2f(arguments_log[i]);
-
-		if (!cmp_float(res, results_log2[i])) {
-			TPRINTF("Single precision log2 failed "
-			    "(%f != %lf, arg %u)\n", res, results_log2[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
 		double res = sin(arguments[i]);
 
@@ -472,84 +133,4 @@
 			TPRINTF("Single precision sin failed "
 			    "(%f != %lf, arg %u)\n", res, results_sin[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		double res = sinh(arguments_exp[i]);
-
-		if (!cmp_double(res, results_sinh[i])) {
-			TPRINTF("Double precision sinh failed "
-			    "(%lf != %lf, arg %u)\n", res, results_sinh[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		float res = sinhf(arguments_exp[i]);
-
-		if (!cmp_float(res, results_sinh[i])) {
-			TPRINTF("Single precision sinh failed "
-			    "(%f != %lf, arg %u)\n", res, results_sinh[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		double res = sqrt(arguments_sqrt[i]);
-
-		if (!cmp_double(res, results_sqrt[i])) {
-			TPRINTF("Double precision sqrt failed "
-			    "(%lf != %lf, arg %u)\n", res, results_sqrt[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		float res = sqrtf(arguments_sqrt[i]);
-
-		if (!cmp_float(res, results_sqrt[i])) {
-			TPRINTF("Single precision sqrt failed "
-			    "(%f != %lf, arg %u)\n", res, results_sqrt[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		double res = tan(arguments[i]);
-
-		if (!cmp_double(res, results_tan[i])) {
-			TPRINTF("Double precision tan failed "
-			    "(%lf != %lf, arg %u)\n", res, results_tan[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		float res = tanf(arguments[i]);
-
-		if (!cmp_float(res, results_tan[i])) {
-			TPRINTF("Single precision tan failed "
-			    "(%f != %lf, arg %u)\n", res, results_tan[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		double res = tanh(arguments_tanh[i]);
-
-		if (!cmp_double(res, results_tanh[i])) {
-			TPRINTF("Double precision tanh failed "
-			    "(%lf != %lf, arg %u)\n", res, results_tanh[i], i);
-			fail = true;
-		}
-	}
-
-	for (unsigned int i = 0; i < OPERANDS; i++) {
-		float res = tanhf(arguments_tanh[i]);
-
-		if (!cmp_float(res, results_tanh[i])) {
-			TPRINTF("Single precision tanh failed "
-			    "(%f != %lf, arg %u)\n", res, results_tanh[i], i);
 			fail = true;
 		}
Index: uspace/lib/c/include/fenv.h
===================================================================
--- uspace/lib/c/include/fenv.h	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
+++ uspace/lib/c/include/fenv.h	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2018 CZ.NIC, z.s.p.o.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _FENV_H
+#define _FENV_H
+
+// TODO
+
+#define FE_TOWARDZERO  0
+#define FE_TONEAREST   1
+#define FE_UPWARD      2
+#define FE_DOWNWARD    3
+
+#define fegetround() FE_TONEAREST
+
+#endif
+
Index: uspace/lib/c/include/float.h
===================================================================
--- uspace/lib/c/include/float.h	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
+++ uspace/lib/c/include/float.h	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2018 CZ.NIC, z.s.p.o.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _FLOAT_H
+#define _FLOAT_H
+
+// FIXME: <float.h> is freestanding. Just include the compiler-provided file.
+
+#define FLT_MIN __FLT_MIN__
+#define FLT_DENORM_MIN __FLT_DENORM_MIN__
+#define FLT_EPSILON __FLT_EPSILON__
+
+#define FLT_MANT_DIG  __FLT_MANT_DIG__
+#define DBL_MANT_DIG  __DBL_MANT_DIG__
+#define FLT_MAX_EXP __FLT_MAX_EXP__
+#define DBL_MAX_EXP __DBL_MAX_EXP__
+
+#endif
+
Index: uspace/lib/c/include/math.h
===================================================================
--- uspace/lib/c/include/math.h	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
+++ uspace/lib/c/include/math.h	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -0,0 +1,321 @@
+/*
+ * Copyright (c) 2018 CZ.NIC, z.s.p.o.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MATH_H
+#define _MATH_H
+
+#include <limits.h>
+#include <stddef.h>
+#include <float.h>
+
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_HELENOS_SOURCE)
+
+#define M_E         2.7182818284590452354
+#define M_LOG2E     1.4426950408889634074
+#define M_LOG10E    0.43429448190325182765
+#define M_LN2       0.69314718055994530942
+#define M_LN10      2.30258509299404568402
+#define M_PI        3.14159265358979323846
+#define M_PI_2      1.57079632679489661923
+#define M_PI_4      0.78539816339744830962
+#define M_1_PI      0.31830988618379067154
+#define M_2_PI      0.63661977236758134308
+#define M_2_SQRTPI  1.12837916709551257390
+#define M_SQRT2     1.41421356237309504880
+#define M_SQRT1_2   0.70710678118654752440
+
+#endif
+
+#if FLT_EVAL_METHOD == 0
+typedef float float_t;
+typedef double double_t;
+#elif FLT_EVAL_METHOD == 1
+typedef double float_t;
+typedef double double_t;
+#elif FLT_EVAL_METHOD == 2
+typedef long double float_t;
+typedef long double double_t;
+#else
+#error Unknown FLT_EVAL_METHOD value.
+#endif
+
+#define FP_ILOGB0    INT_MIN
+#define FP_ILOGBNAN  INT_MAX
+
+#define FP_NAN        0
+#define FP_INFINITE   1
+#define FP_NORMAL     2
+#define FP_SUBNORMAL  3
+#define FP_ZERO       4
+
+int __fpclassify(size_t, ...);
+int __signbit(size_t, ...);
+int __fcompare(size_t, size_t, ...);
+
+#define __FCOMPARE_EQUAL    1
+#define __FCOMPARE_LESS     2
+#define __FCOMPARE_GREATER  4
+
+#if defined(__GNUC__) || defined(__clang__)
+
+#define HUGE_VALF  __builtin_huge_valf()
+#define HUGE_VAL   __builtin_huge_val()
+#define HUGE_VALL  __builtin_huge_vall()
+#define INFINITY   __builtin_inff()
+#define NAN        __builtin_nan("")
+
+#define fpclassify(x)  __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, (x))
+#define isfinite(x)    __builtin_isfinite(x)
+#define isinf(x)       __builtin_isinf(x)
+#define isnan(x)       __builtin_isnan(x)
+#define isnormal(x)    __builtin_isnormal(x)
+#define signbit(x)     __builtin_signbit(x)
+
+#define isgreater(x, y)      __builtin_isgreater(x, y)
+#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
+#define isless(x, y)         __builtin_isless(x, y)
+#define islessequal(x, y)    __builtin_islessequal(x, y)
+#define islessgreater(x, y)  __builtin_islessgreater(x, y)
+#define isunordered(x, y)    __builtin_isunordered(x, y)
+
+#else  /* defined(__GNUC__) || defined(__clang__) */
+
+#define HUGE_VALF  (1.0f / 0.0f)
+#define HUGE_VAL   (1.0 / 0.0)
+#define HUGE_VALL  (1.0l / 0.0l)
+#define INFINITY   (1.0f / 0.0f)
+#define NAN        (0.0 / 0.0)
+
+#define fpclassify(x)  __fpclassify(sizeof(x), (x))
+#define isfinite(x)    (fpclassify(x) > FP_INFINITE)
+#define isinf(x)       (fpclassify(x) == FP_INFINITE)
+#define isnan(x)       (fpclassify(x) == FP_NAN)
+#define isnormal(x)    (fpclassify(x) == FP_NORMAL)
+#define signbit(x)     __signbit(sizeof(x), (x))
+
+#define isgreater(x, y)      (!!(__fcompare(sizeof(x), sizeof(y), (x), (y)) & __FCOMPARE_GREATER))
+#define isgreaterequal(x, y) (!!(__fcompare(sizeof(x), sizeof(y), (x), (y)) & (__FCOMPARE_GREATER | __FCOMPARE_EQUAL))))
+#define isless(x, y)         (!!(__fcompare(sizeof(x), sizeof(y), (x), (y)) & __FCOMPARE_LESS))
+#define islessequal(x, y)    (!!(__fcompare(sizeof(x), sizeof(y), (x), (y)) & (__FCOMPARE_LESS | __FCOMPARE_EQUAL)))
+#define islessgreater(x, y)  (!!(__fcompare(sizeof(x), sizeof(y), (x), (y)) & (__FCOMPARE_LESS | __FCOMPARE_GREATER)))
+#define isunordered(x, y)    (!__fcompare(sizeof(x), sizeof(y), (x), (y)))
+
+#endif  /* defined(__GNUC__) || defined(__clang__) */
+
+
+#define MATH_ERRNO      1
+#define MATH_ERREXCEPT  2
+
+#define math_errhandling MATH_ERRNO
+
+double acos(double);
+float acosf(float);
+long double acosl(long double);
+double asin(double);
+float asinf(float);
+long double asinl(long double);
+double atan(double);
+float atanf(float);
+long double atanl(long double);
+double atan2(double, double);
+float atan2f(float, float);
+long double atan2l(long double, long double);
+double cos(double);
+float cosf(float);
+long double cosl(long double);
+double sin(double);
+float sinf(float);
+long double sinl(long double);
+double tan(double);
+float tanf(float);
+long double tanl(long double);
+double acosh(double);
+float acoshf(float);
+long double acoshl(long double);
+double asinh(double);
+float asinhf(float);
+long double asinhl(long double);
+double atanh(double);
+float atanhf(float);
+long double atanhl(long double);
+double cosh(double);
+float coshf(float);
+long double coshl(long double);
+double sinh(double);
+float sinhf(float);
+long double sinhl(long double);
+double tanh(double);
+float tanhf(float);
+long double tanhl(long double);
+double exp(double);
+float expf(float);
+long double expl(long double);
+double exp2(double);
+float exp2f(float);
+long double exp2l(long double);
+double expm1(double);
+float expm1f(float);
+long double expm1l(long double);
+double frexp(double, int *);
+float frexpf(float, int *);
+long double frexpl(long double, int *);
+int ilogb(double);
+int ilogbf(float);
+int ilogbl(long double);
+double ldexp(double, int);
+float ldexpf(float, int);
+long double ldexpl(long double, int);
+double log(double);
+float logf(float);
+long double logl(long double);
+double log10(double);
+float log10f(float);
+long double log10l(long double);
+double log1p(double);
+float log1pf(float);
+long double log1pl(long double);
+double log2(double);
+float log2f(float);
+long double log2l(long double);
+double logb(double);
+float logbf(float);
+long double logbl(long double);
+double modf(double value, double *);
+float modff(float value, float *);
+long double modfl(long double, long double *);
+double scalbn(double, int);
+float scalbnf(float, int);
+long double scalbnl(long double, int);
+double scalbln(double, long int);
+float scalblnf(float, long int);
+long double scalblnl(long double, long int);
+double cbrt(double);
+float cbrtf(float);
+long double cbrtl(long double);
+double fabs(double);
+float fabsf(float);
+long double fabsl(long double);
+double hypot(double, double);
+float hypotf(float, float);
+long double hypotl(long double, long double);
+double pow(double, double);
+float powf(float, float);
+long double powl(long double, long double);
+double sqrt(double);
+float sqrtf(float);
+long double sqrtl(long double);
+double erf(double);
+float erff(float);
+long double erfl(long double);
+double erfc(double);
+float erfcf(float);
+long double erfcl(long double);
+double lgamma(double);
+float lgammaf(float);
+long double lgammal(long double);
+double tgamma(double);
+float tgammaf(float);
+long double tgammal(long double);
+double ceil(double);
+float ceilf(float);
+long double ceill(long double);
+double floor(double);
+float floorf(float);
+long double floorl(long double);
+double nearbyint(double);
+float nearbyintf(float);
+long double nearbyintl(long double);
+double rint(double);
+float rintf(float);
+long double rintl(long double);
+long int lrint(double);
+long int lrintf(float);
+long int lrintl(long double);
+long long int llrint(double);
+long long int llrintf(float);
+long long int llrintl(long double);
+double round(double);
+float roundf(float);
+long double roundl(long double);
+long int lround(double);
+long int lroundf(float);
+long int lroundl(long double);
+long long int llround(double);
+long long int llroundf(float);
+long long int llroundl(long double);
+double trunc(double);
+float truncf(float);
+long double truncl(long double);
+double fmod(double, double);
+float fmodf(float, float);
+long double fmodl(long double, long double);
+double remainder(double, double);
+float remainderf(float, float);
+long double remainderl(long double, long double);
+double remquo(double, double, int *);
+float remquof(float, float, int *);
+long double remquol(long double, long double, int *);
+double copysign(double, double);
+float copysignf(float, float);
+long double copysignl(long double, long double);
+double nan(const char *);
+float nanf(const char *);
+long double nanl(const char *);
+double nextafter(double, double);
+float nextafterf(float, float);
+long double nextafterl(long double, long double);
+double nexttoward(double, long double);
+float nexttowardf(float, long double);
+long double nexttowardl(long double, long double);
+double fdim(double, double);
+float fdimf(float, float);
+long double fdiml(long double, long double);
+double fmax(double, double);
+float fmaxf(float, float);
+long double fmaxl(long double, long double);
+double fmin(double, double);
+float fminf(float, float);
+long double fminl(long double, long double);
+double fma(double, double, double);
+float fmaf(float, float, float);
+long double fmal(long double, long double, long double);
+
+#if defined(__GNUC__) || defined(__clang__)
+
+#define copysign __builtin_copysign
+#define copysignf __builtin_copysignf
+#define copysignl __builtin_copysignl
+
+#define nextafter __builtin_nextafter
+#define nextafterf __builtin_nextafterf
+#define nextafterl __builtin_nextafterl
+
+#endif
+
+#endif /* _MATH_H */
+
Index: uspace/lib/math/Makefile
===================================================================
--- uspace/lib/math/Makefile	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ uspace/lib/math/Makefile	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -30,42 +30,21 @@
 ROOT_PATH = $(USPACE_PREFIX)/..
 
-CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config
-
 LIBRARY = libmath
 SOVERSION = 0.0
 
-EXTRA_CFLAGS += -Iarch/$(UARCH)/include
-
--include $(CONFIG_MAKEFILE)
--include arch/$(UARCH)/Makefile.inc
-
-GENERIC_SOURCES = \
-	generic/acos.c \
-	generic/asin.c \
-	generic/atan.c \
-	generic/atan2.c \
-	generic/ceil.c \
-	generic/cosh.c \
-	generic/exp.c \
+SOURCES = \
+	generic/__fcompare.c \
+	generic/__fpclassify.c \
+	generic/__signbit.c \
 	generic/fabs.c \
-	generic/floor.c \
 	generic/fmod.c \
-	generic/frexp.c \
-	generic/ldexp.c \
-	generic/log.c \
-	generic/log10.c \
-	generic/log2.c \
-	generic/modf.c \
-	generic/pow.c \
-	generic/sinh.c \
-	generic/sqrt.c \
-	generic/tan.c \
-	generic/tanh.c \
+	generic/nearbyint.c \
+	generic/round.c \
 	generic/trig.c \
 	generic/trunc.c
 
-SOURCES = \
-	$(GENERIC_SOURCES) \
-	$(ARCH_SOURCES)
+TEST_SOURCES = \
+	test/rounding.c \
+	test/main.c
 
 include $(USPACE_PREFIX)/Makefile.common
Index: pace/lib/math/arch/abs32le/Makefile.inc
===================================================================
--- uspace/lib/math/arch/abs32le/Makefile.inc	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,29 +1,0 @@
-#
-# Copyright (c) 2014 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-ARCH_SOURCES =
Index: pace/lib/math/arch/abs32le/include/libarch/math.h
===================================================================
--- uspace/lib/math/arch/abs32le/include/libarch/math.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,548 +1,0 @@
-/*
- * Copyright (c) 2014 Martin Decky
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmathabs32le
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_abs32le_MATH_H_
-#define LIBMATH_abs32le_MATH_H_
-
-#include <acos.h>
-#include <asin.h>
-#include <atan.h>
-#include <atan2.h>
-#include <ceil.h>
-#include <cosh.h>
-#include <exp.h>
-#include <fabs.h>
-#include <floor.h>
-#include <fmod.h>
-#include <frexp.h>
-#include <ldexp.h>
-#include <log.h>
-#include <log10.h>
-#include <log2.h>
-#include <mathtypes.h>
-#include <modf.h>
-#include <pow.h>
-#include <sinh.h>
-#include <sqrt.h>
-#include <tan.h>
-#include <tanh.h>
-#include <trig.h>
-#include <trunc.h>
-
-#define HUGE_VAL FLOAT64_INF
-
-static inline float64_t acos_f64(float64_t val)
-{
-	return float64_acos(val);
-}
-
-static inline float32_t acos_f32(float32_t val)
-{
-	return float32_acos(val);
-}
-
-static inline float64_t asin_f64(float64_t val)
-{
-	return float64_asin(val);
-}
-
-static inline float32_t asin_f32(float32_t val)
-{
-	return float32_asin(val);
-}
-
-static inline float64_t atan_f64(float64_t val)
-{
-	return float64_atan(val);
-}
-
-static inline float32_t atan_f32(float32_t val)
-{
-	return float32_atan(val);
-}
-
-static inline float64_t atan2_f64(float64_t y, float64_t x)
-{
-	return float64_atan2(y, x);
-}
-
-static inline float32_t atan2_f32(float32_t y, float32_t x)
-{
-	return float32_atan2(y, x);
-}
-
-static inline float64_t ceil_f64(float64_t val)
-{
-	return float64_ceil(val);
-}
-
-static inline float32_t ceil_f32(float32_t val)
-{
-	return float32_ceil(val);
-}
-
-static inline float64_t cos_f64(float64_t val)
-{
-	return float64_cos(val);
-}
-
-static inline float32_t cos_f32(float32_t val)
-{
-	return float32_cos(val);
-}
-
-static inline float64_t cosh_f64(float64_t val)
-{
-	return float64_cosh(val);
-}
-
-static inline float32_t cosh_f32(float32_t val)
-{
-	return float32_cosh(val);
-}
-
-static inline float64_t exp_f64(float64_t val)
-{
-	return float64_exp(val);
-}
-
-static inline float32_t exp_f32(float32_t val)
-{
-	return float32_exp(val);
-}
-
-static inline float64_t fabs_f64(float64_t val)
-{
-	return float64_fabs(val);
-}
-
-static inline float32_t fabs_f32(float32_t val)
-{
-	return float32_fabs(val);
-}
-
-static inline float64_t floor_f64(float64_t val)
-{
-	return float64_floor(val);
-}
-
-static inline float32_t floor_f32(float32_t val)
-{
-	return float32_floor(val);
-}
-static inline float64_t fmod_f64(float64_t dividend, float64_t divisor)
-{
-	return float64_fmod(dividend, divisor);
-}
-
-static inline float64_t fmod_f32(float32_t dividend, float32_t divisor)
-{
-	return float32_fmod(dividend, divisor);
-}
-
-static inline float64_t frexp_f64(float64_t x, int *exp)
-{
-	return float64_frexp(x, exp);
-}
-
-static inline float64_t frexp_f32(float32_t x, int *exp)
-{
-	return float32_frexp(x, exp);
-}
-
-static inline float64_t ldexp_f64(float64_t x, int exp)
-{
-	return float64_ldexp(x, exp);
-}
-
-static inline float64_t ldexp_f32(float32_t x, int exp)
-{
-	return float32_ldexp(x, exp);
-}
-
-static inline float64_t log_f64(float64_t val)
-{
-	return float64_log(val);
-}
-
-static inline float32_t log_f32(float32_t val)
-{
-	return float32_log(val);
-}
-
-static inline float64_t log10_f64(float64_t val)
-{
-	return float64_log10(val);
-}
-
-static inline float32_t log10_f32(float32_t val)
-{
-	return float32_log10(val);
-}
-
-static inline float32_t log2_f32(float32_t val)
-{
-	return float32_log2(val);
-}
-
-static inline float64_t log2_f64(float64_t val)
-{
-	return float64_log2(val);
-}
-
-static inline float64_t modf_f64(float64_t value, float64_t *iptr)
-{
-	return float64_modf(value, iptr);
-}
-
-static inline float64_t modf_f32(float32_t value, float32_t *iptr)
-{
-	return float32_modf(value, iptr);
-}
-
-static inline float64_t pow_f64(float64_t x, float64_t y)
-{
-	return float64_pow(x, y);
-}
-
-static inline float32_t pow_f32(float32_t x, float32_t y)
-{
-	return float32_pow(x, y);
-}
-
-static inline float64_t sin_f64(float64_t val)
-{
-	return float64_sin(val);
-}
-
-static inline float32_t sin_f32(float32_t val)
-{
-	return float32_sin(val);
-}
-
-static inline float64_t sinh_f64(float64_t val)
-{
-	return float64_sinh(val);
-}
-
-static inline float32_t sinh_f32(float32_t val)
-{
-	return float32_sinh(val);
-}
-
-static inline float64_t sqrt_f64(float64_t val)
-{
-	return float64_sqrt(val);
-}
-
-static inline float32_t sqrt_f32(float32_t val)
-{
-	return float32_sqrt(val);
-}
-
-static inline float64_t tan_f64(float64_t val)
-{
-	return float64_tan(val);
-}
-
-static inline float32_t tan_f32(float32_t val)
-{
-	return float32_tan(val);
-}
-
-static inline float64_t tanh_f64(float64_t val)
-{
-	return float64_tanh(val);
-}
-
-static inline float32_t tanh_f32(float32_t val)
-{
-	return float32_tanh(val);
-}
-
-static inline float64_t trunc_f64(float64_t val)
-{
-	return float64_trunc(val);
-}
-
-static inline float32_t trunc_f32(float32_t val)
-{
-	return float32_trunc(val);
-}
-
-static inline float64_t acos(float64_t val)
-{
-	return acos_f64(val);
-}
-
-static inline float32_t acosf(float32_t val)
-{
-	return acos_f32(val);
-}
-
-static inline float64_t asin(float64_t val)
-{
-	return asin_f64(val);
-}
-
-static inline float32_t asinf(float32_t val)
-{
-	return asin_f32(val);
-}
-
-static inline float64_t atan(float64_t val)
-{
-	return atan_f64(val);
-}
-
-static inline float32_t atanf(float32_t val)
-{
-	return atan_f32(val);
-}
-
-static inline float64_t atan2(float64_t y, float64_t x)
-{
-	return atan2_f64(y, x);
-}
-
-static inline float32_t atan2f(float32_t y, float32_t x)
-{
-	return atan2_f32(y, x);
-}
-
-static inline float64_t ceil(float64_t val)
-{
-	return ceil_f64(val);
-}
-
-static inline float32_t ceilf(float32_t val)
-{
-	return ceil_f32(val);
-}
-
-static inline float64_t cos(float64_t val)
-{
-	return cos_f64(val);
-}
-
-static inline float32_t cosf(float32_t val)
-{
-	return cos_f32(val);
-}
-
-static inline float64_t cosh(float64_t val)
-{
-	return cosh_f64(val);
-}
-
-static inline float32_t coshf(float32_t val)
-{
-	return cosh_f32(val);
-}
-
-static inline float64_t exp(float64_t val)
-{
-	return exp_f64(val);
-}
-
-static inline float32_t expf(float32_t val)
-{
-	return exp_f32(val);
-}
-
-static inline float64_t fabs(float64_t val)
-{
-	return fabs_f64(val);
-}
-
-static inline float32_t fabsf(float32_t val)
-{
-	return fabs_f32(val);
-}
-
-static inline float64_t floor(float64_t val)
-{
-	return floor_f64(val);
-}
-
-static inline float32_t floorf(float32_t val)
-{
-	return floor_f32(val);
-}
-
-static inline float64_t fmod(float64_t dividend, float64_t divisor)
-{
-	return fmod_f64(dividend, divisor);
-}
-
-static inline float32_t fmodf(float32_t dividend, float32_t divisor)
-{
-	return fmod_f32(dividend, divisor);
-}
-
-static inline float64_t frexp(float64_t x, int *exp)
-{
-	return frexp_f64(x, exp);
-}
-
-static inline float32_t frexpf(float32_t x, int *exp)
-{
-	return frexp_f32(x, exp);
-}
-
-static inline float64_t ldexp(float64_t x, int exp)
-{
-	return ldexp_f64(x, exp);
-}
-
-static inline float32_t ldexpf(float32_t x, int exp)
-{
-	return ldexp_f32(x, exp);
-}
-
-static inline float64_t log(float64_t val)
-{
-	return log_f64(val);
-}
-
-static inline float32_t logf(float32_t val)
-{
-	return log_f32(val);
-}
-
-static inline float64_t log10(float64_t val)
-{
-	return log10_f64(val);
-}
-
-static inline float32_t log10f(float32_t val)
-{
-	return log10_f32(val);
-}
-
-static inline float64_t log2(float64_t val)
-{
-	return log2_f64(val);
-}
-
-static inline float32_t log2f(float32_t val)
-{
-	return log2_f32(val);
-}
-
-static inline float64_t modf(float64_t value, float64_t *iptr)
-{
-	return modf_f64(value, iptr);
-}
-
-static inline float32_t modff(float32_t value, float32_t *iptr)
-{
-	return modf_f32(value, iptr);
-}
-
-static inline float64_t pow(float64_t x, float64_t y)
-{
-	return pow_f64(x, y);
-}
-
-static inline float32_t powf(float32_t x, float32_t y)
-{
-	return pow_f32(x, y);
-}
-
-static inline float64_t sin(float64_t val)
-{
-	return sin_f64(val);
-}
-
-static inline float32_t sinf(float32_t val)
-{
-	return sin_f32(val);
-}
-
-static inline float64_t sinh(float64_t val)
-{
-	return sinh_f64(val);
-}
-
-static inline float32_t sinhf(float32_t val)
-{
-	return sinh_f32(val);
-}
-
-static inline float64_t sqrt(float64_t val)
-{
-	return sqrt_f64(val);
-}
-
-static inline float32_t sqrtf(float32_t val)
-{
-	return sqrt_f32(val);
-}
-
-static inline float64_t tan(float64_t val)
-{
-	return tan_f64(val);
-}
-
-static inline float32_t tanf(float32_t val)
-{
-	return tan_f32(val);
-}
-
-static inline float64_t tanh(float64_t val)
-{
-	return tanh_f64(val);
-}
-
-static inline float32_t tanhf(float32_t val)
-{
-	return tanh_f32(val);
-}
-
-static inline float64_t trunc(float64_t val)
-{
-	return trunc_f64(val);
-}
-
-static inline float32_t truncf(float32_t val)
-{
-	return trunc_f32(val);
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/arch/amd64/Makefile.inc
===================================================================
--- uspace/lib/math/arch/amd64/Makefile.inc	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,32 +1,0 @@
-#
-# Copyright (c) 2014 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-ARCH_SOURCES = \
-	arch/$(UARCH)/src/sin.S \
-	arch/$(UARCH)/src/cos.S \
-	arch/$(UARCH)/src/trunc.S
Index: pace/lib/math/arch/amd64/include/libarch/math.h
===================================================================
--- uspace/lib/math/arch/amd64/include/libarch/math.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,539 +1,0 @@
-/*
- * Copyright (c) 2014 Martin Decky
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmathamd64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_amd64_MATH_H_
-#define LIBMATH_amd64_MATH_H_
-
-#include <acos.h>
-#include <asin.h>
-#include <atan.h>
-#include <atan2.h>
-#include <ceil.h>
-#include <cosh.h>
-#include <exp.h>
-#include <fabs.h>
-#include <floor.h>
-#include <fmod.h>
-#include <frexp.h>
-#include <ldexp.h>
-#include <log.h>
-#include <log10.h>
-#include <log2.h>
-#include <mathtypes.h>
-#include <modf.h>
-#include <pow.h>
-#include <sinh.h>
-#include <sqrt.h>
-#include <tan.h>
-#include <tanh.h>
-#include <trig.h>
-#include <trunc.h>
-
-#define HUGE_VAL FLOAT64_INF
-
-static inline float64_t acos_f64(float64_t val)
-{
-	return float64_acos(val);
-}
-
-static inline float32_t acos_f32(float32_t val)
-{
-	return float32_acos(val);
-}
-
-static inline float64_t asin_f64(float64_t val)
-{
-	return float64_asin(val);
-}
-
-static inline float32_t asin_f32(float32_t val)
-{
-	return float32_asin(val);
-}
-
-static inline float64_t atan_f64(float64_t val)
-{
-	return float64_atan(val);
-}
-
-static inline float32_t atan_f32(float32_t val)
-{
-	return float32_atan(val);
-}
-
-static inline float64_t atan2_f64(float64_t y, float64_t x)
-{
-	return float64_atan2(y, x);
-}
-
-static inline float32_t atan2_f32(float32_t y, float32_t x)
-{
-	return float32_atan2(y, x);
-}
-
-static inline float64_t ceil_f64(float64_t val)
-{
-	return float64_ceil(val);
-}
-
-static inline float32_t ceil_f32(float32_t val)
-{
-	return float32_ceil(val);
-}
-
-extern float64_t cos_f64(float64_t);
-
-static inline float32_t cos_f32(float32_t val)
-{
-	return (float32_t)cos_f64((float64_t)val);
-}
-
-static inline float64_t cosh_f64(float64_t val)
-{
-	return float64_cosh(val);
-}
-
-static inline float32_t cosh_f32(float32_t val)
-{
-	return float32_cosh(val);
-}
-
-static inline float64_t exp_f64(float64_t val)
-{
-	return float64_exp(val);
-}
-
-static inline float32_t exp_f32(float32_t val)
-{
-	return float32_exp(val);
-}
-
-static inline float64_t fabs_f64(float64_t val)
-{
-	return float64_fabs(val);
-}
-
-static inline float32_t fabs_f32(float32_t val)
-{
-	return float32_fabs(val);
-}
-
-static inline float64_t floor_f64(float64_t val)
-{
-	return float64_floor(val);
-}
-
-static inline float32_t floor_f32(float32_t val)
-{
-	return float32_floor(val);
-}
-static inline float64_t fmod_f64(float64_t dividend, float64_t divisor)
-{
-	return float64_fmod(dividend, divisor);
-}
-
-static inline float64_t fmod_f32(float32_t dividend, float32_t divisor)
-{
-	return float32_fmod(dividend, divisor);
-}
-
-static inline float64_t frexp_f64(float64_t x, int *exp)
-{
-	return float64_frexp(x, exp);
-}
-
-static inline float64_t frexp_f32(float32_t x, int *exp)
-{
-	return float32_frexp(x, exp);
-}
-
-static inline float64_t ldexp_f64(float64_t x, int exp)
-{
-	return float64_ldexp(x, exp);
-}
-
-static inline float64_t ldexp_f32(float32_t x, int exp)
-{
-	return float32_ldexp(x, exp);
-}
-
-static inline float64_t log_f64(float64_t val)
-{
-	return float64_log(val);
-}
-
-static inline float32_t log_f32(float32_t val)
-{
-	return float32_log(val);
-}
-
-static inline float64_t log10_f64(float64_t val)
-{
-	return float64_log10(val);
-}
-
-static inline float32_t log10_f32(float32_t val)
-{
-	return float32_log10(val);
-}
-
-static inline float32_t log2_f32(float32_t val)
-{
-	return float32_log2(val);
-}
-
-static inline float64_t log2_f64(float64_t val)
-{
-	return float64_log2(val);
-}
-
-static inline float64_t modf_f64(float64_t value, float64_t *iptr)
-{
-	return float64_modf(value, iptr);
-}
-
-static inline float64_t modf_f32(float32_t value, float32_t *iptr)
-{
-	return float32_modf(value, iptr);
-}
-
-static inline float64_t pow_f64(float64_t x, float64_t y)
-{
-	return float64_pow(x, y);
-}
-
-static inline float32_t pow_f32(float32_t x, float32_t y)
-{
-	return float32_pow(x, y);
-}
-
-extern float64_t sin_f64(float64_t);
-
-static inline float32_t sin_f32(float32_t val)
-{
-	return (float32_t)sin_f64((float64_t)val);
-}
-
-static inline float64_t sinh_f64(float64_t val)
-{
-	return float64_sinh(val);
-}
-
-static inline float32_t sinh_f32(float32_t val)
-{
-	return float32_sinh(val);
-}
-
-static inline float64_t sqrt_f64(float64_t val)
-{
-	return float64_sqrt(val);
-}
-
-static inline float32_t sqrt_f32(float32_t val)
-{
-	return float32_sqrt(val);
-}
-
-static inline float64_t tan_f64(float64_t val)
-{
-	return float64_tan(val);
-}
-
-static inline float32_t tan_f32(float32_t val)
-{
-	return float32_tan(val);
-}
-
-static inline float64_t tanh_f64(float64_t val)
-{
-	return float64_tanh(val);
-}
-
-static inline float32_t tanh_f32(float32_t val)
-{
-	return float32_tanh(val);
-}
-
-extern float64_t trunc_f64(float64_t);
-
-static inline float32_t trunc_f32(float32_t val)
-{
-	return (float32_t)trunc_f64((float64_t)val);
-}
-
-static inline float64_t acos(float64_t val)
-{
-	return acos_f64(val);
-}
-
-static inline float32_t acosf(float32_t val)
-{
-	return acos_f32(val);
-}
-
-static inline float64_t asin(float64_t val)
-{
-	return asin_f64(val);
-}
-
-static inline float32_t asinf(float32_t val)
-{
-	return asin_f32(val);
-}
-
-static inline float64_t atan(float64_t val)
-{
-	return atan_f64(val);
-}
-
-static inline float32_t atanf(float32_t val)
-{
-	return atan_f32(val);
-}
-
-static inline float64_t atan2(float64_t y, float64_t x)
-{
-	return atan2_f64(y, x);
-}
-
-static inline float32_t atan2f(float32_t y, float32_t x)
-{
-	return atan2_f32(y, x);
-}
-
-static inline float64_t ceil(float64_t val)
-{
-	return ceil_f64(val);
-}
-
-static inline float32_t ceilf(float32_t val)
-{
-	return ceil_f32(val);
-}
-
-static inline float64_t cos(float64_t val)
-{
-	return cos_f64(val);
-}
-
-static inline float32_t cosf(float32_t val)
-{
-	return cos_f32(val);
-}
-
-static inline float64_t cosh(float64_t val)
-{
-	return cosh_f64(val);
-}
-
-static inline float32_t coshf(float32_t val)
-{
-	return cosh_f32(val);
-}
-
-static inline float64_t exp(float64_t val)
-{
-	return exp_f64(val);
-}
-
-static inline float32_t expf(float32_t val)
-{
-	return exp_f32(val);
-}
-
-static inline float64_t fabs(float64_t val)
-{
-	return fabs_f64(val);
-}
-
-static inline float32_t fabsf(float32_t val)
-{
-	return fabs_f32(val);
-}
-
-static inline float64_t floor(float64_t val)
-{
-	return floor_f64(val);
-}
-
-static inline float32_t floorf(float32_t val)
-{
-	return floor_f32(val);
-}
-
-static inline float64_t fmod(float64_t dividend, float64_t divisor)
-{
-	return fmod_f64(dividend, divisor);
-}
-
-static inline float32_t fmodf(float32_t dividend, float32_t divisor)
-{
-	return fmod_f32(dividend, divisor);
-}
-
-static inline float64_t frexp(float64_t x, int *exp)
-{
-	return frexp_f64(x, exp);
-}
-
-static inline float32_t frexpf(float32_t x, int *exp)
-{
-	return frexp_f32(x, exp);
-}
-
-static inline float64_t ldexp(float64_t x, int exp)
-{
-	return ldexp_f64(x, exp);
-}
-
-static inline float32_t ldexpf(float32_t x, int exp)
-{
-	return ldexp_f32(x, exp);
-}
-
-static inline float64_t log(float64_t val)
-{
-	return log_f64(val);
-}
-
-static inline float32_t logf(float32_t val)
-{
-	return log_f32(val);
-}
-
-static inline float64_t log10(float64_t val)
-{
-	return log10_f64(val);
-}
-
-static inline float32_t log10f(float32_t val)
-{
-	return log10_f32(val);
-}
-
-static inline float64_t log2(float64_t val)
-{
-	return log2_f64(val);
-}
-
-static inline float32_t log2f(float32_t val)
-{
-	return log2_f32(val);
-}
-
-static inline float64_t modf(float64_t value, float64_t *iptr)
-{
-	return modf_f64(value, iptr);
-}
-
-static inline float32_t modff(float32_t value, float32_t *iptr)
-{
-	return modf_f32(value, iptr);
-}
-
-static inline float64_t pow(float64_t x, float64_t y)
-{
-	return pow_f64(x, y);
-}
-
-static inline float32_t powf(float32_t x, float32_t y)
-{
-	return pow_f32(x, y);
-}
-
-static inline float64_t sin(float64_t val)
-{
-	return sin_f64(val);
-}
-
-static inline float32_t sinf(float32_t val)
-{
-	return sin_f32(val);
-}
-
-static inline float64_t sinh(float64_t val)
-{
-	return sinh_f64(val);
-}
-
-static inline float32_t sinhf(float32_t val)
-{
-	return sinh_f32(val);
-}
-
-static inline float64_t sqrt(float64_t val)
-{
-	return sqrt_f64(val);
-}
-
-static inline float32_t sqrtf(float32_t val)
-{
-	return sqrt_f32(val);
-}
-
-static inline float64_t tan(float64_t val)
-{
-	return tan_f64(val);
-}
-
-static inline float32_t tanf(float32_t val)
-{
-	return tan_f32(val);
-}
-
-static inline float64_t tanh(float64_t val)
-{
-	return tanh_f64(val);
-}
-
-static inline float32_t tanhf(float32_t val)
-{
-	return tanh_f32(val);
-}
-
-static inline float64_t trunc(float64_t val)
-{
-	return trunc_f64(val);
-}
-
-static inline float32_t truncf(float32_t val)
-{
-	return trunc_f32(val);
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/arch/amd64/include/libarch/x87.h
===================================================================
--- uspace/lib/math/arch/amd64/include/libarch/x87.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*
- * Copyright (c) 2014 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmathamd64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_amd64_X87_H_
-#define LIBMATH_amd64_X87_H_
-
-#define X87_CONTROL_WORD_RC_MASK           0x0c00
-#define X87_CONTROL_WORD_RC_ROUND_NEAREST  0x0000
-#define X87_CONTROL_WORD_RC_ROUND_DOWN     0x0400
-#define X87_CONTROL_WORD_RC_ROUND_UP       0x0800
-#define X87_CONTROL_WORD_RC_TRUNCATE       0x0c00
-
-#define X87_STATUS_WORD_C2_MASK  0x0400
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/arch/amd64/src/cos.S
===================================================================
--- uspace/lib/math/arch/amd64/src/cos.S	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,78 +1,0 @@
-#
-# Copyright (c) 2014 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#include <abi/asmtool.h>
-#include <libarch/x87.h>
-
-.text
-
-FUNCTION_BEGIN(cos_f64)
-	pushq %rbp
-	movq %rsp, %rbp
-
-	# compute cosine (using red zone)
-
-	movsd %xmm0, -8(%rbp)
-	fldl -8(%rbp)
-
-	fcos
-
-	# detect if source operand is out of range
-
-	fnstsw %ax
-	andw $X87_STATUS_WORD_C2_MASK, %ax
-	jnz fix_range
-
-		fstpl -8(%rbp)
-		movsd -8(%rbp), %xmm0
-
-		leave
-		retq
-
-	# argument reduction
-
-	fix_range:
-		fldpi
-		fadd %st(0)
-		fxch %st(1)
-
-	reduce:
-		fprem1
-		fnstsw %ax
-		andw $X87_STATUS_WORD_C2_MASK, %ax
-		jnz reduce
-
-	fstp %st(1)
-	fcos
-
-	fstpl -8(%rbp)
-	movsd -8(%rbp), %xmm0
-
-	leave
-	retq
-FUNCTION_END(cos_f64)
Index: pace/lib/math/arch/amd64/src/sin.S
===================================================================
--- uspace/lib/math/arch/amd64/src/sin.S	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,78 +1,0 @@
-#
-# Copyright (c) 2014 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#include <abi/asmtool.h>
-#include <libarch/x87.h>
-
-.text
-
-FUNCTION_BEGIN(sin_f64)
-	pushq %rbp
-	movq %rsp, %rbp
-
-	# compute sine (using red zone)
-
-	movsd %xmm0, -8(%rbp)
-	fldl -8(%rbp)
-
-	fsin
-
-	# detect if source operand is out of range
-
-	fnstsw %ax
-	andw $X87_STATUS_WORD_C2_MASK, %ax
-	jnz fix_range
-
-		fstpl -8(%rbp)
-		movsd -8(%rbp), %xmm0
-
-		leave
-		retq
-
-	# argument reduction
-
-	fix_range:
-		fldpi
-		fadd %st(0)
-		fxch %st(1)
-
-	reduce:
-		fprem1
-		fnstsw %ax
-		andw $X87_STATUS_WORD_C2_MASK, %ax
-		jnz reduce
-
-	fstp %st(1)
-	fsin
-
-	fstpl -8(%rbp)
-	movsd -8(%rbp), %xmm0
-
-	leave
-	retq
-FUNCTION_END(sin_f64)
Index: pace/lib/math/arch/amd64/src/trunc.S
===================================================================
--- uspace/lib/math/arch/amd64/src/trunc.S	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,64 +1,0 @@
-#
-# Copyright (c) 2014 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#include <abi/asmtool.h>
-#include <libarch/x87.h>
-
-.text
-
-FUNCTION_BEGIN(trunc_f64)
-	pushq %rbp
-	movq %rsp, %rbp
-
-	# store x87 control word in the red zone
-
-	fnstcw -8(%rbp)
-	movw -8(%rbp), %ax
-
-	# set rounding control to truncate
-	# (no masking necessary for this flag)
-
-	orw $X87_CONTROL_WORD_RC_TRUNCATE, %ax
-	movw %ax, -16(%rbp)
-	fldcw -16(%rbp)
-
-	# truncate
-
-	movsd %xmm0, -16(%rbp)
-	fldl -16(%rbp)
-	frndint
-	fstpl -16(%rbp)
-	movsd -16(%rbp), %xmm0
-
-	# restore original control word
-
-	fldcw -8(%rbp)
-
-	leave
-	retq
-FUNCTION_END(trunc_f64)
Index: pace/lib/math/arch/arm32/Makefile.inc
===================================================================
--- uspace/lib/math/arch/arm32/Makefile.inc	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,29 +1,0 @@
-#
-# Copyright (c) 2014 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-ARCH_SOURCES =
Index: pace/lib/math/arch/arm32/include/libarch/math.h
===================================================================
--- uspace/lib/math/arch/arm32/include/libarch/math.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,548 +1,0 @@
-/*
- * Copyright (c) 2014 Martin Decky
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmatharm32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_arm32_MATH_H_
-#define LIBMATH_arm32_MATH_H_
-
-#include <acos.h>
-#include <asin.h>
-#include <atan.h>
-#include <atan2.h>
-#include <ceil.h>
-#include <cosh.h>
-#include <exp.h>
-#include <fabs.h>
-#include <floor.h>
-#include <fmod.h>
-#include <frexp.h>
-#include <ldexp.h>
-#include <log.h>
-#include <log10.h>
-#include <log2.h>
-#include <mathtypes.h>
-#include <modf.h>
-#include <pow.h>
-#include <sinh.h>
-#include <sqrt.h>
-#include <tan.h>
-#include <tanh.h>
-#include <trig.h>
-#include <trunc.h>
-
-#define HUGE_VAL FLOAT64_INF
-
-static inline float64_t acos_f64(float64_t val)
-{
-	return float64_acos(val);
-}
-
-static inline float32_t acos_f32(float32_t val)
-{
-	return float32_acos(val);
-}
-
-static inline float64_t asin_f64(float64_t val)
-{
-	return float64_asin(val);
-}
-
-static inline float32_t asin_f32(float32_t val)
-{
-	return float32_asin(val);
-}
-
-static inline float64_t atan_f64(float64_t val)
-{
-	return float64_atan(val);
-}
-
-static inline float32_t atan_f32(float32_t val)
-{
-	return float32_atan(val);
-}
-
-static inline float64_t atan2_f64(float64_t y, float64_t x)
-{
-	return float64_atan2(y, x);
-}
-
-static inline float32_t atan2_f32(float32_t y, float32_t x)
-{
-	return float32_atan2(y, x);
-}
-
-static inline float64_t ceil_f64(float64_t val)
-{
-	return float64_ceil(val);
-}
-
-static inline float32_t ceil_f32(float32_t val)
-{
-	return float32_ceil(val);
-}
-
-static inline float64_t cos_f64(float64_t val)
-{
-	return float64_cos(val);
-}
-
-static inline float32_t cos_f32(float32_t val)
-{
-	return float32_cos(val);
-}
-
-static inline float64_t cosh_f64(float64_t val)
-{
-	return float64_cosh(val);
-}
-
-static inline float32_t cosh_f32(float32_t val)
-{
-	return float32_cosh(val);
-}
-
-static inline float64_t exp_f64(float64_t val)
-{
-	return float64_exp(val);
-}
-
-static inline float32_t exp_f32(float32_t val)
-{
-	return float32_exp(val);
-}
-
-static inline float64_t fabs_f64(float64_t val)
-{
-	return float64_fabs(val);
-}
-
-static inline float32_t fabs_f32(float32_t val)
-{
-	return float32_fabs(val);
-}
-
-static inline float64_t floor_f64(float64_t val)
-{
-	return float64_floor(val);
-}
-
-static inline float32_t floor_f32(float32_t val)
-{
-	return float32_floor(val);
-}
-static inline float64_t fmod_f64(float64_t dividend, float64_t divisor)
-{
-	return float64_fmod(dividend, divisor);
-}
-
-static inline float64_t fmod_f32(float32_t dividend, float32_t divisor)
-{
-	return float32_fmod(dividend, divisor);
-}
-
-static inline float64_t frexp_f64(float64_t x, int *exp)
-{
-	return float64_frexp(x, exp);
-}
-
-static inline float64_t frexp_f32(float32_t x, int *exp)
-{
-	return float32_frexp(x, exp);
-}
-
-static inline float64_t ldexp_f64(float64_t x, int exp)
-{
-	return float64_ldexp(x, exp);
-}
-
-static inline float64_t ldexp_f32(float32_t x, int exp)
-{
-	return float32_ldexp(x, exp);
-}
-
-static inline float64_t log_f64(float64_t val)
-{
-	return float64_log(val);
-}
-
-static inline float32_t log_f32(float32_t val)
-{
-	return float32_log(val);
-}
-
-static inline float64_t log10_f64(float64_t val)
-{
-	return float64_log10(val);
-}
-
-static inline float32_t log10_f32(float32_t val)
-{
-	return float32_log10(val);
-}
-
-static inline float32_t log2_f32(float32_t val)
-{
-	return float32_log2(val);
-}
-
-static inline float64_t log2_f64(float64_t val)
-{
-	return float64_log2(val);
-}
-
-static inline float64_t modf_f64(float64_t value, float64_t *iptr)
-{
-	return float64_modf(value, iptr);
-}
-
-static inline float64_t modf_f32(float32_t value, float32_t *iptr)
-{
-	return float32_modf(value, iptr);
-}
-
-static inline float64_t pow_f64(float64_t x, float64_t y)
-{
-	return float64_pow(x, y);
-}
-
-static inline float32_t pow_f32(float32_t x, float32_t y)
-{
-	return float32_pow(x, y);
-}
-
-static inline float64_t sin_f64(float64_t val)
-{
-	return float64_sin(val);
-}
-
-static inline float32_t sin_f32(float32_t val)
-{
-	return float32_sin(val);
-}
-
-static inline float64_t sinh_f64(float64_t val)
-{
-	return float64_sinh(val);
-}
-
-static inline float32_t sinh_f32(float32_t val)
-{
-	return float32_sinh(val);
-}
-
-static inline float64_t sqrt_f64(float64_t val)
-{
-	return float64_sqrt(val);
-}
-
-static inline float32_t sqrt_f32(float32_t val)
-{
-	return float32_sqrt(val);
-}
-
-static inline float64_t tan_f64(float64_t val)
-{
-	return float64_tan(val);
-}
-
-static inline float32_t tan_f32(float32_t val)
-{
-	return float32_tan(val);
-}
-
-static inline float64_t tanh_f64(float64_t val)
-{
-	return float64_tanh(val);
-}
-
-static inline float32_t tanh_f32(float32_t val)
-{
-	return float32_tanh(val);
-}
-
-static inline float64_t trunc_f64(float64_t val)
-{
-	return float64_trunc(val);
-}
-
-static inline float32_t trunc_f32(float32_t val)
-{
-	return float32_trunc(val);
-}
-
-static inline float64_t acos(float64_t val)
-{
-	return acos_f64(val);
-}
-
-static inline float32_t acosf(float32_t val)
-{
-	return acos_f32(val);
-}
-
-static inline float64_t asin(float64_t val)
-{
-	return asin_f64(val);
-}
-
-static inline float32_t asinf(float32_t val)
-{
-	return asin_f32(val);
-}
-
-static inline float64_t atan(float64_t val)
-{
-	return atan_f64(val);
-}
-
-static inline float32_t atanf(float32_t val)
-{
-	return atan_f32(val);
-}
-
-static inline float64_t atan2(float64_t y, float64_t x)
-{
-	return atan2_f64(y, x);
-}
-
-static inline float32_t atan2f(float32_t y, float32_t x)
-{
-	return atan2_f32(y, x);
-}
-
-static inline float64_t ceil(float64_t val)
-{
-	return ceil_f64(val);
-}
-
-static inline float32_t ceilf(float32_t val)
-{
-	return ceil_f32(val);
-}
-
-static inline float64_t cos(float64_t val)
-{
-	return cos_f64(val);
-}
-
-static inline float32_t cosf(float32_t val)
-{
-	return cos_f32(val);
-}
-
-static inline float64_t cosh(float64_t val)
-{
-	return cosh_f64(val);
-}
-
-static inline float32_t coshf(float32_t val)
-{
-	return cosh_f32(val);
-}
-
-static inline float64_t exp(float64_t val)
-{
-	return exp_f64(val);
-}
-
-static inline float32_t expf(float32_t val)
-{
-	return exp_f32(val);
-}
-
-static inline float64_t fabs(float64_t val)
-{
-	return fabs_f64(val);
-}
-
-static inline float32_t fabsf(float32_t val)
-{
-	return fabs_f32(val);
-}
-
-static inline float64_t floor(float64_t val)
-{
-	return floor_f64(val);
-}
-
-static inline float32_t floorf(float32_t val)
-{
-	return floor_f32(val);
-}
-
-static inline float64_t fmod(float64_t dividend, float64_t divisor)
-{
-	return fmod_f64(dividend, divisor);
-}
-
-static inline float32_t fmodf(float32_t dividend, float32_t divisor)
-{
-	return fmod_f32(dividend, divisor);
-}
-
-static inline float64_t frexp(float64_t x, int *exp)
-{
-	return frexp_f64(x, exp);
-}
-
-static inline float32_t frexpf(float32_t x, int *exp)
-{
-	return frexp_f32(x, exp);
-}
-
-static inline float64_t ldexp(float64_t x, int exp)
-{
-	return ldexp_f64(x, exp);
-}
-
-static inline float32_t ldexpf(float32_t x, int exp)
-{
-	return ldexp_f32(x, exp);
-}
-
-static inline float64_t log(float64_t val)
-{
-	return log_f64(val);
-}
-
-static inline float32_t logf(float32_t val)
-{
-	return log_f32(val);
-}
-
-static inline float64_t log10(float64_t val)
-{
-	return log10_f64(val);
-}
-
-static inline float32_t log10f(float32_t val)
-{
-	return log10_f32(val);
-}
-
-static inline float64_t log2(float64_t val)
-{
-	return log2_f64(val);
-}
-
-static inline float32_t log2f(float32_t val)
-{
-	return log2_f32(val);
-}
-
-static inline float64_t modf(float64_t value, float64_t *iptr)
-{
-	return modf_f64(value, iptr);
-}
-
-static inline float32_t modff(float32_t value, float32_t *iptr)
-{
-	return modf_f32(value, iptr);
-}
-
-static inline float64_t pow(float64_t x, float64_t y)
-{
-	return pow_f64(x, y);
-}
-
-static inline float32_t powf(float32_t x, float32_t y)
-{
-	return pow_f32(x, y);
-}
-
-static inline float64_t sin(float64_t val)
-{
-	return sin_f64(val);
-}
-
-static inline float32_t sinf(float32_t val)
-{
-	return sin_f32(val);
-}
-
-static inline float64_t sinh(float64_t val)
-{
-	return sinh_f64(val);
-}
-
-static inline float32_t sinhf(float32_t val)
-{
-	return sinh_f32(val);
-}
-
-static inline float64_t sqrt(float64_t val)
-{
-	return sqrt_f64(val);
-}
-
-static inline float32_t sqrtf(float32_t val)
-{
-	return sqrt_f32(val);
-}
-
-static inline float64_t tan(float64_t val)
-{
-	return tan_f64(val);
-}
-
-static inline float32_t tanf(float32_t val)
-{
-	return tan_f32(val);
-}
-
-static inline float64_t tanh(float64_t val)
-{
-	return tanh_f64(val);
-}
-
-static inline float32_t tanhf(float32_t val)
-{
-	return tanh_f32(val);
-}
-
-static inline float64_t trunc(float64_t val)
-{
-	return trunc_f64(val);
-}
-
-static inline float32_t truncf(float32_t val)
-{
-	return trunc_f32(val);
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/arch/ia32/Makefile.inc
===================================================================
--- uspace/lib/math/arch/ia32/Makefile.inc	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,32 +1,0 @@
-#
-# Copyright (c) 2014 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-ARCH_SOURCES = \
-	arch/$(UARCH)/src/sin.S \
-	arch/$(UARCH)/src/cos.S \
-	arch/$(UARCH)/src/trunc.S
Index: pace/lib/math/arch/ia32/include/libarch/math.h
===================================================================
--- uspace/lib/math/arch/ia32/include/libarch/math.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,539 +1,0 @@
-/*
- * Copyright (c) 2014 Martin Decky
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmathia32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_ia32_MATH_H_
-#define LIBMATH_ia32_MATH_H_
-
-#include <acos.h>
-#include <asin.h>
-#include <atan.h>
-#include <atan2.h>
-#include <ceil.h>
-#include <cosh.h>
-#include <exp.h>
-#include <fabs.h>
-#include <floor.h>
-#include <fmod.h>
-#include <frexp.h>
-#include <ldexp.h>
-#include <log.h>
-#include <log10.h>
-#include <log2.h>
-#include <mathtypes.h>
-#include <modf.h>
-#include <pow.h>
-#include <sinh.h>
-#include <sqrt.h>
-#include <tan.h>
-#include <tanh.h>
-#include <trig.h>
-#include <trunc.h>
-
-#define HUGE_VAL FLOAT64_INF
-
-static inline float64_t acos_f64(float64_t val)
-{
-	return float64_acos(val);
-}
-
-static inline float32_t acos_f32(float32_t val)
-{
-	return float32_acos(val);
-}
-
-static inline float64_t asin_f64(float64_t val)
-{
-	return float64_asin(val);
-}
-
-static inline float32_t asin_f32(float32_t val)
-{
-	return float32_asin(val);
-}
-
-static inline float64_t atan_f64(float64_t val)
-{
-	return float64_atan(val);
-}
-
-static inline float32_t atan_f32(float32_t val)
-{
-	return float32_atan(val);
-}
-
-static inline float64_t atan2_f64(float64_t y, float64_t x)
-{
-	return float64_atan2(y, x);
-}
-
-static inline float32_t atan2_f32(float32_t y, float32_t x)
-{
-	return float32_atan2(y, x);
-}
-
-static inline float64_t ceil_f64(float64_t val)
-{
-	return float64_ceil(val);
-}
-
-static inline float32_t ceil_f32(float32_t val)
-{
-	return float32_ceil(val);
-}
-
-extern float64_t cos_f64(float64_t);
-
-static inline float32_t cos_f32(float32_t val)
-{
-	return (float32_t)cos_f64((float64_t)val);
-}
-
-static inline float64_t cosh_f64(float64_t val)
-{
-	return float64_cosh(val);
-}
-
-static inline float32_t cosh_f32(float32_t val)
-{
-	return float32_cosh(val);
-}
-
-static inline float64_t exp_f64(float64_t val)
-{
-	return float64_exp(val);
-}
-
-static inline float32_t exp_f32(float32_t val)
-{
-	return float32_exp(val);
-}
-
-static inline float64_t fabs_f64(float64_t val)
-{
-	return float64_fabs(val);
-}
-
-static inline float32_t fabs_f32(float32_t val)
-{
-	return float32_fabs(val);
-}
-
-static inline float64_t floor_f64(float64_t val)
-{
-	return float64_floor(val);
-}
-
-static inline float32_t floor_f32(float32_t val)
-{
-	return float32_floor(val);
-}
-static inline float64_t fmod_f64(float64_t dividend, float64_t divisor)
-{
-	return float64_fmod(dividend, divisor);
-}
-
-static inline float64_t fmod_f32(float32_t dividend, float32_t divisor)
-{
-	return float32_fmod(dividend, divisor);
-}
-
-static inline float64_t frexp_f64(float64_t x, int *exp)
-{
-	return float64_frexp(x, exp);
-}
-
-static inline float64_t frexp_f32(float32_t x, int *exp)
-{
-	return float32_frexp(x, exp);
-}
-
-static inline float64_t ldexp_f64(float64_t x, int exp)
-{
-	return float64_ldexp(x, exp);
-}
-
-static inline float64_t ldexp_f32(float32_t x, int exp)
-{
-	return float32_ldexp(x, exp);
-}
-
-static inline float64_t log_f64(float64_t val)
-{
-	return float64_log(val);
-}
-
-static inline float32_t log_f32(float32_t val)
-{
-	return float32_log(val);
-}
-
-static inline float64_t log10_f64(float64_t val)
-{
-	return float64_log10(val);
-}
-
-static inline float32_t log10_f32(float32_t val)
-{
-	return float32_log10(val);
-}
-
-static inline float32_t log2_f32(float32_t val)
-{
-	return float32_log2(val);
-}
-
-static inline float64_t log2_f64(float64_t val)
-{
-	return float64_log2(val);
-}
-
-static inline float64_t modf_f64(float64_t value, float64_t *iptr)
-{
-	return float64_modf(value, iptr);
-}
-
-static inline float64_t modf_f32(float32_t value, float32_t *iptr)
-{
-	return float32_modf(value, iptr);
-}
-
-static inline float64_t pow_f64(float64_t x, float64_t y)
-{
-	return float64_pow(x, y);
-}
-
-static inline float32_t pow_f32(float32_t x, float32_t y)
-{
-	return float32_pow(x, y);
-}
-
-extern float64_t sin_f64(float64_t);
-
-static inline float32_t sin_f32(float32_t val)
-{
-	return (float32_t)sin_f64((float64_t)val);
-}
-
-static inline float64_t sinh_f64(float64_t val)
-{
-	return float64_sinh(val);
-}
-
-static inline float32_t sinh_f32(float32_t val)
-{
-	return float32_sinh(val);
-}
-
-static inline float64_t sqrt_f64(float64_t val)
-{
-	return float64_sqrt(val);
-}
-
-static inline float32_t sqrt_f32(float32_t val)
-{
-	return float32_sqrt(val);
-}
-
-static inline float64_t tan_f64(float64_t val)
-{
-	return float64_tan(val);
-}
-
-static inline float32_t tan_f32(float32_t val)
-{
-	return float32_tan(val);
-}
-
-static inline float64_t tanh_f64(float64_t val)
-{
-	return float64_tanh(val);
-}
-
-static inline float32_t tanh_f32(float32_t val)
-{
-	return float32_tanh(val);
-}
-
-extern float64_t trunc_f64(float64_t);
-
-static inline float32_t trunc_f32(float32_t val)
-{
-	return (float32_t)trunc_f64((float64_t)val);
-}
-
-static inline float64_t acos(float64_t val)
-{
-	return acos_f64(val);
-}
-
-static inline float32_t acosf(float32_t val)
-{
-	return acos_f32(val);
-}
-
-static inline float64_t asin(float64_t val)
-{
-	return asin_f64(val);
-}
-
-static inline float32_t asinf(float32_t val)
-{
-	return asin_f32(val);
-}
-
-static inline float64_t atan(float64_t val)
-{
-	return atan_f64(val);
-}
-
-static inline float32_t atanf(float32_t val)
-{
-	return atan_f32(val);
-}
-
-static inline float64_t atan2(float64_t y, float64_t x)
-{
-	return atan2_f64(y, x);
-}
-
-static inline float32_t atan2f(float32_t y, float32_t x)
-{
-	return atan2_f32(y, x);
-}
-
-static inline float64_t ceil(float64_t val)
-{
-	return ceil_f64(val);
-}
-
-static inline float32_t ceilf(float32_t val)
-{
-	return ceil_f32(val);
-}
-
-static inline float64_t cos(float64_t val)
-{
-	return cos_f64(val);
-}
-
-static inline float32_t cosf(float32_t val)
-{
-	return cos_f32(val);
-}
-
-static inline float64_t cosh(float64_t val)
-{
-	return cosh_f64(val);
-}
-
-static inline float32_t coshf(float32_t val)
-{
-	return cosh_f32(val);
-}
-
-static inline float64_t exp(float64_t val)
-{
-	return exp_f64(val);
-}
-
-static inline float32_t expf(float32_t val)
-{
-	return exp_f32(val);
-}
-
-static inline float64_t fabs(float64_t val)
-{
-	return fabs_f64(val);
-}
-
-static inline float32_t fabsf(float32_t val)
-{
-	return fabs_f32(val);
-}
-
-static inline float64_t floor(float64_t val)
-{
-	return floor_f64(val);
-}
-
-static inline float32_t floorf(float32_t val)
-{
-	return floor_f32(val);
-}
-
-static inline float64_t fmod(float64_t dividend, float64_t divisor)
-{
-	return fmod_f64(dividend, divisor);
-}
-
-static inline float32_t fmodf(float32_t dividend, float32_t divisor)
-{
-	return fmod_f32(dividend, divisor);
-}
-
-static inline float64_t frexp(float64_t x, int *exp)
-{
-	return frexp_f64(x, exp);
-}
-
-static inline float32_t frexpf(float32_t x, int *exp)
-{
-	return frexp_f32(x, exp);
-}
-
-static inline float64_t ldexp(float64_t x, int exp)
-{
-	return ldexp_f64(x, exp);
-}
-
-static inline float32_t ldexpf(float32_t x, int exp)
-{
-	return ldexp_f32(x, exp);
-}
-
-static inline float64_t log(float64_t val)
-{
-	return log_f64(val);
-}
-
-static inline float32_t logf(float32_t val)
-{
-	return log_f32(val);
-}
-
-static inline float64_t log10(float64_t val)
-{
-	return log10_f64(val);
-}
-
-static inline float32_t log10f(float32_t val)
-{
-	return log10_f32(val);
-}
-
-static inline float64_t log2(float64_t val)
-{
-	return log2_f64(val);
-}
-
-static inline float32_t log2f(float32_t val)
-{
-	return log2_f32(val);
-}
-
-static inline float64_t modf(float64_t value, float64_t *iptr)
-{
-	return modf_f64(value, iptr);
-}
-
-static inline float32_t modff(float32_t value, float32_t *iptr)
-{
-	return modf_f32(value, iptr);
-}
-
-static inline float64_t pow(float64_t x, float64_t y)
-{
-	return pow_f64(x, y);
-}
-
-static inline float32_t powf(float32_t x, float32_t y)
-{
-	return pow_f32(x, y);
-}
-
-static inline float64_t sin(float64_t val)
-{
-	return sin_f64(val);
-}
-
-static inline float32_t sinf(float32_t val)
-{
-	return sin_f32(val);
-}
-
-static inline float64_t sinh(float64_t val)
-{
-	return sinh_f64(val);
-}
-
-static inline float32_t sinhf(float32_t val)
-{
-	return sinh_f32(val);
-}
-
-static inline float64_t sqrt(float64_t val)
-{
-	return sqrt_f64(val);
-}
-
-static inline float32_t sqrtf(float32_t val)
-{
-	return sqrt_f32(val);
-}
-
-static inline float64_t tan(float64_t val)
-{
-	return tan_f64(val);
-}
-
-static inline float32_t tanf(float32_t val)
-{
-	return tan_f32(val);
-}
-
-static inline float64_t tanh(float64_t val)
-{
-	return tanh_f64(val);
-}
-
-static inline float32_t tanhf(float32_t val)
-{
-	return tanh_f32(val);
-}
-
-static inline float64_t trunc(float64_t val)
-{
-	return trunc_f64(val);
-}
-
-static inline float32_t truncf(float32_t val)
-{
-	return trunc_f32(val);
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/arch/ia32/include/libarch/x87.h
===================================================================
--- uspace/lib/math/arch/ia32/include/libarch/x87.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../../amd64/include/libarch/x87.h
Index: pace/lib/math/arch/ia32/src/cos.S
===================================================================
--- uspace/lib/math/arch/ia32/src/cos.S	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,65 +1,0 @@
-#
-# Copyright (c) 2014 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#include <abi/asmtool.h>
-#include <libarch/x87.h>
-
-.text
-
-FUNCTION_BEGIN(cos_f64)
-	# compute cosine (no stack frame)
-
-	fldl 4(%esp)
-	fcos
-
-	# detect if source operand is out of range
-
-	fnstsw %ax
-	andw $X87_STATUS_WORD_C2_MASK, %ax
-	jnz fix_range
-
-		ret
-
-	# argument reduction
-
-	fix_range:
-		fldpi
-		fadd %st(0)
-		fxch %st(1)
-
-	reduce:
-		fprem1
-		fnstsw %ax
-		andw $X87_STATUS_WORD_C2_MASK, %ax
-		jnz reduce
-
-	fstp %st(1)
-	fcos
-
-	ret
-FUNCTION_END(cos_f64)
Index: pace/lib/math/arch/ia32/src/sin.S
===================================================================
--- uspace/lib/math/arch/ia32/src/sin.S	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,65 +1,0 @@
-#
-# Copyright (c) 2014 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#include <abi/asmtool.h>
-#include <libarch/x87.h>
-
-.text
-
-FUNCTION_BEGIN(sin_f64)
-	# compute sine (no stack frame)
-
-	fldl 4(%esp)
-	fsin
-
-	# detect if source operand is out of range
-
-	fnstsw %ax
-	andw $X87_STATUS_WORD_C2_MASK, %ax
-	jnz fix_range
-
-		ret
-
-	# argument reduction
-
-	fix_range:
-		fldpi
-		fadd %st(0)
-		fxch %st(1)
-
-	reduce:
-		fprem1
-		fnstsw %ax
-		andw $X87_STATUS_WORD_C2_MASK, %ax
-		jnz reduce
-
-	fstp %st(1)
-	fsin
-
-	ret
-FUNCTION_END(sin_f64)
Index: pace/lib/math/arch/ia32/src/trunc.S
===================================================================
--- uspace/lib/math/arch/ia32/src/trunc.S	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,62 +1,0 @@
-#
-# Copyright (c) 2014 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#include <abi/asmtool.h>
-#include <libarch/x87.h>
-
-.text
-
-FUNCTION_BEGIN(trunc_f64)
-	pushl %ebp
-	movl %esp, %ebp
-	subl $8, %esp
-
-	# store x87 control word
-
-	fnstcw -4(%ebp)
-	movw -4(%ebp), %ax
-
-	# set rounding control to truncate
-	# (no masking necessary for this flag)
-
-	orw $X87_CONTROL_WORD_RC_TRUNCATE, %ax
-	movw %ax, -8(%ebp)
-	fldcw -8(%ebp)
-
-	# truncate
-
-	fldl 8(%ebp)
-	frndint
-
-	# restore original control word
-
-	fldcw -4(%ebp)
-
-	leave
-	ret
-FUNCTION_END(trunc_f64)
Index: pace/lib/math/arch/ia64/Makefile.inc
===================================================================
--- uspace/lib/math/arch/ia64/Makefile.inc	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,29 +1,0 @@
-#
-# Copyright (c) 2014 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-ARCH_SOURCES =
Index: pace/lib/math/arch/ia64/include/libarch/math.h
===================================================================
--- uspace/lib/math/arch/ia64/include/libarch/math.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,548 +1,0 @@
-/*
- * Copyright (c) 2014 Martin Decky
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmathia64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_ia64_MATH_H_
-#define LIBMATH_ia64_MATH_H_
-
-#include <acos.h>
-#include <asin.h>
-#include <atan.h>
-#include <atan2.h>
-#include <ceil.h>
-#include <cosh.h>
-#include <exp.h>
-#include <fabs.h>
-#include <floor.h>
-#include <fmod.h>
-#include <frexp.h>
-#include <ldexp.h>
-#include <log.h>
-#include <log10.h>
-#include <log2.h>
-#include <mathtypes.h>
-#include <modf.h>
-#include <pow.h>
-#include <sinh.h>
-#include <sqrt.h>
-#include <tan.h>
-#include <tanh.h>
-#include <trig.h>
-#include <trunc.h>
-
-#define HUGE_VAL FLOAT64_INF
-
-static inline float64_t acos_f64(float64_t val)
-{
-	return float64_acos(val);
-}
-
-static inline float32_t acos_f32(float32_t val)
-{
-	return float32_acos(val);
-}
-
-static inline float64_t asin_f64(float64_t val)
-{
-	return float64_asin(val);
-}
-
-static inline float32_t asin_f32(float32_t val)
-{
-	return float32_asin(val);
-}
-
-static inline float64_t atan_f64(float64_t val)
-{
-	return float64_atan(val);
-}
-
-static inline float32_t atan_f32(float32_t val)
-{
-	return float32_atan(val);
-}
-
-static inline float64_t atan2_f64(float64_t y, float64_t x)
-{
-	return float64_atan2(y, x);
-}
-
-static inline float32_t atan2_f32(float32_t y, float32_t x)
-{
-	return float32_atan2(y, x);
-}
-
-static inline float64_t ceil_f64(float64_t val)
-{
-	return float64_ceil(val);
-}
-
-static inline float32_t ceil_f32(float32_t val)
-{
-	return float32_ceil(val);
-}
-
-static inline float64_t cos_f64(float64_t val)
-{
-	return float64_cos(val);
-}
-
-static inline float32_t cos_f32(float32_t val)
-{
-	return float32_cos(val);
-}
-
-static inline float64_t cosh_f64(float64_t val)
-{
-	return float64_cosh(val);
-}
-
-static inline float32_t cosh_f32(float32_t val)
-{
-	return float32_cosh(val);
-}
-
-static inline float64_t exp_f64(float64_t val)
-{
-	return float64_exp(val);
-}
-
-static inline float32_t exp_f32(float32_t val)
-{
-	return float32_exp(val);
-}
-
-static inline float64_t fabs_f64(float64_t val)
-{
-	return float64_fabs(val);
-}
-
-static inline float32_t fabs_f32(float32_t val)
-{
-	return float32_fabs(val);
-}
-
-static inline float64_t floor_f64(float64_t val)
-{
-	return float64_floor(val);
-}
-
-static inline float32_t floor_f32(float32_t val)
-{
-	return float32_floor(val);
-}
-static inline float64_t fmod_f64(float64_t dividend, float64_t divisor)
-{
-	return float64_fmod(dividend, divisor);
-}
-
-static inline float64_t fmod_f32(float32_t dividend, float32_t divisor)
-{
-	return float32_fmod(dividend, divisor);
-}
-
-static inline float64_t frexp_f64(float64_t x, int *exp)
-{
-	return float64_frexp(x, exp);
-}
-
-static inline float64_t frexp_f32(float32_t x, int *exp)
-{
-	return float32_frexp(x, exp);
-}
-
-static inline float64_t ldexp_f64(float64_t x, int exp)
-{
-	return float64_ldexp(x, exp);
-}
-
-static inline float64_t ldexp_f32(float32_t x, int exp)
-{
-	return float32_ldexp(x, exp);
-}
-
-static inline float64_t log_f64(float64_t val)
-{
-	return float64_log(val);
-}
-
-static inline float32_t log_f32(float32_t val)
-{
-	return float32_log(val);
-}
-
-static inline float64_t log10_f64(float64_t val)
-{
-	return float64_log10(val);
-}
-
-static inline float32_t log10_f32(float32_t val)
-{
-	return float32_log10(val);
-}
-
-static inline float32_t log2_f32(float32_t val)
-{
-	return float32_log2(val);
-}
-
-static inline float64_t log2_f64(float64_t val)
-{
-	return float64_log2(val);
-}
-
-static inline float64_t modf_f64(float64_t value, float64_t *iptr)
-{
-	return float64_modf(value, iptr);
-}
-
-static inline float64_t modf_f32(float32_t value, float32_t *iptr)
-{
-	return float32_modf(value, iptr);
-}
-
-static inline float64_t pow_f64(float64_t x, float64_t y)
-{
-	return float64_pow(x, y);
-}
-
-static inline float32_t pow_f32(float32_t x, float32_t y)
-{
-	return float32_pow(x, y);
-}
-
-static inline float64_t sin_f64(float64_t val)
-{
-	return float64_sin(val);
-}
-
-static inline float32_t sin_f32(float32_t val)
-{
-	return float32_sin(val);
-}
-
-static inline float64_t sinh_f64(float64_t val)
-{
-	return float64_sinh(val);
-}
-
-static inline float32_t sinh_f32(float32_t val)
-{
-	return float32_sinh(val);
-}
-
-static inline float64_t sqrt_f64(float64_t val)
-{
-	return float64_sqrt(val);
-}
-
-static inline float32_t sqrt_f32(float32_t val)
-{
-	return float32_sqrt(val);
-}
-
-static inline float64_t tan_f64(float64_t val)
-{
-	return float64_tan(val);
-}
-
-static inline float32_t tan_f32(float32_t val)
-{
-	return float32_tan(val);
-}
-
-static inline float64_t tanh_f64(float64_t val)
-{
-	return float64_tanh(val);
-}
-
-static inline float32_t tanh_f32(float32_t val)
-{
-	return float32_tanh(val);
-}
-
-static inline float64_t trunc_f64(float64_t val)
-{
-	return float64_trunc(val);
-}
-
-static inline float32_t trunc_f32(float32_t val)
-{
-	return float32_trunc(val);
-}
-
-static inline float64_t acos(float64_t val)
-{
-	return acos_f64(val);
-}
-
-static inline float32_t acosf(float32_t val)
-{
-	return acos_f32(val);
-}
-
-static inline float64_t asin(float64_t val)
-{
-	return asin_f64(val);
-}
-
-static inline float32_t asinf(float32_t val)
-{
-	return asin_f32(val);
-}
-
-static inline float64_t atan(float64_t val)
-{
-	return atan_f64(val);
-}
-
-static inline float32_t atanf(float32_t val)
-{
-	return atan_f32(val);
-}
-
-static inline float64_t atan2(float64_t y, float64_t x)
-{
-	return atan2_f64(y, x);
-}
-
-static inline float32_t atan2f(float32_t y, float32_t x)
-{
-	return atan2_f32(y, x);
-}
-
-static inline float64_t ceil(float64_t val)
-{
-	return ceil_f64(val);
-}
-
-static inline float32_t ceilf(float32_t val)
-{
-	return ceil_f32(val);
-}
-
-static inline float64_t cos(float64_t val)
-{
-	return cos_f64(val);
-}
-
-static inline float32_t cosf(float32_t val)
-{
-	return cos_f32(val);
-}
-
-static inline float64_t cosh(float64_t val)
-{
-	return cosh_f64(val);
-}
-
-static inline float32_t coshf(float32_t val)
-{
-	return cosh_f32(val);
-}
-
-static inline float64_t exp(float64_t val)
-{
-	return exp_f64(val);
-}
-
-static inline float32_t expf(float32_t val)
-{
-	return exp_f32(val);
-}
-
-static inline float64_t fabs(float64_t val)
-{
-	return fabs_f64(val);
-}
-
-static inline float32_t fabsf(float32_t val)
-{
-	return fabs_f32(val);
-}
-
-static inline float64_t floor(float64_t val)
-{
-	return floor_f64(val);
-}
-
-static inline float32_t floorf(float32_t val)
-{
-	return floor_f32(val);
-}
-
-static inline float64_t fmod(float64_t dividend, float64_t divisor)
-{
-	return fmod_f64(dividend, divisor);
-}
-
-static inline float32_t fmodf(float32_t dividend, float32_t divisor)
-{
-	return fmod_f32(dividend, divisor);
-}
-
-static inline float64_t frexp(float64_t x, int *exp)
-{
-	return frexp_f64(x, exp);
-}
-
-static inline float32_t frexpf(float32_t x, int *exp)
-{
-	return frexp_f32(x, exp);
-}
-
-static inline float64_t ldexp(float64_t x, int exp)
-{
-	return ldexp_f64(x, exp);
-}
-
-static inline float32_t ldexpf(float32_t x, int exp)
-{
-	return ldexp_f32(x, exp);
-}
-
-static inline float64_t log(float64_t val)
-{
-	return log_f64(val);
-}
-
-static inline float32_t logf(float32_t val)
-{
-	return log_f32(val);
-}
-
-static inline float64_t log10(float64_t val)
-{
-	return log10_f64(val);
-}
-
-static inline float32_t log10f(float32_t val)
-{
-	return log10_f32(val);
-}
-
-static inline float64_t log2(float64_t val)
-{
-	return log2_f64(val);
-}
-
-static inline float32_t log2f(float32_t val)
-{
-	return log2_f32(val);
-}
-
-static inline float64_t modf(float64_t value, float64_t *iptr)
-{
-	return modf_f64(value, iptr);
-}
-
-static inline float32_t modff(float32_t value, float32_t *iptr)
-{
-	return modf_f32(value, iptr);
-}
-
-static inline float64_t pow(float64_t x, float64_t y)
-{
-	return pow_f64(x, y);
-}
-
-static inline float32_t powf(float32_t x, float32_t y)
-{
-	return pow_f32(x, y);
-}
-
-static inline float64_t sin(float64_t val)
-{
-	return sin_f64(val);
-}
-
-static inline float32_t sinf(float32_t val)
-{
-	return sin_f32(val);
-}
-
-static inline float64_t sinh(float64_t val)
-{
-	return sinh_f64(val);
-}
-
-static inline float32_t sinhf(float32_t val)
-{
-	return sinh_f32(val);
-}
-
-static inline float64_t sqrt(float64_t val)
-{
-	return sqrt_f64(val);
-}
-
-static inline float32_t sqrtf(float32_t val)
-{
-	return sqrt_f32(val);
-}
-
-static inline float64_t tan(float64_t val)
-{
-	return tan_f64(val);
-}
-
-static inline float32_t tanf(float32_t val)
-{
-	return tan_f32(val);
-}
-
-static inline float64_t tanh(float64_t val)
-{
-	return tanh_f64(val);
-}
-
-static inline float32_t tanhf(float32_t val)
-{
-	return tanh_f32(val);
-}
-
-static inline float64_t trunc(float64_t val)
-{
-	return trunc_f64(val);
-}
-
-static inline float32_t truncf(float32_t val)
-{
-	return trunc_f32(val);
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/arch/mips32/Makefile.inc
===================================================================
--- uspace/lib/math/arch/mips32/Makefile.inc	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,29 +1,0 @@
-#
-# Copyright (c) 2014 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-ARCH_SOURCES =
Index: pace/lib/math/arch/mips32/include/libarch/math.h
===================================================================
--- uspace/lib/math/arch/mips32/include/libarch/math.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,548 +1,0 @@
-/*
- * Copyright (c) 2014 Martin Decky
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmathmips32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_mips32_MATH_H_
-#define LIBMATH_mips32_MATH_H_
-
-#include <acos.h>
-#include <asin.h>
-#include <atan.h>
-#include <atan2.h>
-#include <ceil.h>
-#include <cosh.h>
-#include <exp.h>
-#include <fabs.h>
-#include <floor.h>
-#include <fmod.h>
-#include <frexp.h>
-#include <ldexp.h>
-#include <log.h>
-#include <log10.h>
-#include <log2.h>
-#include <mathtypes.h>
-#include <modf.h>
-#include <pow.h>
-#include <sinh.h>
-#include <sqrt.h>
-#include <tan.h>
-#include <tanh.h>
-#include <trig.h>
-#include <trunc.h>
-
-#define HUGE_VAL FLOAT64_INF
-
-static inline float64_t acos_f64(float64_t val)
-{
-	return float64_acos(val);
-}
-
-static inline float32_t acos_f32(float32_t val)
-{
-	return float32_acos(val);
-}
-
-static inline float64_t asin_f64(float64_t val)
-{
-	return float64_asin(val);
-}
-
-static inline float32_t asin_f32(float32_t val)
-{
-	return float32_asin(val);
-}
-
-static inline float64_t atan_f64(float64_t val)
-{
-	return float64_atan(val);
-}
-
-static inline float32_t atan_f32(float32_t val)
-{
-	return float32_atan(val);
-}
-
-static inline float64_t atan2_f64(float64_t y, float64_t x)
-{
-	return float64_atan2(y, x);
-}
-
-static inline float32_t atan2_f32(float32_t y, float32_t x)
-{
-	return float32_atan2(y, x);
-}
-
-static inline float64_t ceil_f64(float64_t val)
-{
-	return float64_ceil(val);
-}
-
-static inline float32_t ceil_f32(float32_t val)
-{
-	return float32_ceil(val);
-}
-
-static inline float64_t cos_f64(float64_t val)
-{
-	return float64_cos(val);
-}
-
-static inline float32_t cos_f32(float32_t val)
-{
-	return float32_cos(val);
-}
-
-static inline float64_t cosh_f64(float64_t val)
-{
-	return float64_cosh(val);
-}
-
-static inline float32_t cosh_f32(float32_t val)
-{
-	return float32_cosh(val);
-}
-
-static inline float64_t exp_f64(float64_t val)
-{
-	return float64_exp(val);
-}
-
-static inline float32_t exp_f32(float32_t val)
-{
-	return float32_exp(val);
-}
-
-static inline float64_t fabs_f64(float64_t val)
-{
-	return float64_fabs(val);
-}
-
-static inline float32_t fabs_f32(float32_t val)
-{
-	return float32_fabs(val);
-}
-
-static inline float64_t floor_f64(float64_t val)
-{
-	return float64_floor(val);
-}
-
-static inline float32_t floor_f32(float32_t val)
-{
-	return float32_floor(val);
-}
-static inline float64_t fmod_f64(float64_t dividend, float64_t divisor)
-{
-	return float64_fmod(dividend, divisor);
-}
-
-static inline float64_t fmod_f32(float32_t dividend, float32_t divisor)
-{
-	return float32_fmod(dividend, divisor);
-}
-
-static inline float64_t frexp_f64(float64_t x, int *exp)
-{
-	return float64_frexp(x, exp);
-}
-
-static inline float64_t frexp_f32(float32_t x, int *exp)
-{
-	return float32_frexp(x, exp);
-}
-
-static inline float64_t ldexp_f64(float64_t x, int exp)
-{
-	return float64_ldexp(x, exp);
-}
-
-static inline float64_t ldexp_f32(float32_t x, int exp)
-{
-	return float32_ldexp(x, exp);
-}
-
-static inline float64_t log_f64(float64_t val)
-{
-	return float64_log(val);
-}
-
-static inline float32_t log_f32(float32_t val)
-{
-	return float32_log(val);
-}
-
-static inline float64_t log10_f64(float64_t val)
-{
-	return float64_log10(val);
-}
-
-static inline float32_t log10_f32(float32_t val)
-{
-	return float32_log10(val);
-}
-
-static inline float32_t log2_f32(float32_t val)
-{
-	return float32_log2(val);
-}
-
-static inline float64_t log2_f64(float64_t val)
-{
-	return float64_log2(val);
-}
-
-static inline float64_t modf_f64(float64_t value, float64_t *iptr)
-{
-	return float64_modf(value, iptr);
-}
-
-static inline float64_t modf_f32(float32_t value, float32_t *iptr)
-{
-	return float32_modf(value, iptr);
-}
-
-static inline float64_t pow_f64(float64_t x, float64_t y)
-{
-	return float64_pow(x, y);
-}
-
-static inline float32_t pow_f32(float32_t x, float32_t y)
-{
-	return float32_pow(x, y);
-}
-
-static inline float64_t sin_f64(float64_t val)
-{
-	return float64_sin(val);
-}
-
-static inline float32_t sin_f32(float32_t val)
-{
-	return float32_sin(val);
-}
-
-static inline float64_t sinh_f64(float64_t val)
-{
-	return float64_sinh(val);
-}
-
-static inline float32_t sinh_f32(float32_t val)
-{
-	return float32_sinh(val);
-}
-
-static inline float64_t sqrt_f64(float64_t val)
-{
-	return float64_sqrt(val);
-}
-
-static inline float32_t sqrt_f32(float32_t val)
-{
-	return float32_sqrt(val);
-}
-
-static inline float64_t tan_f64(float64_t val)
-{
-	return float64_tan(val);
-}
-
-static inline float32_t tan_f32(float32_t val)
-{
-	return float32_tan(val);
-}
-
-static inline float64_t tanh_f64(float64_t val)
-{
-	return float64_tanh(val);
-}
-
-static inline float32_t tanh_f32(float32_t val)
-{
-	return float32_tanh(val);
-}
-
-static inline float64_t trunc_f64(float64_t val)
-{
-	return float64_trunc(val);
-}
-
-static inline float32_t trunc_f32(float32_t val)
-{
-	return float32_trunc(val);
-}
-
-static inline float64_t acos(float64_t val)
-{
-	return acos_f64(val);
-}
-
-static inline float32_t acosf(float32_t val)
-{
-	return acos_f32(val);
-}
-
-static inline float64_t asin(float64_t val)
-{
-	return asin_f64(val);
-}
-
-static inline float32_t asinf(float32_t val)
-{
-	return asin_f32(val);
-}
-
-static inline float64_t atan(float64_t val)
-{
-	return atan_f64(val);
-}
-
-static inline float32_t atanf(float32_t val)
-{
-	return atan_f32(val);
-}
-
-static inline float64_t atan2(float64_t y, float64_t x)
-{
-	return atan2_f64(y, x);
-}
-
-static inline float32_t atan2f(float32_t y, float32_t x)
-{
-	return atan2_f32(y, x);
-}
-
-static inline float64_t ceil(float64_t val)
-{
-	return ceil_f64(val);
-}
-
-static inline float32_t ceilf(float32_t val)
-{
-	return ceil_f32(val);
-}
-
-static inline float64_t cos(float64_t val)
-{
-	return cos_f64(val);
-}
-
-static inline float32_t cosf(float32_t val)
-{
-	return cos_f32(val);
-}
-
-static inline float64_t cosh(float64_t val)
-{
-	return cosh_f64(val);
-}
-
-static inline float32_t coshf(float32_t val)
-{
-	return cosh_f32(val);
-}
-
-static inline float64_t exp(float64_t val)
-{
-	return exp_f64(val);
-}
-
-static inline float32_t expf(float32_t val)
-{
-	return exp_f32(val);
-}
-
-static inline float64_t fabs(float64_t val)
-{
-	return fabs_f64(val);
-}
-
-static inline float32_t fabsf(float32_t val)
-{
-	return fabs_f32(val);
-}
-
-static inline float64_t floor(float64_t val)
-{
-	return floor_f64(val);
-}
-
-static inline float32_t floorf(float32_t val)
-{
-	return floor_f32(val);
-}
-
-static inline float64_t fmod(float64_t dividend, float64_t divisor)
-{
-	return fmod_f64(dividend, divisor);
-}
-
-static inline float32_t fmodf(float32_t dividend, float32_t divisor)
-{
-	return fmod_f32(dividend, divisor);
-}
-
-static inline float64_t frexp(float64_t x, int *exp)
-{
-	return frexp_f64(x, exp);
-}
-
-static inline float32_t frexpf(float32_t x, int *exp)
-{
-	return frexp_f32(x, exp);
-}
-
-static inline float64_t ldexp(float64_t x, int exp)
-{
-	return ldexp_f64(x, exp);
-}
-
-static inline float32_t ldexpf(float32_t x, int exp)
-{
-	return ldexp_f32(x, exp);
-}
-
-static inline float64_t log(float64_t val)
-{
-	return log_f64(val);
-}
-
-static inline float32_t logf(float32_t val)
-{
-	return log_f32(val);
-}
-
-static inline float64_t log10(float64_t val)
-{
-	return log10_f64(val);
-}
-
-static inline float32_t log10f(float32_t val)
-{
-	return log10_f32(val);
-}
-
-static inline float64_t log2(float64_t val)
-{
-	return log2_f64(val);
-}
-
-static inline float32_t log2f(float32_t val)
-{
-	return log2_f32(val);
-}
-
-static inline float64_t modf(float64_t value, float64_t *iptr)
-{
-	return modf_f64(value, iptr);
-}
-
-static inline float32_t modff(float32_t value, float32_t *iptr)
-{
-	return modf_f32(value, iptr);
-}
-
-static inline float64_t pow(float64_t x, float64_t y)
-{
-	return pow_f64(x, y);
-}
-
-static inline float32_t powf(float32_t x, float32_t y)
-{
-	return pow_f32(x, y);
-}
-
-static inline float64_t sin(float64_t val)
-{
-	return sin_f64(val);
-}
-
-static inline float32_t sinf(float32_t val)
-{
-	return sin_f32(val);
-}
-
-static inline float64_t sinh(float64_t val)
-{
-	return sinh_f64(val);
-}
-
-static inline float32_t sinhf(float32_t val)
-{
-	return sinh_f32(val);
-}
-
-static inline float64_t sqrt(float64_t val)
-{
-	return sqrt_f64(val);
-}
-
-static inline float32_t sqrtf(float32_t val)
-{
-	return sqrt_f32(val);
-}
-
-static inline float64_t tan(float64_t val)
-{
-	return tan_f64(val);
-}
-
-static inline float32_t tanf(float32_t val)
-{
-	return tan_f32(val);
-}
-
-static inline float64_t tanh(float64_t val)
-{
-	return tanh_f64(val);
-}
-
-static inline float32_t tanhf(float32_t val)
-{
-	return tanh_f32(val);
-}
-
-static inline float64_t trunc(float64_t val)
-{
-	return trunc_f64(val);
-}
-
-static inline float32_t truncf(float32_t val)
-{
-	return trunc_f32(val);
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/arch/mips32eb/Makefile.inc
===================================================================
--- uspace/lib/math/arch/mips32eb/Makefile.inc	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,29 +1,0 @@
-#
-# Copyright (c) 2014 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-ARCH_SOURCES =
Index: pace/lib/math/arch/mips32eb/include/libarch/math.h
===================================================================
--- uspace/lib/math/arch/mips32eb/include/libarch/math.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,548 +1,0 @@
-/*
- * Copyright (c) 2014 Martin Decky
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmathmips32eb
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_mips32eb_MATH_H_
-#define LIBMATH_mips32eb_MATH_H_
-
-#include <acos.h>
-#include <asin.h>
-#include <atan.h>
-#include <atan2.h>
-#include <ceil.h>
-#include <cosh.h>
-#include <exp.h>
-#include <fabs.h>
-#include <floor.h>
-#include <fmod.h>
-#include <frexp.h>
-#include <ldexp.h>
-#include <log.h>
-#include <log10.h>
-#include <log2.h>
-#include <mathtypes.h>
-#include <modf.h>
-#include <pow.h>
-#include <sinh.h>
-#include <sqrt.h>
-#include <tan.h>
-#include <tanh.h>
-#include <trig.h>
-#include <trunc.h>
-
-#define HUGE_VAL FLOAT64_INF
-
-static inline float64_t acos_f64(float64_t val)
-{
-	return float64_acos(val);
-}
-
-static inline float32_t acos_f32(float32_t val)
-{
-	return float32_acos(val);
-}
-
-static inline float64_t asin_f64(float64_t val)
-{
-	return float64_asin(val);
-}
-
-static inline float32_t asin_f32(float32_t val)
-{
-	return float32_asin(val);
-}
-
-static inline float64_t atan_f64(float64_t val)
-{
-	return float64_atan(val);
-}
-
-static inline float32_t atan_f32(float32_t val)
-{
-	return float32_atan(val);
-}
-
-static inline float64_t atan2_f64(float64_t y, float64_t x)
-{
-	return float64_atan2(y, x);
-}
-
-static inline float32_t atan2_f32(float32_t y, float32_t x)
-{
-	return float32_atan2(y, x);
-}
-
-static inline float64_t ceil_f64(float64_t val)
-{
-	return float64_ceil(val);
-}
-
-static inline float32_t ceil_f32(float32_t val)
-{
-	return float32_ceil(val);
-}
-
-static inline float64_t cos_f64(float64_t val)
-{
-	return float64_cos(val);
-}
-
-static inline float32_t cos_f32(float32_t val)
-{
-	return float32_cos(val);
-}
-
-static inline float64_t cosh_f64(float64_t val)
-{
-	return float64_cosh(val);
-}
-
-static inline float32_t cosh_f32(float32_t val)
-{
-	return float32_cosh(val);
-}
-
-static inline float64_t exp_f64(float64_t val)
-{
-	return float64_exp(val);
-}
-
-static inline float32_t exp_f32(float32_t val)
-{
-	return float32_exp(val);
-}
-
-static inline float64_t fabs_f64(float64_t val)
-{
-	return float64_fabs(val);
-}
-
-static inline float32_t fabs_f32(float32_t val)
-{
-	return float32_fabs(val);
-}
-
-static inline float64_t floor_f64(float64_t val)
-{
-	return float64_floor(val);
-}
-
-static inline float32_t floor_f32(float32_t val)
-{
-	return float32_floor(val);
-}
-static inline float64_t fmod_f64(float64_t dividend, float64_t divisor)
-{
-	return float64_fmod(dividend, divisor);
-}
-
-static inline float64_t fmod_f32(float32_t dividend, float32_t divisor)
-{
-	return float32_fmod(dividend, divisor);
-}
-
-static inline float64_t frexp_f64(float64_t x, int *exp)
-{
-	return float64_frexp(x, exp);
-}
-
-static inline float64_t frexp_f32(float32_t x, int *exp)
-{
-	return float32_frexp(x, exp);
-}
-
-static inline float64_t ldexp_f64(float64_t x, int exp)
-{
-	return float64_ldexp(x, exp);
-}
-
-static inline float64_t ldexp_f32(float32_t x, int exp)
-{
-	return float32_ldexp(x, exp);
-}
-
-static inline float64_t log_f64(float64_t val)
-{
-	return float64_log(val);
-}
-
-static inline float32_t log_f32(float32_t val)
-{
-	return float32_log(val);
-}
-
-static inline float64_t log10_f64(float64_t val)
-{
-	return float64_log10(val);
-}
-
-static inline float32_t log10_f32(float32_t val)
-{
-	return float32_log10(val);
-}
-
-static inline float32_t log2_f32(float32_t val)
-{
-	return float32_log2(val);
-}
-
-static inline float64_t log2_f64(float64_t val)
-{
-	return float64_log2(val);
-}
-
-static inline float64_t modf_f64(float64_t value, float64_t *iptr)
-{
-	return float64_modf(value, iptr);
-}
-
-static inline float64_t modf_f32(float32_t value, float32_t *iptr)
-{
-	return float32_modf(value, iptr);
-}
-
-static inline float64_t pow_f64(float64_t x, float64_t y)
-{
-	return float64_pow(x, y);
-}
-
-static inline float32_t pow_f32(float32_t x, float32_t y)
-{
-	return float32_pow(x, y);
-}
-
-static inline float64_t sin_f64(float64_t val)
-{
-	return float64_sin(val);
-}
-
-static inline float32_t sin_f32(float32_t val)
-{
-	return float32_sin(val);
-}
-
-static inline float64_t sinh_f64(float64_t val)
-{
-	return float64_sinh(val);
-}
-
-static inline float32_t sinh_f32(float32_t val)
-{
-	return float32_sinh(val);
-}
-
-static inline float64_t sqrt_f64(float64_t val)
-{
-	return float64_sqrt(val);
-}
-
-static inline float32_t sqrt_f32(float32_t val)
-{
-	return float32_sqrt(val);
-}
-
-static inline float64_t tan_f64(float64_t val)
-{
-	return float64_tan(val);
-}
-
-static inline float32_t tan_f32(float32_t val)
-{
-	return float32_tan(val);
-}
-
-static inline float64_t tanh_f64(float64_t val)
-{
-	return float64_tanh(val);
-}
-
-static inline float32_t tanh_f32(float32_t val)
-{
-	return float32_tanh(val);
-}
-
-static inline float64_t trunc_f64(float64_t val)
-{
-	return float64_trunc(val);
-}
-
-static inline float32_t trunc_f32(float32_t val)
-{
-	return float32_trunc(val);
-}
-
-static inline float64_t acos(float64_t val)
-{
-	return acos_f64(val);
-}
-
-static inline float32_t acosf(float32_t val)
-{
-	return acos_f32(val);
-}
-
-static inline float64_t asin(float64_t val)
-{
-	return asin_f64(val);
-}
-
-static inline float32_t asinf(float32_t val)
-{
-	return asin_f32(val);
-}
-
-static inline float64_t atan(float64_t val)
-{
-	return atan_f64(val);
-}
-
-static inline float32_t atanf(float32_t val)
-{
-	return atan_f32(val);
-}
-
-static inline float64_t atan2(float64_t y, float64_t x)
-{
-	return atan2_f64(y, x);
-}
-
-static inline float32_t atan2f(float32_t y, float32_t x)
-{
-	return atan2_f32(y, x);
-}
-
-static inline float64_t ceil(float64_t val)
-{
-	return ceil_f64(val);
-}
-
-static inline float32_t ceilf(float32_t val)
-{
-	return ceil_f32(val);
-}
-
-static inline float64_t cos(float64_t val)
-{
-	return cos_f64(val);
-}
-
-static inline float32_t cosf(float32_t val)
-{
-	return cos_f32(val);
-}
-
-static inline float64_t cosh(float64_t val)
-{
-	return cosh_f64(val);
-}
-
-static inline float32_t coshf(float32_t val)
-{
-	return cosh_f32(val);
-}
-
-static inline float64_t exp(float64_t val)
-{
-	return exp_f64(val);
-}
-
-static inline float32_t expf(float32_t val)
-{
-	return exp_f32(val);
-}
-
-static inline float64_t fabs(float64_t val)
-{
-	return fabs_f64(val);
-}
-
-static inline float32_t fabsf(float32_t val)
-{
-	return fabs_f32(val);
-}
-
-static inline float64_t floor(float64_t val)
-{
-	return floor_f64(val);
-}
-
-static inline float32_t floorf(float32_t val)
-{
-	return floor_f32(val);
-}
-
-static inline float64_t fmod(float64_t dividend, float64_t divisor)
-{
-	return fmod_f64(dividend, divisor);
-}
-
-static inline float32_t fmodf(float32_t dividend, float32_t divisor)
-{
-	return fmod_f32(dividend, divisor);
-}
-
-static inline float64_t frexp(float64_t x, int *exp)
-{
-	return frexp_f64(x, exp);
-}
-
-static inline float32_t frexpf(float32_t x, int *exp)
-{
-	return frexp_f32(x, exp);
-}
-
-static inline float64_t ldexp(float64_t x, int exp)
-{
-	return ldexp_f64(x, exp);
-}
-
-static inline float32_t ldexpf(float32_t x, int exp)
-{
-	return ldexp_f32(x, exp);
-}
-
-static inline float64_t log(float64_t val)
-{
-	return log_f64(val);
-}
-
-static inline float32_t logf(float32_t val)
-{
-	return log_f32(val);
-}
-
-static inline float64_t log10(float64_t val)
-{
-	return log10_f64(val);
-}
-
-static inline float32_t log10f(float32_t val)
-{
-	return log10_f32(val);
-}
-
-static inline float64_t log2(float64_t val)
-{
-	return log2_f64(val);
-}
-
-static inline float32_t log2f(float32_t val)
-{
-	return log2_f32(val);
-}
-
-static inline float64_t modf(float64_t value, float64_t *iptr)
-{
-	return modf_f64(value, iptr);
-}
-
-static inline float32_t modff(float32_t value, float32_t *iptr)
-{
-	return modf_f32(value, iptr);
-}
-
-static inline float64_t pow(float64_t x, float64_t y)
-{
-	return pow_f64(x, y);
-}
-
-static inline float32_t powf(float32_t x, float32_t y)
-{
-	return pow_f32(x, y);
-}
-
-static inline float64_t sin(float64_t val)
-{
-	return sin_f64(val);
-}
-
-static inline float32_t sinf(float32_t val)
-{
-	return sin_f32(val);
-}
-
-static inline float64_t sinh(float64_t val)
-{
-	return sinh_f64(val);
-}
-
-static inline float32_t sinhf(float32_t val)
-{
-	return sinh_f32(val);
-}
-
-static inline float64_t sqrt(float64_t val)
-{
-	return sqrt_f64(val);
-}
-
-static inline float32_t sqrtf(float32_t val)
-{
-	return sqrt_f32(val);
-}
-
-static inline float64_t tan(float64_t val)
-{
-	return tan_f64(val);
-}
-
-static inline float32_t tanf(float32_t val)
-{
-	return tan_f32(val);
-}
-
-static inline float64_t tanh(float64_t val)
-{
-	return tanh_f64(val);
-}
-
-static inline float32_t tanhf(float32_t val)
-{
-	return tanh_f32(val);
-}
-
-static inline float64_t trunc(float64_t val)
-{
-	return trunc_f64(val);
-}
-
-static inline float32_t truncf(float32_t val)
-{
-	return trunc_f32(val);
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/arch/ppc32/Makefile.inc
===================================================================
--- uspace/lib/math/arch/ppc32/Makefile.inc	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,29 +1,0 @@
-#
-# Copyright (c) 2014 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-ARCH_SOURCES =
Index: pace/lib/math/arch/ppc32/include/libarch/math.h
===================================================================
--- uspace/lib/math/arch/ppc32/include/libarch/math.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,548 +1,0 @@
-/*
- * Copyright (c) 2014 Martin Decky
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmathppc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_ppc32_MATH_H_
-#define LIBMATH_ppc32_MATH_H_
-
-#include <acos.h>
-#include <asin.h>
-#include <atan.h>
-#include <atan2.h>
-#include <ceil.h>
-#include <cosh.h>
-#include <exp.h>
-#include <fabs.h>
-#include <floor.h>
-#include <fmod.h>
-#include <frexp.h>
-#include <ldexp.h>
-#include <log.h>
-#include <log10.h>
-#include <log2.h>
-#include <mathtypes.h>
-#include <modf.h>
-#include <pow.h>
-#include <sinh.h>
-#include <sqrt.h>
-#include <tan.h>
-#include <tanh.h>
-#include <trig.h>
-#include <trunc.h>
-
-#define HUGE_VAL FLOAT64_INF
-
-static inline float64_t acos_f64(float64_t val)
-{
-	return float64_acos(val);
-}
-
-static inline float32_t acos_f32(float32_t val)
-{
-	return float32_acos(val);
-}
-
-static inline float64_t asin_f64(float64_t val)
-{
-	return float64_asin(val);
-}
-
-static inline float32_t asin_f32(float32_t val)
-{
-	return float32_asin(val);
-}
-
-static inline float64_t atan_f64(float64_t val)
-{
-	return float64_atan(val);
-}
-
-static inline float32_t atan_f32(float32_t val)
-{
-	return float32_atan(val);
-}
-
-static inline float64_t atan2_f64(float64_t y, float64_t x)
-{
-	return float64_atan2(y, x);
-}
-
-static inline float32_t atan2_f32(float32_t y, float32_t x)
-{
-	return float32_atan2(y, x);
-}
-
-static inline float64_t ceil_f64(float64_t val)
-{
-	return float64_ceil(val);
-}
-
-static inline float32_t ceil_f32(float32_t val)
-{
-	return float32_ceil(val);
-}
-
-static inline float64_t cos_f64(float64_t val)
-{
-	return float64_cos(val);
-}
-
-static inline float32_t cos_f32(float32_t val)
-{
-	return float32_cos(val);
-}
-
-static inline float64_t cosh_f64(float64_t val)
-{
-	return float64_cosh(val);
-}
-
-static inline float32_t cosh_f32(float32_t val)
-{
-	return float32_cosh(val);
-}
-
-static inline float64_t exp_f64(float64_t val)
-{
-	return float64_exp(val);
-}
-
-static inline float32_t exp_f32(float32_t val)
-{
-	return float32_exp(val);
-}
-
-static inline float64_t fabs_f64(float64_t val)
-{
-	return float64_fabs(val);
-}
-
-static inline float32_t fabs_f32(float32_t val)
-{
-	return float32_fabs(val);
-}
-
-static inline float64_t floor_f64(float64_t val)
-{
-	return float64_floor(val);
-}
-
-static inline float32_t floor_f32(float32_t val)
-{
-	return float32_floor(val);
-}
-static inline float64_t fmod_f64(float64_t dividend, float64_t divisor)
-{
-	return float64_fmod(dividend, divisor);
-}
-
-static inline float64_t fmod_f32(float32_t dividend, float32_t divisor)
-{
-	return float32_fmod(dividend, divisor);
-}
-
-static inline float64_t frexp_f64(float64_t x, int *exp)
-{
-	return float64_frexp(x, exp);
-}
-
-static inline float64_t frexp_f32(float32_t x, int *exp)
-{
-	return float32_frexp(x, exp);
-}
-
-static inline float64_t ldexp_f64(float64_t x, int exp)
-{
-	return float64_ldexp(x, exp);
-}
-
-static inline float64_t ldexp_f32(float32_t x, int exp)
-{
-	return float32_ldexp(x, exp);
-}
-
-static inline float64_t log_f64(float64_t val)
-{
-	return float64_log(val);
-}
-
-static inline float32_t log_f32(float32_t val)
-{
-	return float32_log(val);
-}
-
-static inline float64_t log10_f64(float64_t val)
-{
-	return float64_log10(val);
-}
-
-static inline float32_t log10_f32(float32_t val)
-{
-	return float32_log10(val);
-}
-
-static inline float32_t log2_f32(float32_t val)
-{
-	return float32_log2(val);
-}
-
-static inline float64_t log2_f64(float64_t val)
-{
-	return float64_log2(val);
-}
-
-static inline float64_t modf_f64(float64_t value, float64_t *iptr)
-{
-	return float64_modf(value, iptr);
-}
-
-static inline float64_t modf_f32(float32_t value, float32_t *iptr)
-{
-	return float32_modf(value, iptr);
-}
-
-static inline float64_t pow_f64(float64_t x, float64_t y)
-{
-	return float64_pow(x, y);
-}
-
-static inline float32_t pow_f32(float32_t x, float32_t y)
-{
-	return float32_pow(x, y);
-}
-
-static inline float64_t sin_f64(float64_t val)
-{
-	return float64_sin(val);
-}
-
-static inline float32_t sin_f32(float32_t val)
-{
-	return float32_sin(val);
-}
-
-static inline float64_t sinh_f64(float64_t val)
-{
-	return float64_sinh(val);
-}
-
-static inline float32_t sinh_f32(float32_t val)
-{
-	return float32_sinh(val);
-}
-
-static inline float64_t sqrt_f64(float64_t val)
-{
-	return float64_sqrt(val);
-}
-
-static inline float32_t sqrt_f32(float32_t val)
-{
-	return float32_sqrt(val);
-}
-
-static inline float64_t tan_f64(float64_t val)
-{
-	return float64_tan(val);
-}
-
-static inline float32_t tan_f32(float32_t val)
-{
-	return float32_tan(val);
-}
-
-static inline float64_t tanh_f64(float64_t val)
-{
-	return float64_tanh(val);
-}
-
-static inline float32_t tanh_f32(float32_t val)
-{
-	return float32_tanh(val);
-}
-
-static inline float64_t trunc_f64(float64_t val)
-{
-	return float64_trunc(val);
-}
-
-static inline float32_t trunc_f32(float32_t val)
-{
-	return float32_trunc(val);
-}
-
-static inline float64_t acos(float64_t val)
-{
-	return acos_f64(val);
-}
-
-static inline float32_t acosf(float32_t val)
-{
-	return acos_f32(val);
-}
-
-static inline float64_t asin(float64_t val)
-{
-	return asin_f64(val);
-}
-
-static inline float32_t asinf(float32_t val)
-{
-	return asin_f32(val);
-}
-
-static inline float64_t atan(float64_t val)
-{
-	return atan_f64(val);
-}
-
-static inline float32_t atanf(float32_t val)
-{
-	return atan_f32(val);
-}
-
-static inline float64_t atan2(float64_t y, float64_t x)
-{
-	return atan2_f64(y, x);
-}
-
-static inline float32_t atan2f(float32_t y, float32_t x)
-{
-	return atan2_f32(y, x);
-}
-
-static inline float64_t ceil(float64_t val)
-{
-	return ceil_f64(val);
-}
-
-static inline float32_t ceilf(float32_t val)
-{
-	return ceil_f32(val);
-}
-
-static inline float64_t cos(float64_t val)
-{
-	return cos_f64(val);
-}
-
-static inline float32_t cosf(float32_t val)
-{
-	return cos_f32(val);
-}
-
-static inline float64_t cosh(float64_t val)
-{
-	return cosh_f64(val);
-}
-
-static inline float32_t coshf(float32_t val)
-{
-	return cosh_f32(val);
-}
-
-static inline float64_t exp(float64_t val)
-{
-	return exp_f64(val);
-}
-
-static inline float32_t expf(float32_t val)
-{
-	return exp_f32(val);
-}
-
-static inline float64_t fabs(float64_t val)
-{
-	return fabs_f64(val);
-}
-
-static inline float32_t fabsf(float32_t val)
-{
-	return fabs_f32(val);
-}
-
-static inline float64_t floor(float64_t val)
-{
-	return floor_f64(val);
-}
-
-static inline float32_t floorf(float32_t val)
-{
-	return floor_f32(val);
-}
-
-static inline float64_t fmod(float64_t dividend, float64_t divisor)
-{
-	return fmod_f64(dividend, divisor);
-}
-
-static inline float32_t fmodf(float32_t dividend, float32_t divisor)
-{
-	return fmod_f32(dividend, divisor);
-}
-
-static inline float64_t frexp(float64_t x, int *exp)
-{
-	return frexp_f64(x, exp);
-}
-
-static inline float32_t frexpf(float32_t x, int *exp)
-{
-	return frexp_f32(x, exp);
-}
-
-static inline float64_t ldexp(float64_t x, int exp)
-{
-	return ldexp_f64(x, exp);
-}
-
-static inline float32_t ldexpf(float32_t x, int exp)
-{
-	return ldexp_f32(x, exp);
-}
-
-static inline float64_t log(float64_t val)
-{
-	return log_f64(val);
-}
-
-static inline float32_t logf(float32_t val)
-{
-	return log_f32(val);
-}
-
-static inline float64_t log10(float64_t val)
-{
-	return log10_f64(val);
-}
-
-static inline float32_t log10f(float32_t val)
-{
-	return log10_f32(val);
-}
-
-static inline float64_t log2(float64_t val)
-{
-	return log2_f64(val);
-}
-
-static inline float32_t log2f(float32_t val)
-{
-	return log2_f32(val);
-}
-
-static inline float64_t modf(float64_t value, float64_t *iptr)
-{
-	return modf_f64(value, iptr);
-}
-
-static inline float32_t modff(float32_t value, float32_t *iptr)
-{
-	return modf_f32(value, iptr);
-}
-
-static inline float64_t pow(float64_t x, float64_t y)
-{
-	return pow_f64(x, y);
-}
-
-static inline float32_t powf(float32_t x, float32_t y)
-{
-	return pow_f32(x, y);
-}
-
-static inline float64_t sin(float64_t val)
-{
-	return sin_f64(val);
-}
-
-static inline float32_t sinf(float32_t val)
-{
-	return sin_f32(val);
-}
-
-static inline float64_t sinh(float64_t val)
-{
-	return sinh_f64(val);
-}
-
-static inline float32_t sinhf(float32_t val)
-{
-	return sinh_f32(val);
-}
-
-static inline float64_t sqrt(float64_t val)
-{
-	return sqrt_f64(val);
-}
-
-static inline float32_t sqrtf(float32_t val)
-{
-	return sqrt_f32(val);
-}
-
-static inline float64_t tan(float64_t val)
-{
-	return tan_f64(val);
-}
-
-static inline float32_t tanf(float32_t val)
-{
-	return tan_f32(val);
-}
-
-static inline float64_t tanh(float64_t val)
-{
-	return tanh_f64(val);
-}
-
-static inline float32_t tanhf(float32_t val)
-{
-	return tanh_f32(val);
-}
-
-static inline float64_t trunc(float64_t val)
-{
-	return trunc_f64(val);
-}
-
-static inline float32_t truncf(float32_t val)
-{
-	return trunc_f32(val);
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/arch/riscv64/Makefile.inc
===================================================================
--- uspace/lib/math/arch/riscv64/Makefile.inc	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,29 +1,0 @@
-#
-# Copyright (c) 2016 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-ARCH_SOURCES =
Index: pace/lib/math/arch/riscv64/include/libarch/math.h
===================================================================
--- uspace/lib/math/arch/riscv64/include/libarch/math.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,547 +1,0 @@
-/*
- * Copyright (c) 2016 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmathriscv64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_riscv64_MATH_H_
-#define LIBMATH_riscv64_MATH_H_
-
-#include <acos.h>
-#include <asin.h>
-#include <atan.h>
-#include <atan2.h>
-#include <ceil.h>
-#include <cosh.h>
-#include <exp.h>
-#include <fabs.h>
-#include <floor.h>
-#include <fmod.h>
-#include <frexp.h>
-#include <ldexp.h>
-#include <log.h>
-#include <log10.h>
-#include <log2.h>
-#include <mathtypes.h>
-#include <modf.h>
-#include <pow.h>
-#include <sinh.h>
-#include <sqrt.h>
-#include <tan.h>
-#include <tanh.h>
-#include <trig.h>
-#include <trunc.h>
-
-#define HUGE_VAL FLOAT64_INF
-
-static inline float64_t acos_f64(float64_t val)
-{
-	return float64_acos(val);
-}
-
-static inline float32_t acos_f32(float32_t val)
-{
-	return float32_acos(val);
-}
-
-static inline float64_t asin_f64(float64_t val)
-{
-	return float64_asin(val);
-}
-
-static inline float32_t asin_f32(float32_t val)
-{
-	return float32_asin(val);
-}
-
-static inline float64_t atan_f64(float64_t val)
-{
-	return float64_atan(val);
-}
-
-static inline float32_t atan_f32(float32_t val)
-{
-	return float32_atan(val);
-}
-
-static inline float64_t atan2_f64(float64_t y, float64_t x)
-{
-	return float64_atan2(y, x);
-}
-
-static inline float32_t atan2_f32(float32_t y, float32_t x)
-{
-	return float32_atan2(y, x);
-}
-
-static inline float64_t ceil_f64(float64_t val)
-{
-	return float64_ceil(val);
-}
-
-static inline float32_t ceil_f32(float32_t val)
-{
-	return float32_ceil(val);
-}
-
-static inline float64_t cos_f64(float64_t val)
-{
-	return float64_cos(val);
-}
-
-static inline float32_t cos_f32(float32_t val)
-{
-	return float32_cos(val);
-}
-
-static inline float64_t cosh_f64(float64_t val)
-{
-	return float64_cosh(val);
-}
-
-static inline float32_t cosh_f32(float32_t val)
-{
-	return float32_cosh(val);
-}
-
-static inline float64_t exp_f64(float64_t val)
-{
-	return float64_exp(val);
-}
-
-static inline float32_t exp_f32(float32_t val)
-{
-	return float32_exp(val);
-}
-
-static inline float64_t fabs_f64(float64_t val)
-{
-	return float64_fabs(val);
-}
-
-static inline float32_t fabs_f32(float32_t val)
-{
-	return float32_fabs(val);
-}
-
-static inline float64_t floor_f64(float64_t val)
-{
-	return float64_floor(val);
-}
-
-static inline float32_t floor_f32(float32_t val)
-{
-	return float32_floor(val);
-}
-static inline float64_t fmod_f64(float64_t dividend, float64_t divisor)
-{
-	return float64_fmod(dividend, divisor);
-}
-
-static inline float64_t fmod_f32(float32_t dividend, float32_t divisor)
-{
-	return float32_fmod(dividend, divisor);
-}
-
-static inline float64_t frexp_f64(float64_t x, int *exp)
-{
-	return float64_frexp(x, exp);
-}
-
-static inline float64_t frexp_f32(float32_t x, int *exp)
-{
-	return float32_frexp(x, exp);
-}
-
-static inline float64_t ldexp_f64(float64_t x, int exp)
-{
-	return float64_ldexp(x, exp);
-}
-
-static inline float64_t ldexp_f32(float32_t x, int exp)
-{
-	return float32_ldexp(x, exp);
-}
-
-static inline float64_t log_f64(float64_t val)
-{
-	return float64_log(val);
-}
-
-static inline float32_t log_f32(float32_t val)
-{
-	return float32_log(val);
-}
-
-static inline float64_t log10_f64(float64_t val)
-{
-	return float64_log10(val);
-}
-
-static inline float32_t log10_f32(float32_t val)
-{
-	return float32_log10(val);
-}
-
-static inline float32_t log2_f32(float32_t val)
-{
-	return float32_log2(val);
-}
-
-static inline float64_t log2_f64(float64_t val)
-{
-	return float64_log2(val);
-}
-
-static inline float64_t modf_f64(float64_t value, float64_t *iptr)
-{
-	return float64_modf(value, iptr);
-}
-
-static inline float64_t modf_f32(float32_t value, float32_t *iptr)
-{
-	return float32_modf(value, iptr);
-}
-
-static inline float64_t pow_f64(float64_t x, float64_t y)
-{
-	return float64_pow(x, y);
-}
-
-static inline float32_t pow_f32(float32_t x, float32_t y)
-{
-	return float32_pow(x, y);
-}
-
-static inline float64_t sin_f64(float64_t val)
-{
-	return float64_sin(val);
-}
-
-static inline float32_t sin_f32(float32_t val)
-{
-	return float32_sin(val);
-}
-
-static inline float64_t sinh_f64(float64_t val)
-{
-	return float64_sinh(val);
-}
-
-static inline float32_t sinh_f32(float32_t val)
-{
-	return float32_sinh(val);
-}
-
-static inline float64_t sqrt_f64(float64_t val)
-{
-	return float64_sqrt(val);
-}
-
-static inline float32_t sqrt_f32(float32_t val)
-{
-	return float32_sqrt(val);
-}
-
-static inline float64_t tan_f64(float64_t val)
-{
-	return float64_tan(val);
-}
-
-static inline float32_t tan_f32(float32_t val)
-{
-	return float32_tan(val);
-}
-
-static inline float64_t tanh_f64(float64_t val)
-{
-	return float64_tanh(val);
-}
-
-static inline float32_t tanh_f32(float32_t val)
-{
-	return float32_tanh(val);
-}
-
-static inline float64_t trunc_f64(float64_t val)
-{
-	return float64_trunc(val);
-}
-
-static inline float32_t trunc_f32(float32_t val)
-{
-	return float32_trunc(val);
-}
-
-static inline float64_t acos(float64_t val)
-{
-	return acos_f64(val);
-}
-
-static inline float32_t acosf(float32_t val)
-{
-	return acos_f32(val);
-}
-
-static inline float64_t asin(float64_t val)
-{
-	return asin_f64(val);
-}
-
-static inline float32_t asinf(float32_t val)
-{
-	return asin_f32(val);
-}
-
-static inline float64_t atan(float64_t val)
-{
-	return atan_f64(val);
-}
-
-static inline float32_t atanf(float32_t val)
-{
-	return atan_f32(val);
-}
-
-static inline float64_t atan2(float64_t y, float64_t x)
-{
-	return atan2_f64(y, x);
-}
-
-static inline float32_t atan2f(float32_t y, float32_t x)
-{
-	return atan2_f32(y, x);
-}
-
-static inline float64_t ceil(float64_t val)
-{
-	return ceil_f64(val);
-}
-
-static inline float32_t ceilf(float32_t val)
-{
-	return ceil_f32(val);
-}
-
-static inline float64_t cos(float64_t val)
-{
-	return cos_f64(val);
-}
-
-static inline float32_t cosf(float32_t val)
-{
-	return cos_f32(val);
-}
-
-static inline float64_t cosh(float64_t val)
-{
-	return cosh_f64(val);
-}
-
-static inline float32_t coshf(float32_t val)
-{
-	return cosh_f32(val);
-}
-
-static inline float64_t exp(float64_t val)
-{
-	return exp_f64(val);
-}
-
-static inline float32_t expf(float32_t val)
-{
-	return exp_f32(val);
-}
-
-static inline float64_t fabs(float64_t val)
-{
-	return fabs_f64(val);
-}
-
-static inline float32_t fabsf(float32_t val)
-{
-	return fabs_f32(val);
-}
-
-static inline float64_t floor(float64_t val)
-{
-	return floor_f64(val);
-}
-
-static inline float32_t floorf(float32_t val)
-{
-	return floor_f32(val);
-}
-
-static inline float64_t fmod(float64_t dividend, float64_t divisor)
-{
-	return fmod_f64(dividend, divisor);
-}
-
-static inline float32_t fmodf(float32_t dividend, float32_t divisor)
-{
-	return fmod_f32(dividend, divisor);
-}
-
-static inline float64_t frexp(float64_t x, int *exp)
-{
-	return frexp_f64(x, exp);
-}
-
-static inline float32_t frexpf(float32_t x, int *exp)
-{
-	return frexp_f32(x, exp);
-}
-
-static inline float64_t ldexp(float64_t x, int exp)
-{
-	return ldexp_f64(x, exp);
-}
-
-static inline float32_t ldexpf(float32_t x, int exp)
-{
-	return ldexp_f32(x, exp);
-}
-
-static inline float64_t log(float64_t val)
-{
-	return log_f64(val);
-}
-
-static inline float32_t logf(float32_t val)
-{
-	return log_f32(val);
-}
-
-static inline float64_t log10(float64_t val)
-{
-	return log10_f64(val);
-}
-
-static inline float32_t log10f(float32_t val)
-{
-	return log10_f32(val);
-}
-
-static inline float64_t log2(float64_t val)
-{
-	return log2_f64(val);
-}
-
-static inline float32_t log2f(float32_t val)
-{
-	return log2_f32(val);
-}
-
-static inline float64_t modf(float64_t value, float64_t *iptr)
-{
-	return modf_f64(value, iptr);
-}
-
-static inline float32_t modff(float32_t value, float32_t *iptr)
-{
-	return modf_f32(value, iptr);
-}
-
-static inline float64_t pow(float64_t x, float64_t y)
-{
-	return pow_f64(x, y);
-}
-
-static inline float32_t powf(float32_t x, float32_t y)
-{
-	return pow_f32(x, y);
-}
-
-static inline float64_t sin(float64_t val)
-{
-	return sin_f64(val);
-}
-
-static inline float32_t sinf(float32_t val)
-{
-	return sin_f32(val);
-}
-
-static inline float64_t sinh(float64_t val)
-{
-	return sinh_f64(val);
-}
-
-static inline float32_t sinhf(float32_t val)
-{
-	return sinh_f32(val);
-}
-
-static inline float64_t sqrt(float64_t val)
-{
-	return sqrt_f64(val);
-}
-
-static inline float32_t sqrtf(float32_t val)
-{
-	return sqrt_f32(val);
-}
-
-static inline float64_t tan(float64_t val)
-{
-	return tan_f64(val);
-}
-
-static inline float32_t tanf(float32_t val)
-{
-	return tan_f32(val);
-}
-
-static inline float64_t tanh(float64_t val)
-{
-	return tanh_f64(val);
-}
-
-static inline float32_t tanhf(float32_t val)
-{
-	return tanh_f32(val);
-}
-
-static inline float64_t trunc(float64_t val)
-{
-	return trunc_f64(val);
-}
-
-static inline float32_t truncf(float32_t val)
-{
-	return trunc_f32(val);
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/arch/sparc64/Makefile.inc
===================================================================
--- uspace/lib/math/arch/sparc64/Makefile.inc	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,29 +1,0 @@
-#
-# Copyright (c) 2014 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-ARCH_SOURCES =
Index: pace/lib/math/arch/sparc64/include/libarch/math.h
===================================================================
--- uspace/lib/math/arch/sparc64/include/libarch/math.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,548 +1,0 @@
-/*
- * Copyright (c) 2014 Martin Decky
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmathsparc64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_sparc64_MATH_H_
-#define LIBMATH_sparc64_MATH_H_
-
-#include <acos.h>
-#include <asin.h>
-#include <atan.h>
-#include <atan2.h>
-#include <ceil.h>
-#include <cosh.h>
-#include <exp.h>
-#include <fabs.h>
-#include <floor.h>
-#include <fmod.h>
-#include <frexp.h>
-#include <ldexp.h>
-#include <log.h>
-#include <log10.h>
-#include <log2.h>
-#include <mathtypes.h>
-#include <modf.h>
-#include <pow.h>
-#include <sinh.h>
-#include <sqrt.h>
-#include <tan.h>
-#include <tanh.h>
-#include <trig.h>
-#include <trunc.h>
-
-#define HUGE_VAL FLOAT64_INF
-
-static inline float64_t acos_f64(float64_t val)
-{
-	return float64_acos(val);
-}
-
-static inline float32_t acos_f32(float32_t val)
-{
-	return float32_acos(val);
-}
-
-static inline float64_t asin_f64(float64_t val)
-{
-	return float64_asin(val);
-}
-
-static inline float32_t asin_f32(float32_t val)
-{
-	return float32_asin(val);
-}
-
-static inline float64_t atan_f64(float64_t val)
-{
-	return float64_atan(val);
-}
-
-static inline float32_t atan_f32(float32_t val)
-{
-	return float32_atan(val);
-}
-
-static inline float64_t atan2_f64(float64_t y, float64_t x)
-{
-	return float64_atan2(y, x);
-}
-
-static inline float32_t atan2_f32(float32_t y, float32_t x)
-{
-	return float32_atan2(y, x);
-}
-
-static inline float64_t ceil_f64(float64_t val)
-{
-	return float64_ceil(val);
-}
-
-static inline float32_t ceil_f32(float32_t val)
-{
-	return float32_ceil(val);
-}
-
-static inline float64_t cos_f64(float64_t val)
-{
-	return float64_cos(val);
-}
-
-static inline float32_t cos_f32(float32_t val)
-{
-	return float32_cos(val);
-}
-
-static inline float64_t cosh_f64(float64_t val)
-{
-	return float64_cosh(val);
-}
-
-static inline float32_t cosh_f32(float32_t val)
-{
-	return float32_cosh(val);
-}
-
-static inline float64_t exp_f64(float64_t val)
-{
-	return float64_exp(val);
-}
-
-static inline float32_t exp_f32(float32_t val)
-{
-	return float32_exp(val);
-}
-
-static inline float64_t fabs_f64(float64_t val)
-{
-	return float64_fabs(val);
-}
-
-static inline float32_t fabs_f32(float32_t val)
-{
-	return float32_fabs(val);
-}
-
-static inline float64_t floor_f64(float64_t val)
-{
-	return float64_floor(val);
-}
-
-static inline float32_t floor_f32(float32_t val)
-{
-	return float32_floor(val);
-}
-static inline float64_t fmod_f64(float64_t dividend, float64_t divisor)
-{
-	return float64_fmod(dividend, divisor);
-}
-
-static inline float64_t fmod_f32(float32_t dividend, float32_t divisor)
-{
-	return float32_fmod(dividend, divisor);
-}
-
-static inline float64_t frexp_f64(float64_t x, int *exp)
-{
-	return float64_frexp(x, exp);
-}
-
-static inline float64_t frexp_f32(float32_t x, int *exp)
-{
-	return float32_frexp(x, exp);
-}
-
-static inline float64_t ldexp_f64(float64_t x, int exp)
-{
-	return float64_ldexp(x, exp);
-}
-
-static inline float64_t ldexp_f32(float32_t x, int exp)
-{
-	return float32_ldexp(x, exp);
-}
-
-static inline float64_t log_f64(float64_t val)
-{
-	return float64_log(val);
-}
-
-static inline float32_t log_f32(float32_t val)
-{
-	return float32_log(val);
-}
-
-static inline float64_t log10_f64(float64_t val)
-{
-	return float64_log10(val);
-}
-
-static inline float32_t log10_f32(float32_t val)
-{
-	return float32_log10(val);
-}
-
-static inline float32_t log2_f32(float32_t val)
-{
-	return float32_log2(val);
-}
-
-static inline float64_t log2_f64(float64_t val)
-{
-	return float64_log2(val);
-}
-
-static inline float64_t modf_f64(float64_t value, float64_t *iptr)
-{
-	return float64_modf(value, iptr);
-}
-
-static inline float64_t modf_f32(float32_t value, float32_t *iptr)
-{
-	return float32_modf(value, iptr);
-}
-
-static inline float64_t pow_f64(float64_t x, float64_t y)
-{
-	return float64_pow(x, y);
-}
-
-static inline float32_t pow_f32(float32_t x, float32_t y)
-{
-	return float32_pow(x, y);
-}
-
-static inline float64_t sin_f64(float64_t val)
-{
-	return float64_sin(val);
-}
-
-static inline float32_t sin_f32(float32_t val)
-{
-	return float32_sin(val);
-}
-
-static inline float64_t sinh_f64(float64_t val)
-{
-	return float64_sinh(val);
-}
-
-static inline float32_t sinh_f32(float32_t val)
-{
-	return float32_sinh(val);
-}
-
-static inline float64_t sqrt_f64(float64_t val)
-{
-	return float64_sqrt(val);
-}
-
-static inline float32_t sqrt_f32(float32_t val)
-{
-	return float32_sqrt(val);
-}
-
-static inline float64_t tan_f64(float64_t val)
-{
-	return float64_tan(val);
-}
-
-static inline float32_t tan_f32(float32_t val)
-{
-	return float32_tan(val);
-}
-
-static inline float64_t tanh_f64(float64_t val)
-{
-	return float64_tanh(val);
-}
-
-static inline float32_t tanh_f32(float32_t val)
-{
-	return float32_tanh(val);
-}
-
-static inline float64_t trunc_f64(float64_t val)
-{
-	return float64_trunc(val);
-}
-
-static inline float32_t trunc_f32(float32_t val)
-{
-	return float32_trunc(val);
-}
-
-static inline float64_t acos(float64_t val)
-{
-	return acos_f64(val);
-}
-
-static inline float32_t acosf(float32_t val)
-{
-	return acos_f32(val);
-}
-
-static inline float64_t asin(float64_t val)
-{
-	return asin_f64(val);
-}
-
-static inline float32_t asinf(float32_t val)
-{
-	return asin_f32(val);
-}
-
-static inline float64_t atan(float64_t val)
-{
-	return atan_f64(val);
-}
-
-static inline float32_t atanf(float32_t val)
-{
-	return atan_f32(val);
-}
-
-static inline float64_t atan2(float64_t y, float64_t x)
-{
-	return atan2_f64(y, x);
-}
-
-static inline float32_t atan2f(float32_t y, float32_t x)
-{
-	return atan2_f32(y, x);
-}
-
-static inline float64_t ceil(float64_t val)
-{
-	return ceil_f64(val);
-}
-
-static inline float32_t ceilf(float32_t val)
-{
-	return ceil_f32(val);
-}
-
-static inline float64_t cos(float64_t val)
-{
-	return cos_f64(val);
-}
-
-static inline float32_t cosf(float32_t val)
-{
-	return cos_f32(val);
-}
-
-static inline float64_t cosh(float64_t val)
-{
-	return cosh_f64(val);
-}
-
-static inline float32_t coshf(float32_t val)
-{
-	return cosh_f32(val);
-}
-
-static inline float64_t exp(float64_t val)
-{
-	return exp_f64(val);
-}
-
-static inline float32_t expf(float32_t val)
-{
-	return exp_f32(val);
-}
-
-static inline float64_t fabs(float64_t val)
-{
-	return fabs_f64(val);
-}
-
-static inline float32_t fabsf(float32_t val)
-{
-	return fabs_f32(val);
-}
-
-static inline float64_t floor(float64_t val)
-{
-	return floor_f64(val);
-}
-
-static inline float32_t floorf(float32_t val)
-{
-	return floor_f32(val);
-}
-
-static inline float64_t fmod(float64_t dividend, float64_t divisor)
-{
-	return fmod_f64(dividend, divisor);
-}
-
-static inline float32_t fmodf(float32_t dividend, float32_t divisor)
-{
-	return fmod_f32(dividend, divisor);
-}
-
-static inline float64_t frexp(float64_t x, int *exp)
-{
-	return frexp_f64(x, exp);
-}
-
-static inline float32_t frexpf(float32_t x, int *exp)
-{
-	return frexp_f32(x, exp);
-}
-
-static inline float64_t ldexp(float64_t x, int exp)
-{
-	return ldexp_f64(x, exp);
-}
-
-static inline float32_t ldexpf(float32_t x, int exp)
-{
-	return ldexp_f32(x, exp);
-}
-
-static inline float64_t log(float64_t val)
-{
-	return log_f64(val);
-}
-
-static inline float32_t logf(float32_t val)
-{
-	return log_f32(val);
-}
-
-static inline float64_t log10(float64_t val)
-{
-	return log10_f64(val);
-}
-
-static inline float32_t log10f(float32_t val)
-{
-	return log10_f32(val);
-}
-
-static inline float64_t log2(float64_t val)
-{
-	return log2_f64(val);
-}
-
-static inline float32_t log2f(float32_t val)
-{
-	return log2_f32(val);
-}
-
-static inline float64_t modf(float64_t value, float64_t *iptr)
-{
-	return modf_f64(value, iptr);
-}
-
-static inline float32_t modff(float32_t value, float32_t *iptr)
-{
-	return modf_f32(value, iptr);
-}
-
-static inline float64_t pow(float64_t x, float64_t y)
-{
-	return pow_f64(x, y);
-}
-
-static inline float32_t powf(float32_t x, float32_t y)
-{
-	return pow_f32(x, y);
-}
-
-static inline float64_t sin(float64_t val)
-{
-	return sin_f64(val);
-}
-
-static inline float32_t sinf(float32_t val)
-{
-	return sin_f32(val);
-}
-
-static inline float64_t sinh(float64_t val)
-{
-	return sinh_f64(val);
-}
-
-static inline float32_t sinhf(float32_t val)
-{
-	return sinh_f32(val);
-}
-
-static inline float64_t sqrt(float64_t val)
-{
-	return sqrt_f64(val);
-}
-
-static inline float32_t sqrtf(float32_t val)
-{
-	return sqrt_f32(val);
-}
-
-static inline float64_t tan(float64_t val)
-{
-	return tan_f64(val);
-}
-
-static inline float32_t tanf(float32_t val)
-{
-	return tan_f32(val);
-}
-
-static inline float64_t tanh(float64_t val)
-{
-	return tanh_f64(val);
-}
-
-static inline float32_t tanhf(float32_t val)
-{
-	return tanh_f32(val);
-}
-
-static inline float64_t trunc(float64_t val)
-{
-	return trunc_f64(val);
-}
-
-static inline float32_t truncf(float32_t val)
-{
-	return trunc_f32(val);
-}
-
-#endif
-
-/** @}
- */
Index: uspace/lib/math/generic/__fcompare.c
===================================================================
--- uspace/lib/math/generic/__fcompare.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
+++ uspace/lib/math/generic/__fcompare.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2018 CZ.NIC, z.s.p.o.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <math.h>
+#include <stdarg.h>
+
+/**
+ * Fallback symbol used when code including <math.h> is compiled with something
+ * other than GCC or Clang. The function itself must be built with GCC or Clang.
+ */
+int __fcompare(size_t sz1, size_t sz2, ...)
+{
+	va_list ap;
+	va_start(ap, sz2);
+
+	long double val1;
+	long double val2;
+
+	switch (sz1) {
+	case 4:
+		val1 = (long double) va_arg(ap, double);
+		break;
+	case 8:
+		val1 = (long double) va_arg(ap, double);
+		break;
+	default:
+		val1 = va_arg(ap, long double);
+		break;
+	}
+
+	switch (sz2) {
+	case 4:
+		val2 = (long double) va_arg(ap, double);
+		break;
+	case 8:
+		val2 = (long double) va_arg(ap, double);
+		break;
+	default:
+		val2 = va_arg(ap, long double);
+		break;
+	}
+
+	va_end(ap);
+
+	if (isgreaterequal(val1, val2)) {
+		if (isgreater(val1, val2))
+			return __FCOMPARE_GREATER;
+		else
+			return __FCOMPARE_EQUAL;
+	} else {
+		if (isless(val1, val2))
+			return __FCOMPARE_LESS;
+		else
+			return 0;
+	}
+}
+
Index: uspace/lib/math/generic/__fpclassify.c
===================================================================
--- uspace/lib/math/generic/__fpclassify.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
+++ uspace/lib/math/generic/__fpclassify.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2018 CZ.NIC, z.s.p.o.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <math.h>
+#include <stdarg.h>
+
+/**
+ * Fallback symbol used when code including <math.h> is compiled with something
+ * other than GCC or Clang. The function itself must be built with GCC or Clang.
+ */
+int __fpclassify(size_t sz, ...)
+{
+	va_list ap;
+	va_start(ap, sz);
+
+	int result;
+
+	switch (sz) {
+	case 4:
+		result = fpclassify((float) va_arg(ap, double));
+		break;
+	case 8:
+		result = fpclassify(va_arg(ap, double));
+		break;
+	default:
+		result = fpclassify(va_arg(ap, long double));
+		break;
+	}
+
+	va_end(ap);
+	return result;
+}
+
Index: uspace/lib/math/generic/__signbit.c
===================================================================
--- uspace/lib/math/generic/__signbit.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
+++ uspace/lib/math/generic/__signbit.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2018 CZ.NIC, z.s.p.o.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <math.h>
+#include <stdarg.h>
+
+/**
+ * Fallback symbol used when code including <math.h> is compiled with something
+ * other than GCC or Clang. The function itself must be built with GCC or Clang.
+ */
+int __signbit(size_t sz, ...)
+{
+	va_list ap;
+	va_start(ap, sz);
+
+	int result;
+
+	switch (sz) {
+	case 4:
+		result = signbit(va_arg(ap, double));
+		break;
+	case 8:
+		result = signbit(va_arg(ap, double));
+		break;
+	default:
+		result = signbit(va_arg(ap, long double));
+		break;
+	}
+
+	va_end(ap);
+	return result;
+}
+
Index: pace/lib/math/generic/acos.c
===================================================================
--- uspace/lib/math/generic/acos.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,78 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <acos.h>
-#include <errno.h>
-#include <math.h>
-
-/** Inverse cosine (32-bit floating point)
- *
- * Compute inverse cosine value.
- *
- * @param arg Inversecosine argument.
- *
- * @return Inverse cosine value.
- *
- */
-float32_t float32_acos(float32_t arg)
-{
-	if (arg < -1.0 || arg > 1.0) {
-		errno = EDOM;
-		return FLOAT32_NAN;
-	}
-
-	return M_PI_2 - asin_f32(arg);
-}
-
-/** Inverse cosine (64-bit floating point)
- *
- * Compute inverse cosine value.
- *
- * @param arg Inversecosine argument.
- *
- * @return Inverse cosine value.
- *
- */
-float64_t float64_acos(float64_t arg)
-{
-	if (arg < -1.0 || arg > 1.0) {
-		errno = EDOM;
-		return FLOAT64_NAN;
-	}
-
-	return M_PI_2 - asin_f64(arg);
-}
-
-/** @}
- */
Index: pace/lib/math/generic/asin.c
===================================================================
--- uspace/lib/math/generic/asin.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,90 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <asin.h>
-#include <errno.h>
-#include <math.h>
-
-/** Inverse sine (32-bit floating point)
- *
- * Compute inverse sine value.
- *
- * @param arg Inverse sine argument.
- *
- * @return Inverse sine value.
- *
- */
-float32_t float32_asin(float32_t arg)
-{
-	float32_t aval;
-
-	if (arg < -1.0 || arg > 1.0) {
-		errno = EDOM;
-		return FLOAT32_NAN;
-	}
-
-	aval = 2.0 * atan_f32(arg / (1.0 + sqrt_f32(1.0 - arg * arg)));
-	if (arg > 0.0)
-		return aval;
-	else
-		return -aval;
-}
-
-/** Inverse sine (64-bit floating point)
- *
- * Compute inverse sine value.
- *
- * @param arg Inverse sine argument.
- *
- * @return Inverse sine value.
- *
- */
-float64_t float64_asin(float64_t arg)
-{
-	float64_t aval;
-
-	if (arg < -1.0 || arg > 1.0) {
-		errno = EDOM;
-		return FLOAT64_NAN;
-	}
-
-	aval = 2.0 * atan_f64(arg / (1.0 + sqrt_f64(1.0 - arg * arg)));
-	if (arg > 0.0)
-		return aval;
-	else
-		return -aval;
-}
-
-/** @}
- */
Index: pace/lib/math/generic/atan.c
===================================================================
--- uspace/lib/math/generic/atan.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,141 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <atan.h>
-#include <errno.h>
-#include <math.h>
-
-#define SERIES_DEGREE_32 13
-#define SERIES_DEGREE_64 33
-
-/** Inverse tangent approximation by Euler's series (32-bit floating point)
- *
- * Compute the approximation of inverse tangent by a
- * series found by Leonhard Euler (using the first SERIES_DEGREE terms).
- *
- * @param arg Inverse tangent argument.
- *
- * @return Inverse tangent value approximation.
- *
- */
-static float32_t series_atan_32(float32_t arg)
-{
-	float32_t sum = 0;
-	float32_t a = arg / (1.0 + arg * arg);
-
-	/*
-	 * atan(z) = sum(n=0, +inf) [ (2^2n) * (n!)^2 / (2n + 1)! *
-	 *    z^(2n+1) / (1 + z^2)^(n+1) ]
-	 */
-
-	for (unsigned int n = 0; n < SERIES_DEGREE_32; n++) {
-		if (n > 0) {
-			a = a * n * n;
-			a = a / (2.0 * n + 1.0) / (2.0 * n);
-		}
-		sum += a;
-		a = a * 4.0 * arg * arg / (1.0 + arg * arg);
-	}
-
-	return sum;
-}
-
-/** Inverse tangent approximation by Euler's series (64-bit floating point)
- *
- * Compute the approximation of inverse tangent by a
- * series found by Leonhard Euler (using the first SERIES_DEGREE terms).
- *
- * @param arg Inverse tangent argument.
- *
- * @return Inverse tangent value approximation.
- *
- */
-static float64_t series_atan_64(float64_t arg)
-{
-	float64_t sum = 0;
-	float64_t a = arg / (1.0 + arg * arg);
-
-	/*
-	 * atan(z) = sum(n=0, +inf) [ (2^2n) * (n!)^2 / (2n + 1)! *
-	 *    z^(2n+1) / (1 + z^2)^(n+1) ]
-	 */
-
-	for (unsigned int n = 0; n < SERIES_DEGREE_64; n++) {
-		if (n > 0) {
-			a = a * n * n;
-			a = a / (2.0 * n + 1.0) / (2.0 * n);
-		}
-		sum += a;
-		a = a * 4.0 * arg * arg / (1.0 + arg * arg);
-	}
-
-	return sum;
-}
-
-/** Inverse tangent (32-bit floating point)
- *
- * Compute inverse sine value.
- *
- * @param arg Inverse sine argument.
- *
- * @return Inverse sine value.
- *
- */
-float32_t float32_atan(float32_t arg)
-{
-	if (arg < -1.0 || arg > 1.0)
-		return 2.0 * series_atan_32(arg / (1.0 + sqrt_f32(1.0 + arg * arg)));
-	else
-		return series_atan_32(arg);
-}
-
-/** Inverse tangent (64-bit floating point)
- *
- * Compute inverse sine value.
- *
- * @param arg Inverse sine argument.
- *
- * @return Inverse sine value.
- *
- */
-float64_t float64_atan(float64_t arg)
-{
-	if (arg < -1.0 || arg > 1.0)
-		return 2.0 * series_atan_64(arg / (1.0 + sqrt_f64(1.0 + arg * arg)));
-	else
-		return series_atan_64(arg);
-}
-
-/** @}
- */
Index: pace/lib/math/generic/atan2.c
===================================================================
--- uspace/lib/math/generic/atan2.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,76 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <atan2.h>
-#include <errno.h>
-#include <math.h>
-
-/** Inverse tangent of two variables (32-bit floating point)
- *
- * @param y
- * @param x
- *
- * @return Inverse tangent of @a y / @a x.
- *
- */
-float32_t float32_atan2(float32_t y, float32_t x)
-{
-	if (x >= 0)
-		return atan_f32(y / x);
-	else if (y >= 0)
-		return M_PI - atan_f32(y / -x);
-	else
-		return -M_PI + atan_f32(y / -x);
-}
-
-/** Inverse tangent of two variables (64-bit floating point)
- *
- * @param y
- * @param x
- *
- * @return Inverse tangent of @a y / @a x.
- *
- */
-float64_t float64_atan2(float64_t y, float64_t x)
-{
-	if (x >= 0)
-		return atan_f64(y / x);
-	else if (y >= 0)
-		return M_PI - atan_f64(y / -x);
-	else
-		return -M_PI + atan_f64(y / -x);
-}
-
-/** @}
- */
Index: pace/lib/math/generic/ceil.c
===================================================================
--- uspace/lib/math/generic/ceil.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,88 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <ceil.h>
-#include <math.h>
-#include <mathtypes.h>
-
-/** Ceiling (round towards positive infinity, 32-bit floating point)
- *
- * @param val Floating point number.
- *
- * @return Number rounded towards positive infinity.
- */
-float32_t float32_ceil(float32_t val)
-{
-	float32_u t;
-	float32_u v;
-	float32_u r;
-
-	v.val = val;
-	t.val = trunc_f32(val);
-
-	if (v.data.parts.sign == 1 || val == t.val) {
-		r = t;
-	} else {
-		r.val = t.val + 1.0;
-	}
-
-	return r.val;
-}
-
-/** Ceiling (round towards positive infinity, 64-bit floating point)
- *
- * @param val Floating point number.
- *
- * @return Number rounded towards positive infinity.
- */
-float64_t float64_ceil(float64_t val)
-{
-	float64_u t;
-	float64_u v;
-	float64_u r;
-
-	v.val = val;
-	t.val = trunc_f64(val);
-
-	if (v.data.parts.sign == 1 || val == t.val) {
-		r = t;
-	} else {
-		r.val = t.val + 1.0;
-	}
-
-	return r.val;
-}
-
-/** @}
- */
Index: pace/lib/math/generic/cosh.c
===================================================================
--- uspace/lib/math/generic/cosh.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <cosh.h>
-#include <math.h>
-
-/** Hyperbolic cosine (32-bit floating point)
- *
- * Compute hyperbolic cosine value.
- *
- * @param arg Hyperbolic angle
- *
- * @return Hyperbolic cosine.
- *
- */
-float32_t float32_cosh(float32_t arg)
-{
-	return (exp_f32(arg) + exp_f32(-arg)) / 2.0;
-}
-
-/** Hyperbolic cosine (64-bit floating point)
- *
- * Compute hyperbolic cosine value.
- *
- * @param arg Hyperbolic angle
- *
- * @return Hyperbolic cosine.
- *
- */
-float64_t float64_cosh(float64_t arg)
-{
-	return (exp_f64(arg) + exp_f64(-arg)) / 2.0;
-}
-
-/** @}
- */
Index: pace/lib/math/generic/exp.c
===================================================================
--- uspace/lib/math/generic/exp.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,161 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * Copyright (c) 2014 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <exp.h>
-#include <math.h>
-
-#define TAYLOR_DEGREE_32 13
-#define TAYLOR_DEGREE_64 21
-
-/** Precomputed values for factorial (starting from 1!) */
-static float64_t factorials[TAYLOR_DEGREE_64] = {
-	1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800,
-	479001600, 6227020800.0L, 87178291200.0L, 1307674368000.0L,
-	20922789888000.0L, 355687428096000.0L, 6402373705728000.0L,
-	121645100408832000.0L, 2432902008176640000.0L, 51090942171709440000.0L
-};
-
-/** Exponential approximation by Taylor series (32-bit floating point)
- *
- * Compute the approximation of exponential by a Taylor
- * series (using the first TAYLOR_DEGREE terms).
- * The approximation is reasonably accurate for
- * arguments within the interval XXXX.
- *
- * @param arg Argument.
- *
- * @return Exponential value approximation.
- *
- */
-static float32_t taylor_exp_32(float32_t arg)
-{
-	float32_t ret = 1;
-	float32_t nom = 1;
-
-	for (unsigned int i = 0; i < TAYLOR_DEGREE_32; i++) {
-		nom *= arg;
-		ret += nom / factorials[i];
-	}
-
-	return ret;
-}
-
-/** Exponential approximation by Taylor series (64-bit floating point)
- *
- * Compute the approximation of exponential by a Taylor
- * series (using the first TAYLOR_DEGREE terms).
- * The approximation is reasonably accurate for
- * arguments within the interval XXXX.
- *
- * @param arg Argument.
- *
- * @return Exponential value approximation.
- *
- */
-static float64_t taylor_exp_64(float64_t arg)
-{
-	float64_t ret = 1;
-	float64_t nom = 1;
-
-	for (unsigned int i = 0; i < TAYLOR_DEGREE_64; i++) {
-		nom *= arg;
-		ret += nom / factorials[i];
-	}
-
-	return ret;
-}
-
-/** Exponential (32-bit floating point)
- *
- * Compute exponential value.
- *
- * @param arg Exponential argument.
- *
- * @return Exponential value.
- *
- */
-float32_t float32_exp(float32_t arg)
-{
-	float32_t f;
-	float32_t i;
-	float32_u r;
-
-	/*
-	 * e^a = (2 ^ log2(e))^a = 2 ^ (log2(e) * a)
-	 * log2(e) * a = i + f | f in [0, 1]
-	 * e ^ a = 2 ^ (i + f) = 2^f * 2^i = (e ^ log(2))^f * 2^i =
-	 * e^(log(2)*f) * 2^i
-	 */
-
-	i = trunc_f32(arg * M_LOG2E);
-	f = arg * M_LOG2E - i;
-
-	r.val = taylor_exp_32(M_LN2 * f);
-	r.data.parts.exp += i;
-	return r.val;
-}
-
-/** Exponential (64-bit floating point)
- *
- * Compute exponential value.
- *
- * @param arg Exponential argument.
- *
- * @return Exponential value.
- *
- */
-float64_t float64_exp(float64_t arg)
-{
-	float64_t f;
-	float64_t i;
-	float64_u r;
-
-	/*
-	 * e^a = (2 ^ log2(e))^a = 2 ^ (log2(e) * a)
-	 * log2(e) * a = i + f | f in [0, 1]
-	 * e ^ a = 2 ^ (i + f) = 2^f * 2^i = (e ^ log(2))^f * 2^i =
-	 * e^(log(2)*f) * 2^i
-	 */
-
-	i = trunc_f64(arg * M_LOG2E);
-	f = arg * M_LOG2E - i;
-
-	r.val = taylor_exp_64(M_LN2 * f);
-	r.data.parts.exp += i;
-	return r.val;
-}
-
-/** @}
- */
Index: uspace/lib/math/generic/fabs.c
===================================================================
--- uspace/lib/math/generic/fabs.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ uspace/lib/math/generic/fabs.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2015 Jiri Svoboda
+ * Copyright (c) 2014 Martin Decky
  * All rights reserved.
  *
@@ -34,38 +34,13 @@
 
 #include <math.h>
-#include <fabs.h>
 
-/** Absolute value (32-bit floating point)
- *
- * Compute absolute value.
- *
- * @param arg Argument.
- *
- * @return Absolute value.
- *
- */
-float32_t float32_fabs(float32_t arg)
+float fabsf(float val)
 {
-	if (arg < 0.0)
-		return -arg;
-	else
-		return arg;
+	return copysignf(val, 1.0f);
 }
 
-/** Absolute value (64-bit floating point)
- *
- * Compute absolute value.
- *
- * @param arg Argument.
- *
- * @return Absolute value.
- *
- */
-float64_t float64_fabs(float64_t arg)
+double fabs(double val)
 {
-	if (arg < 0.0)
-		return -arg;
-	else
-		return arg;
+	return copysign(val, 1.0);
 }
 
Index: pace/lib/math/generic/floor.c
===================================================================
--- uspace/lib/math/generic/floor.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,82 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <floor.h>
-#include <math.h>
-#include <mathtypes.h>
-
-/** Ceiling (round towards negative infinity, 32-bit floating point)
- *
- * @param val Floating point number.
- *
- * @return Number rounded towards negative infinity.
- */
-
-float32_t float32_floor(float32_t val)
-{
-	float32_t t;
-	float32_u v;
-
-	v.val = val;
-	t = trunc_f32(val);
-
-	if (v.data.parts.sign == 0 || val == t)
-		return t;
-	else
-		return t - 1.0;
-}
-
-/** Ceiling (round towards negative infinity, 64-bit floating point)
- *
- * @param val Floating point number.
- *
- * @return Number rounded towards negative infinity.
- */
-
-float64_t float64_floor(float64_t val)
-{
-	float64_t t;
-	float64_u v;
-
-	v.val = val;
-	t = trunc_f64(val);
-
-	if (v.data.parts.sign == 0 || val == t)
-		return t;
-	else
-		return t - 1.0;
-}
-
-/** @}
- */
Index: uspace/lib/math/generic/fmod.c
===================================================================
--- uspace/lib/math/generic/fmod.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ uspace/lib/math/generic/fmod.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -33,5 +33,4 @@
  */
 
-#include <fmod.h>
 #include <math.h>
 
@@ -52,9 +51,9 @@
  *
  */
-float32_t float32_fmod(float32_t dividend, float32_t divisor)
+float fmodf(float dividend, float divisor)
 {
 	// FIXME: replace with exact arithmetics
 
-	float32_t quotient = trunc_f32(dividend / divisor);
+	float quotient = truncf(dividend / divisor);
 
 	return (dividend - quotient * divisor);
@@ -77,9 +76,9 @@
  *
  */
-float64_t float64_fmod(float64_t dividend, float64_t divisor)
+double fmod(double dividend, double divisor)
 {
 	// FIXME: replace with exact arithmetics
 
-	float64_t quotient = trunc_f64(dividend / divisor);
+	double quotient = trunc(dividend / divisor);
 
 	return (dividend - quotient * divisor);
Index: pace/lib/math/generic/frexp.c
===================================================================
--- uspace/lib/math/generic/frexp.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,81 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <frexp.h>
-#include <math.h>
-
-/** Break single precision number into fraction and exponent
- *
- * Return f and *exp such that x = f * 2^(*exp) and f is in [0.5,1)
- *
- * @param x Number
- * @param exp Place to store exponent
- *
- * @return f
- *
- */
-float32_t float32_frexp(float32_t x, int *exp)
-{
-	float32_u u;
-
-	u.val = x;
-	*exp = u.data.parts.exp - FLOAT32_BIAS;
-	u.data.parts.exp = FLOAT32_BIAS;
-
-	return u.val;
-}
-
-/** Break double precision number into fraction and exponent
- *
- * Return f and *exp such that x = f * 2^(*exp) and f is in [0.5,1)
- *
- * @param x Number
- * @param exp Place to store exponent
- *
- * @return f
- *
- */
-float64_t float64_frexp(float64_t x, int *exp)
-{
-	float64_u u;
-
-	u.val = x;
-	*exp = u.data.parts.exp - FLOAT64_BIAS;
-	u.data.parts.exp = FLOAT64_BIAS;
-
-	return u.val;
-}
-
-/** @}
- */
Index: pace/lib/math/generic/ldexp.c
===================================================================
--- uspace/lib/math/generic/ldexp.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,108 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <errno.h>
-#include <ldexp.h>
-#include <math.h>
-
-/** Single precision multiply by power of two
- *
- * Compute x * 2^exp.
- *
- * @param x Number
- * @param exp Exponent
- *
- * @return x * 2^exp
- *
- */
-float32_t float32_ldexp(float32_t x, int exp)
-{
-	float32_u u;
-	int e;
-
-	u.val = x;
-	e = u.data.parts.exp + exp;
-
-	if (e < 0) {
-		/* XXX Can we return denormalized numbers? */
-		return 0.0;
-	} else if (e > FLOAT32_MAX_EXPONENT) {
-		errno = ERANGE;
-		if (e < 0)
-			return -FLOAT32_INF;
-		else
-			return FLOAT32_INF;
-	} else {
-		/* Adjust exponent */
-		u.data.parts.exp = e;
-		return u.val;
-	}
-}
-
-/** Double precision multiply by power of two
- *
- * Compute x * 2^exp.
- *
- * @param x Number
- * @param y Exponent
- *
- * @return x * 2^exp
- *
- */
-float64_t float64_ldexp(float64_t x, int exp)
-{
-	float64_u u;
-	int e;
-
-	u.val = x;
-	e = u.data.parts.exp + exp;
-
-	if (e < 0) {
-		/* XXX Can we return denormalized numbers? */
-		return 0.0;
-	} else if (e > FLOAT64_MAX_EXPONENT) {
-		errno = ERANGE;
-		if (e < 0)
-			return -FLOAT64_INF;
-		else
-			return FLOAT64_INF;
-	} else {
-		/* Adjust exponent */
-		u.data.parts.exp = e;
-		return u.val;
-	}
-}
-
-/** @}
- */
Index: pace/lib/math/generic/log.c
===================================================================
--- uspace/lib/math/generic/log.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,160 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * Copyright (c) 2014 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <log.h>
-#include <math.h>
-
-#define TAYLOR_DEGREE_32  31
-#define TAYLOR_DEGREE_64  63
-
-/** log(1 - arg) approximation by Taylor series (32-bit floating point)
- *
- * Compute the approximation of log(1 - arg) by a Taylor
- * series (using the first TAYLOR_DEGREE terms).
- * arg must be within [-1, 1].
- *
- * @param arg Argument.
- *
- * @return log(1 - arg)
- *
- */
-static float32_t taylor_log_32(float32_t arg)
-{
-	float32_t ret = 0;
-	float32_t num = 1;
-
-	for (unsigned int i = 1; i <= TAYLOR_DEGREE_32; i++) {
-		num *= arg;
-
-		if ((i % 2) == 0)
-			ret += num / i;
-		else
-			ret -= num / i;
-	}
-
-	return ret;
-}
-
-/** log(1 - arg) approximation by Taylor series (64-bit floating point)
- *
- * Compute the approximation of log(1 - arg) by a Taylor
- * series (using the first TAYLOR_DEGREE terms).
- * arg must be within [-1, 1].
- *
- * @param arg Argument.
- *
- * @return log(1 - arg)
- *
- */
-static float64_t taylor_log_64(float64_t arg)
-{
-	float64_t ret = 0;
-	float64_t num = 1;
-
-	for (unsigned int i = 1; i <= TAYLOR_DEGREE_64; i++) {
-		num *= arg;
-
-		if ((i % 2) == 0)
-			ret += num / i;
-		else
-			ret -= num / i;
-	}
-
-	return ret;
-}
-
-/** Natural logarithm (32-bit floating point)
- *
- * @param arg Argument.
- *
- * @return Logarithm.
- *
- */
-float32_t float32_log(float32_t arg)
-{
-	float32_u m;
-	int e;
-
-	m.val = arg;
-	/*
-	 * Factor arg into m * 2^e where m has exponent -1,
-	 * which means it is in [1.0000..e-1, 1.1111..e-1] = [0.5, 1.0]
-	 * so the argument to taylor_log_32 will be in [0, 0.5]
-	 * ensuring that we get at least one extra bit of precision
-	 * in each iteration.
-	 */
-	e = m.data.parts.exp - (FLOAT32_BIAS - 1);
-	m.data.parts.exp = FLOAT32_BIAS - 1;
-
-	/*
-	 * arg = m * 2^e ; log(arg) = log(m) + log(2^e) =
-	 * log(m) + log2(2^e) / log2(e) = log(m) + e / log2(e)
-	 */
-	return -taylor_log_32(m.val - 1.0) + e / M_LOG2E;
-}
-
-/** Natural logarithm (64-bit floating point)
- *
- * @param arg Argument.
- *
- * @return Logarithm.
- *
- */
-float64_t float64_log(float64_t arg)
-{
-	float64_u m;
-	int e;
-
-	m.val = arg;
-
-	/*
-	 * Factor arg into m * 2^e where m has exponent -1,
-	 * which means it is in [1.0000..e-1, 1.1111..e-1] = [0.5, 1.0]
-	 * so the argument to taylor_log_32 will be in [0, 0.5]
-	 * ensuring that we get at least one extra bit of precision
-	 * in each iteration.
-	 */
-	e = m.data.parts.exp - (FLOAT64_BIAS - 1);
-	m.data.parts.exp = FLOAT64_BIAS - 1;
-
-	/*
-	 * arg = m * 2^e ; log(arg) = log(m) + log(2^e) =
-	 * log(m) + log2(2^e) / log2(e) = log(m) + e / log2(e)
-	 */
-	return -taylor_log_64(m.val - 1.0) + e / M_LOG2E;
-}
-
-/** @}
- */
Index: pace/lib/math/generic/log10.c
===================================================================
--- uspace/lib/math/generic/log10.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,68 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <log10.h>
-#include <math.h>
-
-/** Decimal logarithm (32-bit floating point)
- *
- * Compute logarithm value.
- *
- * @param arg Logarithm argument.
- *
- * @return Logarithm value.
- *
- */
-float32_t float32_log10(float32_t arg)
-{
-	return log_f32(arg) / M_LN10;
-}
-
-/** Decimal logarithm (64-bit floating point)
- *
- * Compute logarithm value.
- *
- * @param arg Logarithm argument.
- *
- * @return Logarithm value.
- *
- */
-float64_t float64_log10(float64_t arg)
-{
-	return log_f64(arg) / M_LN10;
-}
-
-
-/** @}
- */
Index: pace/lib/math/generic/log2.c
===================================================================
--- uspace/lib/math/generic/log2.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,68 +1,0 @@
-/*
- * Copyright (c) 2018 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <log2.h>
-#include <math.h>
-
-/** Base-2 logarithm (32-bit floating point)
- *
- * Compute base-2 logarithm value.
- *
- * @param arg Logarithm argument.
- *
- * @return Logarithm value.
- *
- */
-float32_t float32_log2(float32_t arg)
-{
-	return log_f32(arg) / M_LN2;
-}
-
-/** Base-2 logarithm (64-bit floating point)
- *
- * Compute base-2 logarithm value.
- *
- * @param arg Logarithm argument.
- *
- * @return Logarithm value.
- *
- */
-float64_t float64_log2(float64_t arg)
-{
-	return log_f64(arg) / M_LN2;
-}
-
-
-/** @}
- */
Index: pace/lib/math/generic/modf.c
===================================================================
--- uspace/lib/math/generic/modf.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,83 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <math.h>
-#include <modf.h>
-
-/** Remainder function (32-bit floating point)
- *
- * Calculate the modulo of dividend by divisor.
- *
- * This is a very basic implementation that uses
- * division and multiplication (instead of exact
- * arithmetics). Thus the result might be very
- * imprecise (depending on the magnitude of the
- * arguments).
- *
- * @param dividend Dividend.
- * @param divisor  Divisor.
- *
- * @return Modulo.
- *
- */
-float32_t float32_modf(float32_t value, float32_t *iptr)
-{
-	*iptr = trunc_f32(value);
-	return value - *iptr;
-}
-
-/** Remainder function (64-bit floating point)
- *
- * Calculate the modulo of dividend by divisor.
- *
- * This is a very basic implementation that uses
- * division and multiplication (instead of exact
- * arithmetics). Thus the result might be very
- * imprecise (depending on the magnitude of the
- * arguments).
- *
- * @param dividend Dividend.
- * @param divisor  Divisor.
- *
- * @return Modulo.
- *
- */
-float64_t float64_modf(float64_t value, float64_t *iptr)
-{
-	*iptr = trunc_f64(value);
-	return value - *iptr;
-}
-
-/** @}
- */
Index: uspace/lib/math/generic/nearbyint.c
===================================================================
--- uspace/lib/math/generic/nearbyint.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
+++ uspace/lib/math/generic/nearbyint.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2018 CZ.NIC, z.s.p.o.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libmath
+ * @{
+ */
+/** @file
+ */
+
+#include <assert.h>
+#include <math.h>
+#include <fenv.h>
+#include <float.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+static float _roundf_even(float val)
+{
+	assert(!signbit(val));
+
+	/* Get some special cases out of the way first. */
+
+	if (islessequal(val, 0.5f))
+		return 0.0f;
+
+	if (isless(val, 1.5f))
+		return 1.0f;
+
+	if (islessequal(val, 2.5f))
+		return 2.0f;
+
+	const int exp_bias = FLT_MAX_EXP - 1;
+	const int mant_bits = FLT_MANT_DIG - 1;
+	const uint32_t mant_mask = (UINT32_C(1) << mant_bits) - 1;
+
+	union {
+		float f;
+		uint32_t i;
+	} u = { .f = val };
+
+	int exp = (u.i >> mant_bits) - exp_bias;
+	assert(exp > 0);
+
+	/* Mantissa has no fractional places. */
+	if (exp >= mant_bits)
+		return val;
+
+	/* Check whether we are rounding up or down. */
+	uint32_t first = (UINT32_C(1) << (mant_bits - exp));
+	uint32_t midpoint = first >> 1;
+	uint32_t frac = u.i & (mant_mask >> exp);
+
+	bool up;
+	if (frac == midpoint) {
+		up = (u.i & first);
+	} else {
+		up = (frac > midpoint);
+	}
+
+	u.i &= ~(mant_mask >> exp);
+	if (up) {
+		u.i += first;
+	}
+	return copysignf(u.f, val);
+}
+
+static float _round_even(float val)
+{
+	assert(!signbit(val));
+
+	/* Get some special cases out of the way first. */
+
+	if (islessequal(val, 0.5))
+		return 0.0;
+
+	if (isless(val, 1.5))
+		return 1.0;
+
+	if (islessequal(val, 2.5))
+		return 2.0;
+
+	const int exp_bias = DBL_MAX_EXP - 1;
+	const int mant_bits = DBL_MANT_DIG - 1;
+	const uint64_t mant_mask = (UINT64_C(1) << mant_bits) - 1;
+
+	union {
+		double f;
+		uint64_t i;
+	} u = { .f = val };
+
+	int exp = (u.i >> mant_bits) - exp_bias;
+	assert(exp > 0);
+
+	/* Mantissa has no fractional places. */
+	if (exp >= mant_bits)
+		return val;
+
+	/* Check whether we are rounding up or down. */
+	uint64_t first = (UINT64_C(1) << (mant_bits - exp));
+	uint64_t midpoint = first >> 1;
+	uint64_t frac = u.i & (mant_mask >> exp);
+
+	bool up;
+	if (frac == midpoint) {
+		up = (u.i & first);
+	} else {
+		up = (frac > midpoint);
+	}
+
+	u.i &= ~(mant_mask >> exp);
+	if (up) {
+		u.i += first;
+	}
+	return copysignf(u.f, val);
+}
+
+/**
+ * Rounds its argument to the nearest integer value in floating-point format,
+ * using the current rounding direction and without raising the inexact
+ * floating-point exception.
+ */
+float nearbyintf(float val)
+{
+	switch (fegetround()) {
+	case FE_DOWNWARD:
+		return floorf(val);
+	case FE_UPWARD:
+		return ceilf(val);
+	case FE_TOWARDZERO:
+		return truncf(val);
+	case FE_TONEAREST:
+		return copysignf(_roundf_even(fabsf(val)), val);
+	}
+
+	assert(false);
+}
+
+/**
+ * Rounds its argument to the nearest integer value in floating-point format,
+ * using the current rounding direction and without raising the inexact
+ * floating-point exception.
+ */
+double nearbyint(double val)
+{
+	switch (fegetround()) {
+	case FE_DOWNWARD:
+		return floor(val);
+	case FE_UPWARD:
+		return ceil(val);
+	case FE_TOWARDZERO:
+		return trunc(val);
+	case FE_TONEAREST:
+		return copysign(_round_even(fabs(val)), val);
+	}
+
+	assert(false);
+}
+
+/** @}
+ */
Index: pace/lib/math/generic/pow.c
===================================================================
--- uspace/lib/math/generic/pow.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * Copyright (c) 2014 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <math.h>
-#include <pow.h>
-
-/** Single precision power
- *
- * Compute power value.
- *
- * @param x Base
- * @param y Exponent
- *
- * @return Cosine value.
- *
- */
-float32_t float32_pow(float32_t x, float32_t y)
-{
-	/* x^y = (e ^ log(x))^y = e ^ (log(x) * y) */
-	return exp_f32(log_f32(x) * y);
-}
-
-/** Double precision power
- *
- * Compute power value.
- *
- * @param x Base
- * @param y Exponent
- *
- * @return Cosine value.
- *
- */
-float64_t float64_pow(float64_t x, float64_t y)
-{
-	/* x^y = (e ^ log(x))^y = e ^ (log(x) * y) */
-	return exp_f64(log_f64(x) * y);
-}
-
-/** @}
- */
Index: uspace/lib/math/generic/round.c
===================================================================
--- uspace/lib/math/generic/round.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
+++ uspace/lib/math/generic/round.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2015 Jiri Svoboda
+ * Copyright (c) 2014 Martin Decky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libmath
+ * @{
+ */
+/** @file
+ */
+
+#include <math.h>
+#include <float.h>
+#include <stdint.h>
+
+/**
+ * Rounds its argument to the nearest integer value in floating-point format,
+ * rounding halfway cases away from zero, regardless of the current rounding
+ * direction.
+ */
+float roundf(float val)
+{
+	const int exp_bias = FLT_MAX_EXP - 1;
+	const int mant_bits = FLT_MANT_DIG - 1;
+
+	union {
+		float f;
+		uint32_t i;
+	} u = { .f = fabsf(val) };
+
+	int exp = (u.i >> mant_bits) - exp_bias;
+
+	/* If value is less than 0.5, return zero with appropriate sign. */
+	if (exp < -1)
+		return copysignf(0.0f, val);
+
+	/* If exponent is exactly mant_bits, adding 0.5 could change the result. */
+	if (exp >= mant_bits)
+		return val;
+
+	/* Use trunc with adjusted value to do the rounding. */
+	return copysignf(truncf(u.f + 0.5), val);
+}
+
+/**
+ * Rounds its argument to the nearest integer value in floating-point format,
+ * rounding halfway cases away from zero, regardless of the current rounding
+ * direction.
+ */
+double round(double val)
+{
+	const int exp_bias = DBL_MAX_EXP - 1;
+	const int mant_bits = DBL_MANT_DIG - 1;
+
+	union {
+		double f;
+		uint64_t i;
+	} u = { .f = fabs(val) };
+
+	int exp = ((int)(u.i >> mant_bits)) - exp_bias;
+
+	/* If value is less than 0.5, return zero with appropriate sign. */
+	if (exp < -1)
+		return copysign(0.0, val);
+
+	/* If exponent is exactly mant_bits, adding 0.5 could change the result. */
+	if (exp >= mant_bits)
+		return val;
+
+	/* Use trunc with adjusted value to do the rounding. */
+	return copysign(trunc(u.f + 0.5), val);
+}
+
+/** @}
+ */
Index: pace/lib/math/generic/sinh.c
===================================================================
--- uspace/lib/math/generic/sinh.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <math.h>
-#include <sinh.h>
-
-/** Hyperbolic sine (32-bit floating point)
- *
- * Compute hyperbolic sine value.
- *
- * @param arg Hyperbolic angle
- *
- * @return Hyperbolic sine.
- *
- */
-float32_t float32_sinh(float32_t arg)
-{
-	return (exp_f32(arg) - exp_f32(-arg)) / 2.0;
-}
-
-/** Hyperbolic sine (64-bit floating point)
- *
- * Compute hyperbolic sine value.
- *
- * @param arg Hyperbolic angle
- *
- * @return Hyperbolic sine.
- *
- */
-float64_t float64_sinh(float64_t arg)
-{
-	return (exp_f64(arg) - exp_f64(-arg)) / 2.0;
-}
-
-/** @}
- */
Index: pace/lib/math/generic/sqrt.c
===================================================================
--- uspace/lib/math/generic/sqrt.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <math.h>
-#include <sqrt.h>
-
-/** Single precision square root
- *
- * Compute square root.
- *
- * @param val Value
- *
- * @return Square root.
- *
- */
-float32_t float32_sqrt(float32_t val)
-{
-	return pow_f32(val, 0.5);
-}
-
-/** Double precision square root
- *
- * Compute squre root.
- *
- * @param val Value
- *
- * @return Square root.
- *
- */
-float64_t float64_sqrt(float64_t val)
-{
-	return pow_f64(val, 0.5);
-}
-
-/** @}
- */
Index: pace/lib/math/generic/tan.c
===================================================================
--- uspace/lib/math/generic/tan.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,68 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <math.h>
-#include <tan.h>
-
-/** Tangent (32-bit floating point)
- *
- * Compute tangent value.
- *
- * @param arg Tangent argument.
- *
- * @return Tangent value.
- *
- */
-float32_t float32_tan(float32_t arg)
-{
-	return sin_f32(arg) / cos_f32(arg);
-}
-
-/** Sine (64-bit floating point)
- *
- * Compute sine value.
- *
- * @param arg Sine argument.
- *
- * @return Sine value.
- *
- */
-float64_t float64_tan(float64_t arg)
-{
-	return sin_f64(arg) / cos_f64(arg);
-}
-
-
-/** @}
- */
Index: pace/lib/math/generic/tanh.c
===================================================================
--- uspace/lib/math/generic/tanh.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,83 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#include <math.h>
-#include <tanh.h>
-
-/** Hyperbolic tangent (32-bit floating point)
- *
- * Compute hyperbolic tangent value.
- *
- * @param arg Hyperbolic angle
- *
- * @return Hyperbolic tangent.
- *
- */
-float32_t float32_tanh(float32_t arg)
-{
-	float32_t em2x;
-
-	if (arg > 9.0)
-		return 1.0;
-	if (arg < -9.0)
-		return -1.0;
-
-	em2x = exp_f32(-2.0 * arg);
-	return (1.0 - em2x) / (1.0 + em2x);
-}
-
-/** Hyperbolic tangent (64-bit floating point)
- *
- * Compute hyperbolic tangent value.
- *
- * @param arg Hyperbolic angle
- *
- * @return Hyperbolic tangent.
- *
- */
-float64_t float64_tanh(float64_t arg)
-{
-	float64_t em2x;
-
-	if (arg > 19.0)
-		return 1.0;
-	if (arg < -19.0)
-		return -1.0;
-
-	em2x = exp_f64(-2.0 * arg);
-	return (1.0 - em2x) / (1.0 + em2x);
-}
-
-/** @}
- */
Index: uspace/lib/math/generic/trig.c
===================================================================
--- uspace/lib/math/generic/trig.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ uspace/lib/math/generic/trig.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -35,5 +35,4 @@
 
 #include <math.h>
-#include <trig.h>
 
 #define TAYLOR_DEGREE_32 13
@@ -41,5 +40,5 @@
 
 /** Precomputed values for factorial (starting from 1!) */
-static float64_t factorials[TAYLOR_DEGREE_64] = {
+static double factorials[TAYLOR_DEGREE_64] = {
 	1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800,
 	479001600, 6227020800.0L, 87178291200.0L, 1307674368000.0L,
@@ -60,8 +59,8 @@
  *
  */
-static float32_t taylor_sin_32(float32_t arg)
-{
-	float32_t ret = 0;
-	float32_t nom = 1;
+static float taylor_sin_32(float arg)
+{
+	float ret = 0;
+	float nom = 1;
 
 	for (unsigned int i = 0; i < TAYLOR_DEGREE_32; i++) {
@@ -89,8 +88,8 @@
  *
  */
-static float64_t taylor_sin_64(float64_t arg)
-{
-	float64_t ret = 0;
-	float64_t nom = 1;
+static double taylor_sin_64(double arg)
+{
+	double ret = 0;
+	double nom = 1;
 
 	for (unsigned int i = 0; i < TAYLOR_DEGREE_64; i++) {
@@ -118,8 +117,8 @@
  *
  */
-static float32_t taylor_cos_32(float32_t arg)
-{
-	float32_t ret = 1;
-	float32_t nom = 1;
+static float taylor_cos_32(float arg)
+{
+	float ret = 1;
+	float nom = 1;
 
 	for (unsigned int i = 0; i < TAYLOR_DEGREE_32; i++) {
@@ -147,8 +146,8 @@
  *
  */
-static float64_t taylor_cos_64(float64_t arg)
-{
-	float64_t ret = 1;
-	float64_t nom = 1;
+static double taylor_cos_64(double arg)
+{
+	double ret = 1;
+	double nom = 1;
 
 	for (unsigned int i = 0; i < TAYLOR_DEGREE_64; i++) {
@@ -176,5 +175,5 @@
  *
  */
-static float32_t base_sin_32(float32_t arg)
+static float base_sin_32(float arg)
 {
 	unsigned int period = arg / (M_PI / 4);
@@ -209,5 +208,5 @@
  *
  */
-static float64_t base_sin_64(float64_t arg)
+static double base_sin_64(double arg)
 {
 	unsigned int period = arg / (M_PI / 4);
@@ -242,5 +241,5 @@
  *
  */
-static float32_t base_cos_32(float32_t arg)
+static float base_cos_32(float arg)
 {
 	unsigned int period = arg / (M_PI / 4);
@@ -275,5 +274,5 @@
  *
  */
-static float64_t base_cos_64(float64_t arg)
+static double base_cos_64(double arg)
 {
 	unsigned int period = arg / (M_PI / 4);
@@ -305,7 +304,7 @@
  *
  */
-float32_t float32_sin(float32_t arg)
-{
-	float32_t base_arg = fmod_f32(arg, 2 * M_PI);
+float sinf(float arg)
+{
+	float base_arg = fmodf(arg, 2 * M_PI);
 
 	if (base_arg < 0)
@@ -324,7 +323,7 @@
  *
  */
-float64_t float64_sin(float64_t arg)
-{
-	float64_t base_arg = fmod_f64(arg, 2 * M_PI);
+double sin(double arg)
+{
+	double base_arg = fmod(arg, 2 * M_PI);
 
 	if (base_arg < 0)
@@ -343,7 +342,7 @@
  *
  */
-float32_t float32_cos(float32_t arg)
-{
-	float32_t base_arg = fmod_f32(arg, 2 * M_PI);
+float cosf(float arg)
+{
+	float base_arg = fmodf(arg, 2 * M_PI);
 
 	if (base_arg < 0)
@@ -362,7 +361,7 @@
  *
  */
-float64_t float64_cos(float64_t arg)
-{
-	float64_t base_arg = fmod_f64(arg, 2 * M_PI);
+double cos(double arg)
+{
+	double base_arg = fmod(arg, 2 * M_PI);
 
 	if (base_arg < 0)
Index: uspace/lib/math/generic/trunc.c
===================================================================
--- uspace/lib/math/generic/trunc.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ uspace/lib/math/generic/trunc.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -34,6 +34,7 @@
  */
 
-#include <mathtypes.h>
-#include <trunc.h>
+#include <math.h>
+#include <float.h>
+#include <stdint.h>
 
 /** Truncate fractional part (round towards zero)
@@ -52,29 +53,27 @@
  *
  */
-float32_t float32_trunc(float32_t val)
+float truncf(float val)
 {
-	float32_u v;
-	int32_t exp;
+	const int exp_bias = FLT_MAX_EXP - 1;
+	const int mant_bits = FLT_MANT_DIG - 1;
+	const uint32_t mant_mask = (UINT32_C(1) << mant_bits) - 1;
 
-	v.val = val;
-	exp = v.data.parts.exp - FLOAT32_BIAS;
+	union {
+		float f;
+		uint32_t i;
+	} u = { .f = fabsf(val) };
 
-	if (exp < 0) {
-		/* -1 < val < 1 => result is +0 or -0 */
-		v.data.parts.exp = 0;
-		v.data.parts.fraction = 0;
-	} else if (exp >= FLOAT32_FRACTION_SIZE) {
-		if (exp == 1024) {
-			/* val is +inf, -inf or NaN => trigger an exception */
-			// FIXME TODO
-		}
+	int exp = (u.i >> mant_bits) - exp_bias;
 
-		/* All bits in val are relevant for the result */
-	} else {
-		/* Truncate irrelevant fraction bits */
-		v.data.parts.fraction &= ~(UINT32_C(0x007fffff) >> exp);
-	}
+	/* If value is less than one, return zero with appropriate sign. */
+	if (exp < 0)
+		return copysignf(0.0f, val);
 
-	return v.val;
+	if (exp >= mant_bits)
+		return val;
+
+	/* Truncate irrelevant fraction bits */
+	u.i &= ~(mant_mask >> exp);
+	return copysignf(u.f, val);
 }
 
@@ -94,29 +93,27 @@
  *
  */
-float64_t float64_trunc(float64_t val)
+double trunc(double val)
 {
-	float64_u v;
-	int32_t exp;
+	const int exp_bias = DBL_MAX_EXP - 1;
+	const int mant_bits = DBL_MANT_DIG - 1;
+	const uint64_t mant_mask = (UINT64_C(1) << mant_bits) - 1;
 
-	v.val = val;
-	exp = v.data.parts.exp - FLOAT64_BIAS;
+	union {
+		double f;
+		uint64_t i;
+	} u = { .f = fabs(val) };
 
-	if (exp < 0) {
-		/* -1 < val < 1 => result is +0 or -0 */
-		v.data.parts.exp = 0;
-		v.data.parts.fraction = 0;
-	} else if (exp >= FLOAT64_FRACTION_SIZE) {
-		if (exp == 1024) {
-			/* val is +inf, -inf or NaN => trigger an exception */
-			// FIXME TODO
-		}
+	int exp = ((int)(u.i >> mant_bits)) - exp_bias;
 
-		/* All bits in val are relevant for the result */
-	} else {
-		/* Truncate irrelevant fraction bits */
-		v.data.parts.fraction &= ~(UINT64_C(0x000fffffffffffff) >> exp);
-	}
+	/* If value is less than one, return zero with appropriate sign. */
+	if (exp < 0)
+		return copysign(0.0, val);
 
-	return v.val;
+	if (exp >= mant_bits)
+		return val;
+
+	/* Truncate irrelevant fraction bits */
+	u.i &= ~(mant_mask >> exp);
+	return copysign(u.f, val);
 }
 
Index: pace/lib/math/include/acos.h
===================================================================
--- uspace/lib/math/include/acos.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_ACOS_H_
-#define LIBMATH_ACOS_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_acos(float32_t);
-extern float64_t float64_acos(float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/asin.h
===================================================================
--- uspace/lib/math/include/asin.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_ASIN_H_
-#define LIBMATH_ASIN_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_asin(float32_t);
-extern float64_t float64_asin(float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/atan.h
===================================================================
--- uspace/lib/math/include/atan.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_ATAN_H_
-#define LIBMATH_ATAN_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_atan(float32_t);
-extern float64_t float64_atan(float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/atan2.h
===================================================================
--- uspace/lib/math/include/atan2.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_ATAN2_H_
-#define LIBMATH_ATAN2_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_atan2(float32_t, float32_t);
-extern float64_t float64_atan2(float64_t, float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/ceil.h
===================================================================
--- uspace/lib/math/include/ceil.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_CEIL_H_
-#define LIBMATH_CEIL_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_ceil(float32_t);
-extern float64_t float64_ceil(float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/cosh.h
===================================================================
--- uspace/lib/math/include/cosh.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_COSH_H_
-#define LIBMATH_COSH_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_cosh(float32_t);
-extern float64_t float64_cosh(float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/exp.h
===================================================================
--- uspace/lib/math/include/exp.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_EXP_H_
-#define LIBMATH_EXP_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_exp(float32_t);
-extern float64_t float64_exp(float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/fabs.h
===================================================================
--- uspace/lib/math/include/fabs.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_FABS_H_
-#define LIBMATH_FABS_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_fabs(float32_t);
-extern float64_t float64_fabs(float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/floor.h
===================================================================
--- uspace/lib/math/include/floor.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_FLOOR_H_
-#define LIBMATH_FLOOR_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_floor(float32_t);
-extern float64_t float64_floor(float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/fmod.h
===================================================================
--- uspace/lib/math/include/fmod.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2014 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_FMOD_H_
-#define LIBMATH_FMOD_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_fmod(float32_t, float32_t);
-extern float64_t float64_fmod(float64_t, float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/frexp.h
===================================================================
--- uspace/lib/math/include/frexp.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_FREXP_H_
-#define LIBMATH_FREXP_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_frexp(float32_t, int *);
-extern float64_t float64_frexp(float64_t, int *);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/ldexp.h
===================================================================
--- uspace/lib/math/include/ldexp.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_LDEXP_H_
-#define LIBMATH_LDEXP_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_ldexp(float32_t, int);
-extern float64_t float64_ldexp(float64_t, int);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/log.h
===================================================================
--- uspace/lib/math/include/log.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_LOG_H_
-#define LIBMATH_LOG_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_log(float32_t);
-extern float64_t float64_log(float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/log10.h
===================================================================
--- uspace/lib/math/include/log10.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_LOG10_H_
-#define LIBMATH_LOG10_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_log10(float32_t);
-extern float64_t float64_log10(float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/log2.h
===================================================================
--- uspace/lib/math/include/log2.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2018 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_LOG2_H_
-#define LIBMATH_LOG2_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_log2(float32_t);
-extern float64_t float64_log2(float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/math.h
===================================================================
--- uspace/lib/math/include/math.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- * Copyright (c) 2011 Petr Koupy
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file Mathematical operations.
- */
-
-#ifndef LIBMATH_MATH_H_
-#define LIBMATH_MATH_H_
-
-#include <libarch/math.h>
-
-#define M_LN10 2.30258509299404568402
-#define M_LN2 0.69314718055994530942
-#define M_LOG2E 1.4426950408889634074
-#define M_PI 3.14159265358979323846
-#define M_PI_2 1.57079632679489661923
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/mathtypes.h
===================================================================
--- uspace/lib/math/include/mathtypes.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,264 +1,0 @@
-/*
- * Copyright (c) 2005 Josef Cejka
- * Copyright (c) 2011 Petr Koupy
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file Floating point types and constants.
- */
-
-#ifndef LIBMATH_MATHTYPES_H_
-#define LIBMATH_MATHTYPES_H_
-
-#include <byteorder.h>
-#include <stdint.h>
-
-/*
- * For recognizing NaNs or infinity use specialized comparison
- * functions, comparing with these constants is not sufficient.
- */
-
-#define FLOAT32_NAN     UINT32_C(0x7fc00001)
-#define FLOAT32_SIGNAN  UINT32_C(0x7f800001)
-#define FLOAT32_INF     UINT32_C(0x7f800000)
-
-#define FLOAT64_NAN     UINT64_C(0x7ff8000000000001)
-#define FLOAT64_SIGNAN  UINT64_C(0x7ff0000000000001)
-#define FLOAT64_INF     UINT64_C(0x7ff0000000000000)
-
-#define FLOAT96_NAN_HI     UINT64_C(0x7fff80000000)
-#define FLOAT96_NAN_LO     UINT32_C(0x00010000)
-#define FLOAT96_SIGNAN_HI  UINT64_C(0x7fff00000000)
-#define FLOAT96_SIGNAN_LO  UINT32_C(0x00010000)
-
-#define FLOAT128_NAN_HI     UINT64_C(0x7fff800000000000)
-#define FLOAT128_NAN_LO     UINT64_C(0x0000000000000001)
-#define FLOAT128_SIGNAN_HI  UINT64_C(0x7fff000000000000)
-#define FLOAT128_SIGNAN_LO  UINT64_C(0x0000000000000001)
-#define FLOAT128_INF_HI     UINT64_C(0x7fff000000000000)
-#define FLOAT128_INF_LO     UINT64_C(0x0000000000000000)
-
-#define FLOAT32_FRACTION_SIZE   23
-#define FLOAT64_FRACTION_SIZE   52
-#define FLOAT96_FRACTION_SIZE   64
-#define FLOAT128_FRACTION_SIZE  112
-#define FLOAT128_FRAC_HI_SIZE   48
-#define FLOAT128_FRAC_LO_SIZE   64
-
-#define FLOAT32_HIDDEN_BIT_MASK      UINT32_C(0x800000)
-#define FLOAT64_HIDDEN_BIT_MASK      UINT64_C(0x10000000000000)
-#define FLOAT128_HIDDEN_BIT_MASK_HI  UINT64_C(0x1000000000000)
-#define FLOAT128_HIDDEN_BIT_MASK_LO  UINT64_C(0x0000000000000000)
-
-#define FLOAT32_MAX_EXPONENT   0xff
-#define FLOAT64_MAX_EXPONENT   0x7ff
-#define FLOAT96_MAX_EXPONENT   0x7fff
-#define FLOAT128_MAX_EXPONENT  0x7fff
-
-#define FLOAT32_BIAS   0x7f
-#define FLOAT64_BIAS   0x3ff
-#define FLOAT96_BIAS   0x3fff
-#define FLOAT128_BIAS  0x3fff
-
-#if defined(__BE__)
-
-typedef union {
-	uint32_t bin;
-
-	struct {
-		uint32_t sign : 1;
-		uint32_t exp : 8;
-		uint32_t fraction : 23;
-	} __attribute__((packed)) parts;
-} float32;
-
-typedef union {
-	uint64_t bin;
-
-	struct {
-		uint64_t sign : 1;
-		uint64_t exp : 11;
-		uint64_t fraction : 52;
-	} __attribute__((packed)) parts;
-} float64;
-
-typedef union {
-	struct {
-		uint64_t hi;
-		uint32_t lo;
-	} __attribute__((packed)) bin;
-
-	struct {
-		uint64_t padding : 16;
-		uint64_t sign : 1;
-		uint64_t exp : 15;
-		uint64_t fraction : 64;
-	} __attribute__((packed)) parts;
-} float96;
-
-typedef union {
-	struct {
-		uint64_t hi;
-		uint64_t lo;
-	} __attribute__((packed)) bin;
-
-	struct {
-		uint64_t sign : 1;
-		uint64_t exp : 15;
-		uint64_t frac_hi : 48;
-		uint64_t frac_lo : 64;
-	} __attribute__((packed)) parts;
-} float128;
-
-#elif defined(__LE__)
-
-typedef union {
-	uint32_t bin;
-
-	struct {
-		uint32_t fraction : 23;
-		uint32_t exp : 8;
-		uint32_t sign : 1;
-	} __attribute__((packed)) parts;
-} float32;
-
-typedef union {
-	uint64_t bin;
-
-	struct {
-		uint64_t fraction : 52;
-		uint64_t exp : 11;
-		uint64_t sign : 1;
-	} __attribute__((packed)) parts;
-} float64;
-
-typedef union {
-	struct {
-		uint32_t lo;
-		uint64_t hi;
-	} __attribute__((packed)) bin;
-
-	struct {
-		uint64_t fraction : 64;
-		uint64_t exp : 15;
-		uint64_t sign : 1;
-		uint64_t padding : 16;
-	} __attribute__((packed)) parts;
-} float96;
-
-typedef union {
-	struct {
-		uint64_t lo;
-		uint64_t hi;
-	} __attribute__((packed)) bin;
-
-	struct {
-		uint64_t frac_lo : 64;
-		uint64_t frac_hi : 48;
-		uint64_t exp : 15;
-		uint64_t sign : 1;
-	} __attribute__((packed)) parts;
-} float128;
-
-#else
-#error Unknown endianess
-#endif
-
-#if __SIZEOF_FLOAT__ == 4
-#define float32_t float
-#elif __SIZEOF_DOUBLE__ == 4
-#define float32_t double
-#elif __SIZEOF_LONG_DOUBLE__ == 4
-#define float32_t long double
-#endif
-
-#if __SIZEOF_FLOAT__ == 8
-#define float64_t float
-#elif __SIZEOF_DOUBLE__ == 8
-#define float64_t double
-#elif __SIZEOF_LONG_DOUBLE__ == 8
-#define float64_t long double
-#endif
-
-#if __SIZEOF_FLOAT__ == 12
-#define float96_t float
-#elif __SIZEOF_DOUBLE__ == 12
-#define float96_t double
-#elif __SIZEOF_LONG_DOUBLE__ == 12
-#define float96_t long double
-#endif
-
-#if __SIZEOF_FLOAT__ == 16
-#define float128_t float
-#elif __SIZEOF_DOUBLE__ == 16
-#define float128_t double
-#elif __SIZEOF_LONG_DOUBLE__ == 16
-#define float128_t long double
-#endif
-
-#ifdef float32_t
-
-typedef union {
-	float32_t val;
-	float32 data;
-} float32_u;
-
-#endif
-
-#ifdef float64_t
-
-typedef union {
-	float64_t val;
-	float64 data;
-} float64_u;
-
-#endif
-
-#ifdef float96_t
-
-typedef union {
-	float96_t val;
-	float96 data;
-} float96_u;
-
-#endif
-
-#ifdef float128_t
-
-typedef union {
-	float128_t val;
-	float128 data;
-} float128_u;
-
-#endif
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/modf.h
===================================================================
--- uspace/lib/math/include/modf.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_MODF_H_
-#define LIBMATH_MODF_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_modf(float32_t, float32_t *);
-extern float64_t float64_modf(float64_t, float64_t *);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/pow.h
===================================================================
--- uspace/lib/math/include/pow.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_POW_H_
-#define LIBMATH_POW_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_pow(float32_t, float32_t);
-extern float64_t float64_pow(float64_t, float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/sinh.h
===================================================================
--- uspace/lib/math/include/sinh.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_SINH_H_
-#define LIBMATH_SINH_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_sinh(float32_t);
-extern float64_t float64_sinh(float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/sqrt.h
===================================================================
--- uspace/lib/math/include/sqrt.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_SQRT_H_
-#define LIBMATH_SQRT_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_sqrt(float32_t);
-extern float64_t float64_sqrt(float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/tan.h
===================================================================
--- uspace/lib/math/include/tan.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_TAN_H_
-#define LIBMATH_TAN_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_tan(float32_t);
-extern float64_t float64_tan(float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/tanh.h
===================================================================
--- uspace/lib/math/include/tanh.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2015 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_TANH_H_
-#define LIBMATH_TANH_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_tanh(float32_t);
-extern float64_t float64_tanh(float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/trig.h
===================================================================
--- uspace/lib/math/include/trig.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/*
- * Copyright (c) 2014 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_TRIG_H_
-#define LIBMATH_TRIG_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_sin(float32_t);
-extern float64_t float64_sin(float64_t);
-extern float32_t float32_cos(float32_t);
-extern float64_t float64_cos(float64_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/math/include/trunc.h
===================================================================
--- uspace/lib/math/include/trunc.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2014 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libmath
- * @{
- */
-/** @file
- */
-
-#ifndef LIBMATH_TRUNC_H_
-#define LIBMATH_TRUNC_H_
-
-#include <mathtypes.h>
-
-extern float32_t float32_trunc(float32_t);
-extern float64_t float64_trunc(float64_t);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/math/test/main.c
===================================================================
--- uspace/lib/math/test/main.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
+++ uspace/lib/math/test/main.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2014 Vojtech Horky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdio.h>
+#include <pcut/pcut.h>
+
+PCUT_INIT;
+
+PCUT_IMPORT(rounding);
+
+PCUT_MAIN();
+
Index: uspace/lib/math/test/rounding.c
===================================================================
--- uspace/lib/math/test/rounding.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
+++ uspace/lib/math/test/rounding.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -0,0 +1,1200 @@
+/*
+ * Copyright (c) 2018 CZ.NIC, z.s.p.o.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <pcut/pcut.h>
+#include <math.h>
+#include <inttypes.h>
+
+PCUT_INIT;
+
+PCUT_TEST_SUITE(rounding);
+
+static inline uint32_t fint(float x)
+{
+	union {
+		float f;
+		uint32_t i;
+	} u = { .f = x };
+	return u.i;
+}
+
+static inline uint64_t dint(double x)
+{
+	union {
+		double f;
+		uint64_t i;
+	} u = { .f = x };
+	return u.i;
+}
+
+#define assert_float_equals(x, y) PCUT_ASSERT_EQUALS(fint(x), fint(y))
+#define assert_double_equals(x, y) PCUT_ASSERT_EQUALS(dint(x), dint(y))
+
+#define FLOAT_CASES 200
+#define DOUBLE_CASES 0
+
+
+static float float_arguments[FLOAT_CASES] = {
+	HUGE_VALF,
+	-HUGE_VALF,
+	__builtin_nanf(""),
+	-__builtin_nanf(""),
+	__builtin_nanf("0xdeadbe"),
+	-__builtin_nanf("0xdeadbe"),
+
+	0x0.000000p0f,       /* zero */
+	0x0.000002p-126f,    /* smallest denormal > 0 */
+	0x1.000000p-126f,    /* smallest normal > 0 */
+	0x1.fffffep-2f,      /* largest < 0.5 */
+	0x1.000000p-1f,      /* 0.5 */
+	0x1.000002p-1f,      /* smallest > 0.5 */
+	0x1.fffffep-1f,      /* largest < 1 */
+	0x1.000000p0f,       /* 1 */
+	0x1.000002p0f,       /* smallest > 1 */
+	0x1.7ffffep0f,       /* largest < 1.5 */
+	0x1.800000p0f,       /* 1.5 */
+	0x1.800002p0f,       /* smallest > 1.5 */
+	0x1.fffffep0f,       /* largest < 2 */
+	0x1.000000p1f,       /* 2 */
+	0x1.000002p1f,       /* smallest > 2 */
+	0x1.3ffffep1f,       /* largest < 2.5 */
+	0x1.400000p1f,       /* 2.5 */
+	0x1.400002p1f,       /* smallest > 2.5 */
+	0x1.7ffffep1f,       /* largest < 3 */
+	0x1.800000p1f,       /* 3 */
+	0x1.800002p1f,       /* smallest > 3 */
+	0x1.bffffep1f,       /* largest < 3.5 */
+	0x1.c00000p1f,       /* 3.5 */
+	0x1.c00002p1f,       /* smallest > 3.5 */
+	0x1.fffffep1f,       /* largest < 4 */
+	0x1.000000p2f,       /* 4 */
+	0x1.000002p2f,       /* smallest > 4 */
+
+	0x1.ffffe0p20f,      /* 2^21 - 2 */
+	0x1.ffffe2p20f,      /* 2^21 - 1.875 */
+	0x1.ffffe4p20f,      /* 2^21 - 1.75 */
+	0x1.ffffe6p20f,      /* 2^21 - 1.625 */
+	0x1.ffffe8p20f,      /* 2^21 - 1.5 */
+	0x1.ffffeap20f,      /* 2^21 - 1.375 */
+	0x1.ffffecp20f,      /* 2^21 - 1.25 */
+	0x1.ffffeep20f,      /* 2^21 - 1.125 */
+	0x1.fffff0p20f,      /* 2^21 - 1 */
+	0x1.fffff2p20f,      /* 2^21 - 0.875 */
+	0x1.fffff4p20f,      /* 2^21 - 0.75 */
+	0x1.fffff6p20f,      /* 2^21 - 0.625 */
+	0x1.fffff8p20f,      /* 2^21 - 0.5 */
+	0x1.fffffap20f,      /* 2^21 - 0.375 */
+	0x1.fffffcp20f,      /* 2^21 - 0.25 */
+	0x1.fffffep20f,      /* 2^21 - 0.125 */
+	0x1.000000p21f,      /* 2^21 */
+	0x1.000002p21f,      /* 2^21 + 0.25 */
+	0x1.000004p21f,      /* 2^21 + 0.5 */
+	0x1.000006p21f,      /* 2^21 + 0.75 */
+	0x1.000008p21f,      /* 2^21 + 1 */
+	0x1.00000ap21f,      /* 2^21 + 1.25 */
+	0x1.00000cp21f,      /* 2^21 + 1.5 */
+	0x1.00000ep21f,      /* 2^21 + 1.75 */
+	0x1.000010p21f,      /* 2^21 + 2 */
+
+	0x1.fffff0p21f,      /* 2^22 - 2 */
+	0x1.fffff2p21f,      /* 2^22 - 1.75 */
+	0x1.fffff4p21f,      /* 2^22 - 1.5 */
+	0x1.fffff6p21f,      /* 2^22 - 1.25 */
+	0x1.fffff8p21f,      /* 2^22 - 1 */
+	0x1.fffffap21f,      /* 2^22 - 0.75 */
+	0x1.fffffcp21f,      /* 2^22 - 0.5 */
+	0x1.fffffep21f,      /* 2^22 - 0.25 */
+	0x1.000000p22f,      /* 2^22 */
+	0x1.000002p22f,      /* 2^22 + 0.5 */
+	0x1.000004p22f,      /* 2^22 + 1 */
+	0x1.000006p22f,      /* 2^22 + 1.5 */
+	0x1.000008p22f,      /* 2^22 + 2 */
+
+	0x1.fffff0p22f,      /* 2^23 - 4 */
+	0x1.fffff2p22f,      /* 2^23 - 3.5 */
+	0x1.fffff4p22f,      /* 2^23 - 3 */
+	0x1.fffff6p22f,      /* 2^23 - 2.5 */
+	0x1.fffff8p22f,      /* 2^23 - 2 */
+	0x1.fffffap22f,      /* 2^23 - 1.5 */
+	0x1.fffffcp22f,      /* 2^23 - 1 */
+	0x1.fffffep22f,      /* 2^23 - 0.5 */
+	0x1.000000p23f,      /* 2^23 */
+	0x1.000002p23f,      /* 2^23 + 1 */
+	0x1.000004p23f,      /* 2^23 + 2 */
+	0x1.000006p23f,      /* 2^23 + 3 */
+	0x1.000008p23f,      /* 2^23 + 4 */
+
+	0x1.fffff0p23f,      /* 2^24 - 8 */
+	0x1.fffff2p23f,      /* 2^24 - 7 */
+	0x1.fffff4p23f,      /* 2^24 - 6 */
+	0x1.fffff6p23f,      /* 2^24 - 5 */
+	0x1.fffff8p23f,      /* 2^24 - 4 */
+	0x1.fffffap23f,      /* 2^24 - 3 */
+	0x1.fffffcp23f,      /* 2^24 - 2 */
+	0x1.fffffep23f,      /* 2^24 - 1 */
+	0x1.000000p24f,      /* 2^24 */
+	0x1.000002p24f,      /* 2^24 + 2 */
+	0x1.000004p24f,      /* 2^24 + 4 */
+	0x1.000006p24f,      /* 2^24 + 6 */
+	0x1.000008p24f,      /* 2^24 + 8 */
+
+	0x1.fffffep100f,     /* large integer */
+
+	/* Same as above but negative */
+
+	-0x0.000000p0f,       /* zero */
+	-0x0.000002p-126f,    /* smallest denormal > 0 */
+	-0x1.000000p-126f,    /* smallest normal > 0 */
+	-0x1.fffffep-2f,      /* largest < 0.5 */
+	-0x1.000000p-1f,      /* 0.5 */
+	-0x1.000002p-1f,      /* smallest > 0.5 */
+	-0x1.fffffep-1f,      /* largest < 1 */
+	-0x1.000000p0f,       /* 1 */
+	-0x1.000002p0f,       /* smallest > 1 */
+	-0x1.7ffffep0f,       /* largest < 1.5 */
+	-0x1.800000p0f,       /* 1.5 */
+	-0x1.800002p0f,       /* smallest > 1.5 */
+	-0x1.fffffep0f,       /* largest < 2 */
+	-0x1.000000p1f,       /* 2 */
+	-0x1.000002p1f,       /* smallest > 2 */
+	-0x1.3ffffep1f,       /* largest < 2.5 */
+	-0x1.400000p1f,       /* 2.5 */
+	-0x1.400002p1f,       /* smallest > 2.5 */
+	-0x1.7ffffep1f,       /* largest < 3 */
+	-0x1.800000p1f,       /* 3 */
+	-0x1.800002p1f,       /* smallest > 3 */
+	-0x1.bffffep1f,       /* largest < 3.5 */
+	-0x1.c00000p1f,       /* 3.5 */
+	-0x1.c00002p1f,       /* smallest > 3.5 */
+	-0x1.fffffep1f,       /* largest < 4 */
+	-0x1.000000p2f,       /* 4 */
+	-0x1.000002p2f,       /* smallest > 4 */
+
+	-0x1.ffffe0p20f,      /* 2^21 - 2 */
+	-0x1.ffffe2p20f,      /* 2^21 - 1.875 */
+	-0x1.ffffe4p20f,      /* 2^21 - 1.75 */
+	-0x1.ffffe6p20f,      /* 2^21 - 1.625 */
+	-0x1.ffffe8p20f,      /* 2^21 - 1.5 */
+	-0x1.ffffeap20f,      /* 2^21 - 1.375 */
+	-0x1.ffffecp20f,      /* 2^21 - 1.25 */
+	-0x1.ffffeep20f,      /* 2^21 - 1.125 */
+	-0x1.fffff0p20f,      /* 2^21 - 1 */
+	-0x1.fffff2p20f,      /* 2^21 - 0.875 */
+	-0x1.fffff4p20f,      /* 2^21 - 0.75 */
+	-0x1.fffff6p20f,      /* 2^21 - 0.625 */
+	-0x1.fffff8p20f,      /* 2^21 - 0.5 */
+	-0x1.fffffap20f,      /* 2^21 - 0.375 */
+	-0x1.fffffcp20f,      /* 2^21 - 0.25 */
+	-0x1.fffffep20f,      /* 2^21 - 0.125 */
+	-0x1.000000p21f,      /* 2^21 */
+	-0x1.000002p21f,      /* 2^21 + 0.25 */
+	-0x1.000004p21f,      /* 2^21 + 0.5 */
+	-0x1.000006p21f,      /* 2^21 + 0.75 */
+	-0x1.000008p21f,      /* 2^21 + 1 */
+	-0x1.00000ap21f,      /* 2^21 + 1.25 */
+	-0x1.00000cp21f,      /* 2^21 + 1.5 */
+	-0x1.00000ep21f,      /* 2^21 + 1.75 */
+	-0x1.000010p21f,      /* 2^21 + 2 */
+
+	-0x1.fffff0p21f,      /* 2^22 - 2 */
+	-0x1.fffff2p21f,      /* 2^22 - 1.75 */
+	-0x1.fffff4p21f,      /* 2^22 - 1.5 */
+	-0x1.fffff6p21f,      /* 2^22 - 1.25 */
+	-0x1.fffff8p21f,      /* 2^22 - 1 */
+	-0x1.fffffap21f,      /* 2^22 - 0.75 */
+	-0x1.fffffcp21f,      /* 2^22 - 0.5 */
+	-0x1.fffffep21f,      /* 2^22 - 0.25 */
+	-0x1.000000p22f,      /* 2^22 */
+	-0x1.000002p22f,      /* 2^22 + 0.5 */
+	-0x1.000004p22f,      /* 2^22 + 1 */
+	-0x1.000006p22f,      /* 2^22 + 1.5 */
+	-0x1.000008p22f,      /* 2^22 + 2 */
+
+	-0x1.fffff0p22f,      /* 2^23 - 4 */
+	-0x1.fffff2p22f,      /* 2^23 - 3.5 */
+	-0x1.fffff4p22f,      /* 2^23 - 3 */
+	-0x1.fffff6p22f,      /* 2^23 - 2.5 */
+	-0x1.fffff8p22f,      /* 2^23 - 2 */
+	-0x1.fffffap22f,      /* 2^23 - 1.5 */
+	-0x1.fffffcp22f,      /* 2^23 - 1 */
+	-0x1.fffffep22f,      /* 2^23 - 0.5 */
+	-0x1.000000p23f,      /* 2^23 */
+	-0x1.000002p23f,      /* 2^23 + 1 */
+	-0x1.000004p23f,      /* 2^23 + 2 */
+	-0x1.000006p23f,      /* 2^23 + 3 */
+	-0x1.000008p23f,      /* 2^23 + 4 */
+
+	-0x1.fffff0p23f,      /* 2^24 - 8 */
+	-0x1.fffff2p23f,      /* 2^24 - 7 */
+	-0x1.fffff4p23f,      /* 2^24 - 6 */
+	-0x1.fffff6p23f,      /* 2^24 - 5 */
+	-0x1.fffff8p23f,      /* 2^24 - 4 */
+	-0x1.fffffap23f,      /* 2^24 - 3 */
+	-0x1.fffffcp23f,      /* 2^24 - 2 */
+	-0x1.fffffep23f,      /* 2^24 - 1 */
+	-0x1.000000p24f,      /* 2^24 */
+	-0x1.000002p24f,      /* 2^24 + 2 */
+	-0x1.000004p24f,      /* 2^24 + 4 */
+	-0x1.000006p24f,      /* 2^24 + 6 */
+	-0x1.000008p24f,      /* 2^24 + 8 */
+
+	-0x1.fffffep100f,     /* large integer with full mantissa */
+
+	/* a few random numbers*/
+	3.5, -2.1, 100.0, 50.0, -1024.0, 0.0, 768.3156, 1080.499999, -600.0, 1.0
+};
+
+static float float_identity[FLOAT_CASES] = {
+	HUGE_VALF,
+	-HUGE_VALF,
+	__builtin_nanf(""),
+	-__builtin_nanf(""),
+	__builtin_nanf("0xdeadbe"),
+	-__builtin_nanf("0xdeadbe"),
+
+	0.0,
+	FLT_DENORM_MIN,    /* smallest denormal > 0 */
+	FLT_MIN,         /* smallest normal > 0 */
+	0.5 - (FLT_EPSILON / 4.),
+	0.5,
+	0.5 + (FLT_EPSILON / 2.),
+	1.0 - (FLT_EPSILON / 2.),
+	1.0,
+	1.0 + FLT_EPSILON,
+	1.5 - FLT_EPSILON,
+	1.5,
+	1.5 + FLT_EPSILON,
+	2.0 - FLT_EPSILON,
+	2.0,
+	2.0 + (2.0 * FLT_EPSILON),
+	2.5 - (2.0 * FLT_EPSILON),
+	2.5,
+	2.5 + (2.0 * FLT_EPSILON),
+	3.0 - (2.0 * FLT_EPSILON),
+	3.0,
+	3.0 + (2.0 * FLT_EPSILON),
+	3.5 - (2.0 * FLT_EPSILON),
+	3.5,
+	3.5 + (2.0 * FLT_EPSILON),
+	4.0 - (2.0 * FLT_EPSILON),
+	4.0,
+	4.0 + (4.0 * FLT_EPSILON),
+
+	2097150.000,     /* 2^21 - 2 */
+	2097150.125,     /* 2^21 - 1.875 */
+	2097150.250,     /* 2^21 - 1.75 */
+	2097150.375,     /* 2^21 - 1.625 */
+	2097150.500,     /* 2^21 - 1.5 */
+	2097150.625,     /* 2^21 - 1.375 */
+	2097150.750,     /* 2^21 - 1.25 */
+	2097150.875,     /* 2^21 - 1.125 */
+	2097151.000,     /* 2^21 - 1 */
+	2097151.125,     /* 2^21 - 0.875 */
+	2097151.250,     /* 2^21 - 0.75 */
+	2097151.375,     /* 2^21 - 0.625 */
+	2097151.500,     /* 2^21 - 0.5 */
+	2097151.625,     /* 2^21 - 0.375 */
+	2097151.750,     /* 2^21 - 0.25 */
+	2097151.875,     /* 2^21 - 0.125 */
+	2097152.00,      /* 2^21 */
+	2097152.25,      /* 2^21 + 0.25 */
+	2097152.50,      /* 2^21 + 0.5 */
+	2097152.75,      /* 2^21 + 0.75 */
+	2097153.00,      /* 2^21 + 1 */
+	2097153.25,      /* 2^21 + 1.25 */
+	2097153.50,      /* 2^21 + 1.5 */
+	2097153.75,      /* 2^21 + 1.75 */
+	2097154.00,      /* 2^21 + 2 */
+
+	4194302.00,      /* 2^22 - 2 */
+	4194302.25,      /* 2^22 - 1.75 */
+	4194302.50,      /* 2^22 - 1.5 */
+	4194302.75,      /* 2^22 - 1.25 */
+	4194303.00,      /* 2^22 - 1 */
+	4194303.25,      /* 2^22 - 0.75 */
+	4194303.50,      /* 2^22 - 0.5 */
+	4194303.75,      /* 2^22 - 0.25 */
+	4194304.0,       /* 2^22 */
+	4194304.5,       /* 2^22 + 0.5 */
+	4194305.0,       /* 2^22 + 1 */
+	4194305.5,       /* 2^22 + 1.5 */
+	4194306.0,       /* 2^22 + 2 */
+
+	8388604.0,      /* 2^23 - 4 */
+	8388604.5,      /* 2^23 - 3.5 */
+	8388605.0,      /* 2^23 - 3 */
+	8388605.5,      /* 2^23 - 2.5 */
+	8388606.0,      /* 2^23 - 2 */
+	8388606.5,      /* 2^23 - 1.5 */
+	8388607.0,      /* 2^23 - 1 */
+	8388607.5,      /* 2^23 - 0.5 */
+	8388608.0,      /* 2^23 */
+	8388609.0,      /* 2^23 + 1 */
+	8388610.0,      /* 2^23 + 2 */
+	8388611.0,      /* 2^23 + 3 */
+	8388612.0,      /* 2^23 + 4 */
+
+	16777208.0,      /* 2^24 - 8 */
+	16777209.0,      /* 2^24 - 7 */
+	16777210.0,      /* 2^24 - 6 */
+	16777211.0,      /* 2^24 - 5 */
+	16777212.0,      /* 2^24 - 4 */
+	16777213.0,      /* 2^24 - 3 */
+	16777214.0,      /* 2^24 - 2 */
+	16777215.0,      /* 2^24 - 1 */
+	16777216.0,      /* 2^24 */
+	16777218.0,      /* 2^24 + 2 */
+	16777220.0,      /* 2^24 + 4 */
+	16777222.0,      /* 2^24 + 6 */
+	16777224.0,      /* 2^24 + 8 */
+
+	0x1.fffffep100f,   /* large integer with full mantissa */
+
+	/* Same as above but negative */
+
+	-0.0,
+	-FLT_DENORM_MIN,    /* smallest denormal > 0 */
+	-FLT_MIN,         /* smallest normal > 0 */
+	-(0.5 - (FLT_EPSILON / 4.)),
+	-0.5,
+	-(0.5 + (FLT_EPSILON / 2.)),
+	-(1.0 - (FLT_EPSILON / 2.)),
+	-1.0,
+	-(1.0 + FLT_EPSILON),
+	-(1.5 - FLT_EPSILON),
+	-1.5,
+	-(1.5 + FLT_EPSILON),
+	-(2.0 - FLT_EPSILON),
+	-2.0,
+	-(2.0 + (2.0 * FLT_EPSILON)),
+	-(2.5 - (2.0 * FLT_EPSILON)),
+	-2.5,
+	-(2.5 + (2.0 * FLT_EPSILON)),
+	-(3.0 - (2.0 * FLT_EPSILON)),
+	-3.0,
+	-(3.0 + (2.0 * FLT_EPSILON)),
+	-(3.5 - (2.0 * FLT_EPSILON)),
+	-3.5,
+	-(3.5 + (2.0 * FLT_EPSILON)),
+	-(4.0 - (2.0 * FLT_EPSILON)),
+	-4.0,
+	-(4.0 + (4.0 * FLT_EPSILON)),
+
+	-2097150.000,     /* 2^21 - 2 */
+	-2097150.125,     /* 2^21 - 1.875 */
+	-2097150.250,     /* 2^21 - 1.75 */
+	-2097150.375,     /* 2^21 - 1.625 */
+	-2097150.500,     /* 2^21 - 1.5 */
+	-2097150.625,     /* 2^21 - 1.375 */
+	-2097150.750,     /* 2^21 - 1.25 */
+	-2097150.875,     /* 2^21 - 1.125 */
+	-2097151.000,     /* 2^21 - 1 */
+	-2097151.125,     /* 2^21 - 0.875 */
+	-2097151.250,     /* 2^21 - 0.75 */
+	-2097151.375,     /* 2^21 - 0.625 */
+	-2097151.500,     /* 2^21 - 0.5 */
+	-2097151.625,     /* 2^21 - 0.375 */
+	-2097151.750,     /* 2^21 - 0.25 */
+	-2097151.875,     /* 2^21 - 0.125 */
+	-2097152.00,      /* 2^21 */
+	-2097152.25,      /* 2^21 + 0.25 */
+	-2097152.50,      /* 2^21 + 0.5 */
+	-2097152.75,      /* 2^21 + 0.75 */
+	-2097153.00,      /* 2^21 + 1 */
+	-2097153.25,      /* 2^21 + 1.25 */
+	-2097153.50,      /* 2^21 + 1.5 */
+	-2097153.75,      /* 2^21 + 1.75 */
+	-2097154.00,      /* 2^21 + 2 */
+
+	-4194302.00,      /* 2^22 - 2 */
+	-4194302.25,      /* 2^22 - 1.75 */
+	-4194302.50,      /* 2^22 - 1.5 */
+	-4194302.75,      /* 2^22 - 1.25 */
+	-4194303.00,      /* 2^22 - 1 */
+	-4194303.25,      /* 2^22 - 0.75 */
+	-4194303.50,      /* 2^22 - 0.5 */
+	-4194303.75,      /* 2^22 - 0.25 */
+	-4194304.0,       /* 2^22 */
+	-4194304.5,       /* 2^22 + 0.5 */
+	-4194305.0,       /* 2^22 + 1 */
+	-4194305.5,       /* 2^22 + 1.5 */
+	-4194306.0,       /* 2^22 + 2 */
+
+	-8388604.0,      /* 2^23 - 4 */
+	-8388604.5,      /* 2^23 - 3.5 */
+	-8388605.0,      /* 2^23 - 3 */
+	-8388605.5,      /* 2^23 - 2.5 */
+	-8388606.0,      /* 2^23 - 2 */
+	-8388606.5,      /* 2^23 - 1.5 */
+	-8388607.0,      /* 2^23 - 1 */
+	-8388607.5,      /* 2^23 - 0.5 */
+	-8388608.0,      /* 2^23 */
+	-8388609.0,      /* 2^23 + 1 */
+	-8388610.0,      /* 2^23 + 2 */
+	-8388611.0,      /* 2^23 + 3 */
+	-8388612.0,      /* 2^23 + 4 */
+
+	-16777208.0,      /* 2^24 - 8 */
+	-16777209.0,      /* 2^24 - 7 */
+	-16777210.0,      /* 2^24 - 6 */
+	-16777211.0,      /* 2^24 - 5 */
+	-16777212.0,      /* 2^24 - 4 */
+	-16777213.0,      /* 2^24 - 3 */
+	-16777214.0,      /* 2^24 - 2 */
+	-16777215.0,      /* 2^24 - 1 */
+	-16777216.0,      /* 2^24 */
+	-16777218.0,      /* 2^24 + 2 */
+	-16777220.0,      /* 2^24 + 4 */
+	-16777222.0,      /* 2^24 + 6 */
+	-16777224.0,      /* 2^24 + 8 */
+
+	-0x1.fffffep100f,   /* large integer with full mantissa */
+
+	/* a few random numbers*/
+	3.5, -2.1, 100.0, 50.0, -1024.0, 0.0, 768.3156, 1080.5, -600.0, 1.0
+};
+
+static float float_results_trunc[FLOAT_CASES] = {
+	HUGE_VALF,
+	-HUGE_VALF,
+	__builtin_nanf(""),
+	-__builtin_nanf(""),
+	__builtin_nanf("0xdeadbe"),
+	-__builtin_nanf("0xdeadbe"),
+
+	0.0,
+	0.0,
+	0.0,
+	0.0,
+	0.0,
+	0.0,
+	0.0,
+	1.0,
+	1.0,
+	1.0,
+	1.0,
+	1.0,
+	1.0,
+	2.0,
+	2.0,
+	2.0,
+	2.0,
+	2.0,
+	2.0,
+	3.0,
+	3.0,
+	3.0,
+	3.0,
+	3.0,
+	3.0,
+	4.0,
+	4.0,
+
+	2097150.000,     /* 2^21 - 2 */
+	2097150.000,     /* 2^21 - 1.875 */
+	2097150.000,     /* 2^21 - 1.75 */
+	2097150.000,     /* 2^21 - 1.625 */
+	2097150.000,     /* 2^21 - 1.5 */
+	2097150.000,     /* 2^21 - 1.375 */
+	2097150.000,     /* 2^21 - 1.25 */
+	2097150.000,     /* 2^21 - 1.125 */
+	2097151.000,     /* 2^21 - 1 */
+	2097151.000,     /* 2^21 - 0.875 */
+	2097151.000,     /* 2^21 - 0.75 */
+	2097151.000,     /* 2^21 - 0.625 */
+	2097151.000,     /* 2^21 - 0.5 */
+	2097151.000,     /* 2^21 - 0.375 */
+	2097151.000,     /* 2^21 - 0.25 */
+	2097151.000,     /* 2^21 - 0.125 */
+	2097152.00,      /* 2^21 */
+	2097152.00,      /* 2^21 + 0.25 */
+	2097152.00,      /* 2^21 + 0.5 */
+	2097152.00,      /* 2^21 + 0.75 */
+	2097153.00,      /* 2^21 + 1 */
+	2097153.00,      /* 2^21 + 1.25 */
+	2097153.00,      /* 2^21 + 1.5 */
+	2097153.00,      /* 2^21 + 1.75 */
+	2097154.00,      /* 2^21 + 2 */
+
+	4194302.00,      /* 2^22 - 2 */
+	4194302.00,      /* 2^22 - 1.75 */
+	4194302.00,      /* 2^22 - 1.5 */
+	4194302.00,      /* 2^22 - 1.25 */
+	4194303.00,      /* 2^22 - 1 */
+	4194303.00,      /* 2^22 - 0.75 */
+	4194303.00,      /* 2^22 - 0.5 */
+	4194303.00,      /* 2^22 - 0.25 */
+	4194304.0,       /* 2^22 */
+	4194304.0,       /* 2^22 + 0.5 */
+	4194305.0,       /* 2^22 + 1 */
+	4194305.0,       /* 2^22 + 1.5 */
+	4194306.0,       /* 2^22 + 2 */
+
+	8388604.0,      /* 2^23 - 4 */
+	8388604.0,      /* 2^23 - 3.5 */
+	8388605.0,      /* 2^23 - 3 */
+	8388605.0,      /* 2^23 - 2.5 */
+	8388606.0,      /* 2^23 - 2 */
+	8388606.0,      /* 2^23 - 1.5 */
+	8388607.0,      /* 2^23 - 1 */
+	8388607.0,      /* 2^23 - 0.5 */
+	8388608.0,      /* 2^23 */
+	8388609.0,      /* 2^23 + 1 */
+	8388610.0,      /* 2^23 + 2 */
+	8388611.0,      /* 2^23 + 3 */
+	8388612.0,      /* 2^23 + 4 */
+
+	16777208.0,      /* 2^24 - 8 */
+	16777209.0,      /* 2^24 - 7 */
+	16777210.0,      /* 2^24 - 6 */
+	16777211.0,      /* 2^24 - 5 */
+	16777212.0,      /* 2^24 - 4 */
+	16777213.0,      /* 2^24 - 3 */
+	16777214.0,      /* 2^24 - 2 */
+	16777215.0,      /* 2^24 - 1 */
+	16777216.0,      /* 2^24 */
+	16777218.0,      /* 2^24 + 2 */
+	16777220.0,      /* 2^24 + 4 */
+	16777222.0,      /* 2^24 + 6 */
+	16777224.0,      /* 2^24 + 8 */
+
+	0x1.fffffep100f,   /* large integer with full mantissa */
+
+	/* Same as above but negative */
+
+	-0.0,
+	-0.0,
+	-0.0,
+	-0.0,
+	-0.0,
+	-0.0,
+	-0.0,
+	-1.0,
+	-1.0,
+	-1.0,
+	-1.0,
+	-1.0,
+	-1.0,
+	-2.0,
+	-2.0,
+	-2.0,
+	-2.0,
+	-2.0,
+	-2.0,
+	-3.0,
+	-3.0,
+	-3.0,
+	-3.0,
+	-3.0,
+	-3.0,
+	-4.0,
+	-4.0,
+
+	-2097150.000,     /* 2^21 - 2 */
+	-2097150.000,     /* 2^21 - 1.875 */
+	-2097150.000,     /* 2^21 - 1.75 */
+	-2097150.000,     /* 2^21 - 1.625 */
+	-2097150.000,     /* 2^21 - 1.5 */
+	-2097150.000,     /* 2^21 - 1.375 */
+	-2097150.000,     /* 2^21 - 1.25 */
+	-2097150.000,     /* 2^21 - 1.125 */
+	-2097151.000,     /* 2^21 - 1 */
+	-2097151.000,     /* 2^21 - 0.875 */
+	-2097151.000,     /* 2^21 - 0.75 */
+	-2097151.000,     /* 2^21 - 0.625 */
+	-2097151.000,     /* 2^21 - 0.5 */
+	-2097151.000,     /* 2^21 - 0.375 */
+	-2097151.000,     /* 2^21 - 0.25 */
+	-2097151.000,     /* 2^21 - 0.125 */
+	-2097152.00,      /* 2^21 */
+	-2097152.00,      /* 2^21 + 0.25 */
+	-2097152.00,      /* 2^21 + 0.5 */
+	-2097152.00,      /* 2^21 + 0.75 */
+	-2097153.00,      /* 2^21 + 1 */
+	-2097153.00,      /* 2^21 + 1.25 */
+	-2097153.00,      /* 2^21 + 1.5 */
+	-2097153.00,      /* 2^21 + 1.75 */
+	-2097154.00,      /* 2^21 + 2 */
+
+	-4194302.00,      /* 2^22 - 2 */
+	-4194302.00,      /* 2^22 - 1.75 */
+	-4194302.00,      /* 2^22 - 1.5 */
+	-4194302.00,      /* 2^22 - 1.25 */
+	-4194303.00,      /* 2^22 - 1 */
+	-4194303.00,      /* 2^22 - 0.75 */
+	-4194303.00,      /* 2^22 - 0.5 */
+	-4194303.00,      /* 2^22 - 0.25 */
+	-4194304.0,       /* 2^22 */
+	-4194304.0,       /* 2^22 + 0.5 */
+	-4194305.0,       /* 2^22 + 1 */
+	-4194305.0,       /* 2^22 + 1.5 */
+	-4194306.0,       /* 2^22 + 2 */
+
+	-8388604.0,      /* 2^23 - 4 */
+	-8388604.0,      /* 2^23 - 3.5 */
+	-8388605.0,      /* 2^23 - 3 */
+	-8388605.0,      /* 2^23 - 2.5 */
+	-8388606.0,      /* 2^23 - 2 */
+	-8388606.0,      /* 2^23 - 1.5 */
+	-8388607.0,      /* 2^23 - 1 */
+	-8388607.0,      /* 2^23 - 0.5 */
+	-8388608.0,      /* 2^23 */
+	-8388609.0,      /* 2^23 + 1 */
+	-8388610.0,      /* 2^23 + 2 */
+	-8388611.0,      /* 2^23 + 3 */
+	-8388612.0,      /* 2^23 + 4 */
+
+	-16777208.0,      /* 2^24 - 8 */
+	-16777209.0,      /* 2^24 - 7 */
+	-16777210.0,      /* 2^24 - 6 */
+	-16777211.0,      /* 2^24 - 5 */
+	-16777212.0,      /* 2^24 - 4 */
+	-16777213.0,      /* 2^24 - 3 */
+	-16777214.0,      /* 2^24 - 2 */
+	-16777215.0,      /* 2^24 - 1 */
+	-16777216.0,      /* 2^24 */
+	-16777218.0,      /* 2^24 + 2 */
+	-16777220.0,      /* 2^24 + 4 */
+	-16777222.0,      /* 2^24 + 6 */
+	-16777224.0,      /* 2^24 + 8 */
+
+	-0x1.fffffep100f,   /* large integer with full mantissa */
+
+	/* a few random numbers*/
+	3.0, -2.0, 100.0, 50.0, -1024.0, 0.0, 768.0, 1080.0, -600.0, 1.0
+};
+
+static float float_results_round[FLOAT_CASES] = {
+	HUGE_VALF,
+	-HUGE_VALF,
+	__builtin_nanf(""),
+	-__builtin_nanf(""),
+	__builtin_nanf("0xdeadbe"),
+	-__builtin_nanf("0xdeadbe"),
+
+	0.0,
+	0.0,    /* smallest denormal > 0 */
+	0.0,         /* smallest normal > 0 */
+	0.0,
+	1.0,
+	1.0,
+	1.0,
+	1.0,
+	1.0,
+	1.0,
+	2.0,
+	2.0,
+	2.0,
+	2.0,
+	2.0,
+	2.0,
+	3.0,
+	3.0,
+	3.0,
+	3.0,
+	3.0,
+	3.0,
+	4.0,
+	4.0,
+	4.0,
+	4.0,
+	4.0,
+
+	2097150.000,     /* 2^21 - 2 */
+	2097150.000,     /* 2^21 - 1.875 */
+	2097150.000,     /* 2^21 - 1.75 */
+	2097150.000,     /* 2^21 - 1.625 */
+	2097151.000,     /* 2^21 - 1.5 */
+	2097151.000,     /* 2^21 - 1.375 */
+	2097151.000,     /* 2^21 - 1.25 */
+	2097151.000,     /* 2^21 - 1.125 */
+	2097151.000,     /* 2^21 - 1 */
+	2097151.000,     /* 2^21 - 0.875 */
+	2097151.000,     /* 2^21 - 0.75 */
+	2097151.000,     /* 2^21 - 0.625 */
+	2097152.000,     /* 2^21 - 0.5 */
+	2097152.000,     /* 2^21 - 0.375 */
+	2097152.000,     /* 2^21 - 0.25 */
+	2097152.000,     /* 2^21 - 0.125 */
+	2097152.00,      /* 2^21 */
+	2097152.00,      /* 2^21 + 0.25 */
+	2097153.00,      /* 2^21 + 0.5 */
+	2097153.00,      /* 2^21 + 0.75 */
+	2097153.00,      /* 2^21 + 1 */
+	2097153.00,      /* 2^21 + 1.25 */
+	2097154.00,      /* 2^21 + 1.5 */
+	2097154.00,      /* 2^21 + 1.75 */
+	2097154.00,      /* 2^21 + 2 */
+
+	4194302.00,      /* 2^22 - 2 */
+	4194302.00,      /* 2^22 - 1.75 */
+	4194303.00,      /* 2^22 - 1.5 */
+	4194303.00,      /* 2^22 - 1.25 */
+	4194303.00,      /* 2^22 - 1 */
+	4194303.00,      /* 2^22 - 0.75 */
+	4194304.00,      /* 2^22 - 0.5 */
+	4194304.00,      /* 2^22 - 0.25 */
+	4194304.0,       /* 2^22 */
+	4194305.0,       /* 2^22 + 0.5 */
+	4194305.0,       /* 2^22 + 1 */
+	4194306.0,       /* 2^22 + 1.5 */
+	4194306.0,       /* 2^22 + 2 */
+
+	8388604.0,      /* 2^23 - 4 */
+	8388605.0,      /* 2^23 - 3.5 */
+	8388605.0,      /* 2^23 - 3 */
+	8388606.0,      /* 2^23 - 2.5 */
+	8388606.0,      /* 2^23 - 2 */
+	8388607.0,      /* 2^23 - 1.5 */
+	8388607.0,      /* 2^23 - 1 */
+	8388608.0,      /* 2^23 - 0.5 */
+	8388608.0,      /* 2^23 */
+	8388609.0,      /* 2^23 + 1 */
+	8388610.0,      /* 2^23 + 2 */
+	8388611.0,      /* 2^23 + 3 */
+	8388612.0,      /* 2^23 + 4 */
+
+	16777208.0,      /* 2^24 - 8 */
+	16777209.0,      /* 2^24 - 7 */
+	16777210.0,      /* 2^24 - 6 */
+	16777211.0,      /* 2^24 - 5 */
+	16777212.0,      /* 2^24 - 4 */
+	16777213.0,      /* 2^24 - 3 */
+	16777214.0,      /* 2^24 - 2 */
+	16777215.0,      /* 2^24 - 1 */
+	16777216.0,      /* 2^24 */
+	16777218.0,      /* 2^24 + 2 */
+	16777220.0,      /* 2^24 + 4 */
+	16777222.0,      /* 2^24 + 6 */
+	16777224.0,      /* 2^24 + 8 */
+
+	0x1.fffffep100f,   /* large integer with full mantissa */
+
+	/* Same as above but negative */
+
+	-0.0,
+	-0.0,    /* smallest denormal > 0 */
+	-0.0,         /* smallest normal > 0 */
+	-0.0,
+	-1.0,
+	-1.0,
+	-1.0,
+	-1.0,
+	-1.0,
+	-1.0,
+	-2.0,
+	-2.0,
+	-2.0,
+	-2.0,
+	-2.0,
+	-2.0,
+	-3.0,
+	-3.0,
+	-3.0,
+	-3.0,
+	-3.0,
+	-3.0,
+	-4.0,
+	-4.0,
+	-4.0,
+	-4.0,
+	-4.0,
+
+	-2097150.000,     /* 2^21 - 2 */
+	-2097150.000,     /* 2^21 - 1.875 */
+	-2097150.000,     /* 2^21 - 1.75 */
+	-2097150.000,     /* 2^21 - 1.625 */
+	-2097151.000,     /* 2^21 - 1.5 */
+	-2097151.000,     /* 2^21 - 1.375 */
+	-2097151.000,     /* 2^21 - 1.25 */
+	-2097151.000,     /* 2^21 - 1.125 */
+	-2097151.000,     /* 2^21 - 1 */
+	-2097151.000,     /* 2^21 - 0.875 */
+	-2097151.000,     /* 2^21 - 0.75 */
+	-2097151.000,     /* 2^21 - 0.625 */
+	-2097152.000,     /* 2^21 - 0.5 */
+	-2097152.000,     /* 2^21 - 0.375 */
+	-2097152.000,     /* 2^21 - 0.25 */
+	-2097152.000,     /* 2^21 - 0.125 */
+	-2097152.00,      /* 2^21 */
+	-2097152.00,      /* 2^21 + 0.25 */
+	-2097153.00,      /* 2^21 + 0.5 */
+	-2097153.00,      /* 2^21 + 0.75 */
+	-2097153.00,      /* 2^21 + 1 */
+	-2097153.00,      /* 2^21 + 1.25 */
+	-2097154.00,      /* 2^21 + 1.5 */
+	-2097154.00,      /* 2^21 + 1.75 */
+	-2097154.00,      /* 2^21 + 2 */
+
+	-4194302.00,      /* 2^22 - 2 */
+	-4194302.00,      /* 2^22 - 1.75 */
+	-4194303.00,      /* 2^22 - 1.5 */
+	-4194303.00,      /* 2^22 - 1.25 */
+	-4194303.00,      /* 2^22 - 1 */
+	-4194303.00,      /* 2^22 - 0.75 */
+	-4194304.00,      /* 2^22 - 0.5 */
+	-4194304.00,      /* 2^22 - 0.25 */
+	-4194304.0,       /* 2^22 */
+	-4194305.0,       /* 2^22 + 0.5 */
+	-4194305.0,       /* 2^22 + 1 */
+	-4194306.0,       /* 2^22 + 1.5 */
+	-4194306.0,       /* 2^22 + 2 */
+
+	-8388604.0,      /* 2^23 - 4 */
+	-8388605.0,      /* 2^23 - 3.5 */
+	-8388605.0,      /* 2^23 - 3 */
+	-8388606.0,      /* 2^23 - 2.5 */
+	-8388606.0,      /* 2^23 - 2 */
+	-8388607.0,      /* 2^23 - 1.5 */
+	-8388607.0,      /* 2^23 - 1 */
+	-8388608.0,      /* 2^23 - 0.5 */
+	-8388608.0,      /* 2^23 */
+	-8388609.0,      /* 2^23 + 1 */
+	-8388610.0,      /* 2^23 + 2 */
+	-8388611.0,      /* 2^23 + 3 */
+	-8388612.0,      /* 2^23 + 4 */
+
+	-16777208.0,      /* 2^24 - 8 */
+	-16777209.0,      /* 2^24 - 7 */
+	-16777210.0,      /* 2^24 - 6 */
+	-16777211.0,      /* 2^24 - 5 */
+	-16777212.0,      /* 2^24 - 4 */
+	-16777213.0,      /* 2^24 - 3 */
+	-16777214.0,      /* 2^24 - 2 */
+	-16777215.0,      /* 2^24 - 1 */
+	-16777216.0,      /* 2^24 */
+	-16777218.0,      /* 2^24 + 2 */
+	-16777220.0,      /* 2^24 + 4 */
+	-16777222.0,      /* 2^24 + 6 */
+	-16777224.0,      /* 2^24 + 8 */
+
+	-0x1.fffffep100f,   /* large integer with full mantissa */
+
+	/* a few random numbers*/
+	4.0, -2.0, 100.0, 50.0, -1024.0, 0.0, 768.0, 1081.0, -600.0, 1.0
+};
+
+static float float_results_nearbyint[FLOAT_CASES] = {
+	HUGE_VALF,
+	-HUGE_VALF,
+	__builtin_nanf(""),
+	-__builtin_nanf(""),
+	__builtin_nanf("0xdeadbe"),
+	-__builtin_nanf("0xdeadbe"),
+
+	0.0,
+	0.0,    /* smallest denormal > 0 */
+	0.0,         /* smallest normal > 0 */
+	0.0,
+	0.0,
+	1.0,
+	1.0,
+	1.0,
+	1.0,
+	1.0,
+	2.0,
+	2.0,
+	2.0,
+	2.0,
+	2.0,
+	2.0,
+	2.0,
+	3.0,
+	3.0,
+	3.0,
+	3.0,
+	3.0,
+	4.0,
+	4.0,
+	4.0,
+	4.0,
+	4.0,
+
+	2097150.000,     /* 2^21 - 2 */
+	2097150.000,     /* 2^21 - 1.875 */
+	2097150.000,     /* 2^21 - 1.75 */
+	2097150.000,     /* 2^21 - 1.625 */
+	2097150.000,     /* 2^21 - 1.5 */
+	2097151.000,     /* 2^21 - 1.375 */
+	2097151.000,     /* 2^21 - 1.25 */
+	2097151.000,     /* 2^21 - 1.125 */
+	2097151.000,     /* 2^21 - 1 */
+	2097151.000,     /* 2^21 - 0.875 */
+	2097151.000,     /* 2^21 - 0.75 */
+	2097151.000,     /* 2^21 - 0.625 */
+	2097152.000,     /* 2^21 - 0.5 */
+	2097152.000,     /* 2^21 - 0.375 */
+	2097152.000,     /* 2^21 - 0.25 */
+	2097152.000,     /* 2^21 - 0.125 */
+	2097152.00,      /* 2^21 */
+	2097152.00,      /* 2^21 + 0.25 */
+	2097152.00,      /* 2^21 + 0.5 */
+	2097153.00,      /* 2^21 + 0.75 */
+	2097153.00,      /* 2^21 + 1 */
+	2097153.00,      /* 2^21 + 1.25 */
+	2097154.00,      /* 2^21 + 1.5 */
+	2097154.00,      /* 2^21 + 1.75 */
+	2097154.00,      /* 2^21 + 2 */
+
+	4194302.00,      /* 2^22 - 2 */
+	4194302.00,      /* 2^22 - 1.75 */
+	4194302.00,      /* 2^22 - 1.5 */
+	4194303.00,      /* 2^22 - 1.25 */
+	4194303.00,      /* 2^22 - 1 */
+	4194303.00,      /* 2^22 - 0.75 */
+	4194304.00,      /* 2^22 - 0.5 */
+	4194304.0,      /* 2^22 - 0.25 */
+	4194304.0,       /* 2^22 */
+	4194304.0,       /* 2^22 + 0.5 */
+	4194305.0,       /* 2^22 + 1 */
+	4194306.0,       /* 2^22 + 1.5 */
+	4194306.0,       /* 2^22 + 2 */
+
+	8388604.0,      /* 2^23 - 4 */
+	8388604.0,      /* 2^23 - 3.5 */
+	8388605.0,      /* 2^23 - 3 */
+	8388606.0,      /* 2^23 - 2.5 */
+	8388606.0,      /* 2^23 - 2 */
+	8388606.0,      /* 2^23 - 1.5 */
+	8388607.0,      /* 2^23 - 1 */
+	8388608.0,      /* 2^23 - 0.5 */
+	8388608.0,      /* 2^23 */
+	8388609.0,      /* 2^23 + 1 */
+	8388610.0,      /* 2^23 + 2 */
+	8388611.0,      /* 2^23 + 3 */
+	8388612.0,      /* 2^23 + 4 */
+
+	16777208.0,      /* 2^24 - 8 */
+	16777209.0,      /* 2^24 - 7 */
+	16777210.0,      /* 2^24 - 6 */
+	16777211.0,      /* 2^24 - 5 */
+	16777212.0,      /* 2^24 - 4 */
+	16777213.0,      /* 2^24 - 3 */
+	16777214.0,      /* 2^24 - 2 */
+	16777215.0,      /* 2^24 - 1 */
+	16777216.0,      /* 2^24 */
+	16777218.0,      /* 2^24 + 2 */
+	16777220.0,      /* 2^24 + 4 */
+	16777222.0,      /* 2^24 + 6 */
+	16777224.0,      /* 2^24 + 8 */
+
+	0x1.fffffep100f,   /* large integer with full mantissa */
+
+	/* Same as above but negative */
+
+	-0.0,
+	-0.0,    /* smallest denormal > 0 */
+	-0.0,         /* smallest normal > 0 */
+	-0.0,
+	-0.0,
+	-1.0,
+	-1.0,
+	-1.0,
+	-1.0,
+	-1.0,
+	-2.0,
+	-2.0,
+	-2.0,
+	-2.0,
+	-2.0,
+	-2.0,
+	-2.0,
+	-3.0,
+	-3.0,
+	-3.0,
+	-3.0,
+	-3.0,
+	-4.0,
+	-4.0,
+	-4.0,
+	-4.0,
+	-4.0,
+
+	-2097150.000,     /* 2^21 - 2 */
+	-2097150.000,     /* 2^21 - 1.875 */
+	-2097150.000,     /* 2^21 - 1.75 */
+	-2097150.000,     /* 2^21 - 1.625 */
+	-2097150.000,     /* 2^21 - 1.5 */
+	-2097151.000,     /* 2^21 - 1.375 */
+	-2097151.000,     /* 2^21 - 1.25 */
+	-2097151.000,     /* 2^21 - 1.125 */
+	-2097151.000,     /* 2^21 - 1 */
+	-2097151.000,     /* 2^21 - 0.875 */
+	-2097151.000,     /* 2^21 - 0.75 */
+	-2097151.000,     /* 2^21 - 0.625 */
+	-2097152.000,     /* 2^21 - 0.5 */
+	-2097152.000,     /* 2^21 - 0.375 */
+	-2097152.000,     /* 2^21 - 0.25 */
+	-2097152.000,     /* 2^21 - 0.125 */
+	-2097152.00,      /* 2^21 */
+	-2097152.00,      /* 2^21 + 0.25 */
+	-2097152.00,      /* 2^21 + 0.5 */
+	-2097153.00,      /* 2^21 + 0.75 */
+	-2097153.00,      /* 2^21 + 1 */
+	-2097153.00,      /* 2^21 + 1.25 */
+	-2097154.00,      /* 2^21 + 1.5 */
+	-2097154.00,      /* 2^21 + 1.75 */
+	-2097154.00,      /* 2^21 + 2 */
+
+	-4194302.00,      /* 2^22 - 2 */
+	-4194302.00,      /* 2^22 - 1.75 */
+	-4194302.00,      /* 2^22 - 1.5 */
+	-4194303.00,      /* 2^22 - 1.25 */
+	-4194303.00,      /* 2^22 - 1 */
+	-4194303.00,      /* 2^22 - 0.75 */
+	-4194304.00,      /* 2^22 - 0.5 */
+	-4194304.0,      /* 2^22 - 0.25 */
+	-4194304.0,       /* 2^22 */
+	-4194304.0,       /* 2^22 + 0.5 */
+	-4194305.0,       /* 2^22 + 1 */
+	-4194306.0,       /* 2^22 + 1.5 */
+	-4194306.0,       /* 2^22 + 2 */
+
+	-8388604.0,      /* 2^23 - 4 */
+	-8388604.0,      /* 2^23 - 3.5 */
+	-8388605.0,      /* 2^23 - 3 */
+	-8388606.0,      /* 2^23 - 2.5 */
+	-8388606.0,      /* 2^23 - 2 */
+	-8388606.0,      /* 2^23 - 1.5 */
+	-8388607.0,      /* 2^23 - 1 */
+	-8388608.0,      /* 2^23 - 0.5 */
+	-8388608.0,      /* 2^23 */
+	-8388609.0,      /* 2^23 + 1 */
+	-8388610.0,      /* 2^23 + 2 */
+	-8388611.0,      /* 2^23 + 3 */
+	-8388612.0,      /* 2^23 + 4 */
+
+	-16777208.0,      /* 2^24 - 8 */
+	-16777209.0,      /* 2^24 - 7 */
+	-16777210.0,      /* 2^24 - 6 */
+	-16777211.0,      /* 2^24 - 5 */
+	-16777212.0,      /* 2^24 - 4 */
+	-16777213.0,      /* 2^24 - 3 */
+	-16777214.0,      /* 2^24 - 2 */
+	-16777215.0,      /* 2^24 - 1 */
+	-16777216.0,      /* 2^24 */
+	-16777218.0,      /* 2^24 + 2 */
+	-16777220.0,      /* 2^24 + 4 */
+	-16777222.0,      /* 2^24 + 6 */
+	-16777224.0,      /* 2^24 + 8 */
+
+	-0x1.fffffep100f,   /* large integer with full mantissa */
+
+	/* a few random numbers*/
+	4.0, -2.0, 100.0, 50.0, -1024.0, 0.0, 768.0, 1080.0, -600.0, 1.0
+};
+
+PCUT_TEST(identity)
+{
+	for (int i = 0; i < FLOAT_CASES; i++) {
+		uint32_t f1 = fint(float_arguments[i]);
+		uint32_t f2 = fint(float_identity[i]);
+		if (f1 != f2) {
+			PCUT_ASSERTION_FAILED("case %d: 0x%08x != 0x%08x\n", i, f1, f2);
+		}
+	}
+}
+
+PCUT_TEST(truncf)
+{
+	for (int i = 0; i < FLOAT_CASES; i++) {
+		uint32_t f1 = fint(truncf(float_arguments[i]));
+		uint32_t f2 = fint(float_results_trunc[i]);
+		if (f1 != f2) {
+			PCUT_ASSERTION_FAILED("case %d: 0x%08x != 0x%08x\n", i, f1, f2);
+		}
+	}
+}
+
+PCUT_TEST(trunc)
+{
+	for (int i = 0; i < FLOAT_CASES; i++) {
+		uint64_t f1 = dint(trunc(float_arguments[i]));
+		uint64_t f2 = dint(float_results_trunc[i]);
+		if (f1 != f2) {
+			PCUT_ASSERTION_FAILED("case %d: 0x%016" PRIx64 " != 0x%016" PRIx64 "\n", i, f1, f2);
+		}
+	}
+
+	// TODO: double test cases
+}
+
+PCUT_TEST(roundf)
+{
+	for (int i = 0; i < FLOAT_CASES; i++) {
+		uint32_t f1 = fint(roundf(float_arguments[i]));
+		uint32_t f2 = fint(float_results_round[i]);
+		if (f1 != f2) {
+			PCUT_ASSERTION_FAILED("case %d: 0x%08x != 0x%08x\n", i, f1, f2);
+		}
+	}
+}
+
+PCUT_TEST(round)
+{
+	for (int i = 0; i < FLOAT_CASES; i++) {
+		uint64_t f1 = dint(round(float_arguments[i]));
+		uint64_t f2 = dint(float_results_round[i]);
+		if (f1 != f2) {
+			PCUT_ASSERTION_FAILED("case %d: 0x%016" PRIx64 " != 0x%016" PRIx64 "\n", i, f1, f2);
+		}
+	}
+
+	// TODO: double test cases
+}
+
+PCUT_TEST(nearbyintf)
+{
+	// FIXME: ensure default rounding mode
+
+	for (int i = 0; i < FLOAT_CASES; i++) {
+		uint32_t f1 = fint(nearbyintf(float_arguments[i]));
+		uint32_t f2 = fint(float_results_nearbyint[i]);
+		if (f1 != f2) {
+			PCUT_ASSERTION_FAILED("case %d: 0x%08x != 0x%08x\n", i, f1, f2);
+		}
+	}
+}
+
+PCUT_TEST(nearbyint)
+{
+	// FIXME: ensure default rounding mode
+
+	for (int i = 0; i < FLOAT_CASES; i++) {
+		uint64_t f1 = dint(nearbyint(float_arguments[i]));
+		uint64_t f2 = dint(float_results_nearbyint[i]);
+		if (f1 != f2) {
+			PCUT_ASSERTION_FAILED("case %d: 0x%016" PRIx64 " != 0x%016" PRIx64 "\n", i, f1, f2);
+		}
+	}
+
+	// TODO: double test cases
+}
+
+PCUT_EXPORT(rounding);
+
Index: uspace/lib/posix/include/posix/math.h
===================================================================
--- uspace/lib/posix/include/posix/math.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ uspace/lib/posix/include/posix/math.h	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2011 Petr Koupy
+ * Copyright (c) 2018 Jiri Svoboda
  * All rights reserved.
  *
@@ -30,51 +30,14 @@
  * @{
  */
-/** @file Mathematical operations.
- *
- * The purpose of this file is only to provide prototypes of mathematical
- * functions defined by C standard and by POSIX.
- *
- * It is up to the application to correctly link with either libmath
- * (provided by HelenOS) or by some other math library (such as fdlibm).
- */
 
 #ifndef POSIX_MATH_H_
 #define POSIX_MATH_H_
 
-#ifdef __GNUC__
-#define HUGE_VAL (__builtin_huge_val())
+/*
+ * Just a pass-through to libc math.h
+ */
+#include "libc/math.h"
+
 #endif
-
-extern double ldexp(double, int);
-extern double frexp(double, int *);
-
-extern double fabs(double);
-extern double floor(double);
-extern double ceil(double);
-extern double modf(double, double *);
-extern double fmod(double, double);
-extern double pow(double, double);
-extern double exp(double);
-extern double frexp(double, int *);
-extern double expm1(double);
-extern double sqrt(double);
-extern double log(double);
-extern double log10(double);
-extern double sin(double);
-extern double sinh(double);
-extern double asin(double);
-extern double asinh(double);
-extern double cos(double);
-extern double cosh(double);
-extern double acos(double);
-extern double acosh(double);
-extern double tan(double);
-extern double tanh(double);
-extern double atan(double);
-extern double atanh(double);
-extern double atan2(double, double);
-extern double copysign(double, double);
-
-#endif /* POSIX_MATH_H_ */
 
 /** @}
Index: uspace/lib/softfloat/Makefile
===================================================================
--- uspace/lib/softfloat/Makefile	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ uspace/lib/softfloat/Makefile	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -30,5 +30,4 @@
 USPACE_PREFIX = ../..
 LIBRARY = libsoftfloat
-EXTRA_CFLAGS += $(LIBMATH_INCLUDES_FLAGS)
 
 SOURCES = \
Index: uspace/lib/softfloat/comparison.c
===================================================================
--- uspace/lib/softfloat/comparison.c	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ uspace/lib/softfloat/comparison.c	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -681,4 +681,16 @@
 }
 
+int __aeabi_fcmpun(float32_t a, float32_t b)
+{
+	float32_u ua;
+	ua.val = a;
+
+	float32_u ub;
+	ub.val = b;
+
+	// TODO: sigNaNs
+	return is_float32_nan(ua.data) || is_float32_nan(ub.data);
+}
+
 #endif
 
@@ -920,4 +932,16 @@
 }
 
+int __aeabi_dcmpun(float64_t a, float64_t b)
+{
+	float64_u ua;
+	ua.val = a;
+
+	float64_u ub;
+	ub.val = b;
+
+	// TODO: sigNaNs
+	return is_float64_nan(ua.data) || is_float64_nan(ub.data);
+}
+
 #endif
 
Index: uspace/lib/softfloat/comparison.h
===================================================================
--- uspace/lib/softfloat/comparison.h	(revision 7f7d64298fbfdc2ce850eb86156d829a4def23e6)
+++ uspace/lib/softfloat/comparison.h	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -93,4 +93,5 @@
 extern int __aeabi_fcmple(float32_t, float32_t);
 extern int __aeabi_fcmpeq(float32_t, float32_t);
+extern int __aeabi_fcmpun(float32_t, float32_t);
 #endif
 
@@ -109,4 +110,5 @@
 extern int __aeabi_dcmpge(float64_t, float64_t);
 extern int __aeabi_dcmple(float64_t, float64_t);
+extern int __aeabi_dcmpun(float64_t, float64_t);
 #endif
 
Index: uspace/lib/softfloat/mathtypes.h
===================================================================
--- uspace/lib/softfloat/mathtypes.h	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
+++ uspace/lib/softfloat/mathtypes.h	(revision 516e7808c5e1e23b10a77bb1429054a16f6fedc3)
@@ -0,0 +1,264 @@
+/*
+ * Copyright (c) 2005 Josef Cejka
+ * Copyright (c) 2011 Petr Koupy
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libmath
+ * @{
+ */
+/** @file Floating point types and constants.
+ */
+
+#ifndef LIBMATH_MATHTYPES_H_
+#define LIBMATH_MATHTYPES_H_
+
+#include <byteorder.h>
+#include <stdint.h>
+
+/*
+ * For recognizing NaNs or infinity use specialized comparison
+ * functions, comparing with these constants is not sufficient.
+ */
+
+#define FLOAT32_NAN     UINT32_C(0x7fc00001)
+#define FLOAT32_SIGNAN  UINT32_C(0x7f800001)
+#define FLOAT32_INF     UINT32_C(0x7f800000)
+
+#define FLOAT64_NAN     UINT64_C(0x7ff8000000000001)
+#define FLOAT64_SIGNAN  UINT64_C(0x7ff0000000000001)
+#define FLOAT64_INF     UINT64_C(0x7ff0000000000000)
+
+#define FLOAT96_NAN_HI     UINT64_C(0x7fff80000000)
+#define FLOAT96_NAN_LO     UINT32_C(0x00010000)
+#define FLOAT96_SIGNAN_HI  UINT64_C(0x7fff00000000)
+#define FLOAT96_SIGNAN_LO  UINT32_C(0x00010000)
+
+#define FLOAT128_NAN_HI     UINT64_C(0x7fff800000000000)
+#define FLOAT128_NAN_LO     UINT64_C(0x0000000000000001)
+#define FLOAT128_SIGNAN_HI  UINT64_C(0x7fff000000000000)
+#define FLOAT128_SIGNAN_LO  UINT64_C(0x0000000000000001)
+#define FLOAT128_INF_HI     UINT64_C(0x7fff000000000000)
+#define FLOAT128_INF_LO     UINT64_C(0x0000000000000000)
+
+#define FLOAT32_FRACTION_SIZE   23
+#define FLOAT64_FRACTION_SIZE   52
+#define FLOAT96_FRACTION_SIZE   64
+#define FLOAT128_FRACTION_SIZE  112
+#define FLOAT128_FRAC_HI_SIZE   48
+#define FLOAT128_FRAC_LO_SIZE   64
+
+#define FLOAT32_HIDDEN_BIT_MASK      UINT32_C(0x800000)
+#define FLOAT64_HIDDEN_BIT_MASK      UINT64_C(0x10000000000000)
+#define FLOAT128_HIDDEN_BIT_MASK_HI  UINT64_C(0x1000000000000)
+#define FLOAT128_HIDDEN_BIT_MASK_LO  UINT64_C(0x0000000000000000)
+
+#define FLOAT32_MAX_EXPONENT   0xff
+#define FLOAT64_MAX_EXPONENT   0x7ff
+#define FLOAT96_MAX_EXPONENT   0x7fff
+#define FLOAT128_MAX_EXPONENT  0x7fff
+
+#define FLOAT32_BIAS   0x7f
+#define FLOAT64_BIAS   0x3ff
+#define FLOAT96_BIAS   0x3fff
+#define FLOAT128_BIAS  0x3fff
+
+#if defined(__BE__)
+
+typedef union {
+	uint32_t bin;
+
+	struct {
+		uint32_t sign : 1;
+		uint32_t exp : 8;
+		uint32_t fraction : 23;
+	} __attribute__((packed)) parts;
+} float32;
+
+typedef union {
+	uint64_t bin;
+
+	struct {
+		uint64_t sign : 1;
+		uint64_t exp : 11;
+		uint64_t fraction : 52;
+	} __attribute__((packed)) parts;
+} float64;
+
+typedef union {
+	struct {
+		uint64_t hi;
+		uint32_t lo;
+	} __attribute__((packed)) bin;
+
+	struct {
+		uint64_t padding : 16;
+		uint64_t sign : 1;
+		uint64_t exp : 15;
+		uint64_t fraction : 64;
+	} __attribute__((packed)) parts;
+} float96;
+
+typedef union {
+	struct {
+		uint64_t hi;
+		uint64_t lo;
+	} __attribute__((packed)) bin;
+
+	struct {
+		uint64_t sign : 1;
+		uint64_t exp : 15;
+		uint64_t frac_hi : 48;
+		uint64_t frac_lo : 64;
+	} __attribute__((packed)) parts;
+} float128;
+
+#elif defined(__LE__)
+
+typedef union {
+	uint32_t bin;
+
+	struct {
+		uint32_t fraction : 23;
+		uint32_t exp : 8;
+		uint32_t sign : 1;
+	} __attribute__((packed)) parts;
+} float32;
+
+typedef union {
+	uint64_t bin;
+
+	struct {
+		uint64_t fraction : 52;
+		uint64_t exp : 11;
+		uint64_t sign : 1;
+	} __attribute__((packed)) parts;
+} float64;
+
+typedef union {
+	struct {
+		uint32_t lo;
+		uint64_t hi;
+	} __attribute__((packed)) bin;
+
+	struct {
+		uint64_t fraction : 64;
+		uint64_t exp : 15;
+		uint64_t sign : 1;
+		uint64_t padding : 16;
+	} __attribute__((packed)) parts;
+} float96;
+
+typedef union {
+	struct {
+		uint64_t lo;
+		uint64_t hi;
+	} __attribute__((packed)) bin;
+
+	struct {
+		uint64_t frac_lo : 64;
+		uint64_t frac_hi : 48;
+		uint64_t exp : 15;
+		uint64_t sign : 1;
+	} __attribute__((packed)) parts;
+} float128;
+
+#else
+#error Unknown endianess
+#endif
+
+#if __SIZEOF_FLOAT__ == 4
+#define float32_t float
+#elif __SIZEOF_DOUBLE__ == 4
+#define float32_t double
+#elif __SIZEOF_LONG_DOUBLE__ == 4
+#define float32_t long double
+#endif
+
+#if __SIZEOF_FLOAT__ == 8
+#define float64_t float
+#elif __SIZEOF_DOUBLE__ == 8
+#define float64_t double
+#elif __SIZEOF_LONG_DOUBLE__ == 8
+#define float64_t long double
+#endif
+
+#if __SIZEOF_FLOAT__ == 12
+#define float96_t float
+#elif __SIZEOF_DOUBLE__ == 12
+#define float96_t double
+#elif __SIZEOF_LONG_DOUBLE__ == 12
+#define float96_t long double
+#endif
+
+#if __SIZEOF_FLOAT__ == 16
+#define float128_t float
+#elif __SIZEOF_DOUBLE__ == 16
+#define float128_t double
+#elif __SIZEOF_LONG_DOUBLE__ == 16
+#define float128_t long double
+#endif
+
+#ifdef float32_t
+
+typedef union {
+	float32_t val;
+	float32 data;
+} float32_u;
+
+#endif
+
+#ifdef float64_t
+
+typedef union {
+	float64_t val;
+	float64 data;
+} float64_u;
+
+#endif
+
+#ifdef float96_t
+
+typedef union {
+	float96_t val;
+	float96 data;
+} float96_u;
+
+#endif
+
+#ifdef float128_t
+
+typedef union {
+	float128_t val;
+	float128 data;
+} float128_u;
+
+#endif
+
+#endif
+
+/** @}
+ */
