Index: libcfa/prelude/builtins.c
===================================================================
--- libcfa/prelude/builtins.c	(revision e25ef8c9bc1cec34146129133c0654aaa9d5c268)
+++ libcfa/prelude/builtins.c	(revision 108b2c75260d5b15cab02e847700d0ca68637ebe)
@@ -44,5 +44,4 @@
 typedef unsigned long long __cfaabi_abi_exception_type_t;
 
-#include <limits.h>										// CHAR_BIT
 #include "../src/virtual.h"
 #include "../src/exception.h"
@@ -132,41 +131,17 @@
 } // distribution
 
-#define __CFA_EXP__() \
-	if ( y == 0 ) return 1;								/* convention */ \
-	__CFA_EXP_INT__(									/* special cases for integral types */ \
-		if ( x == 1 ) return 1;							/* base case */ \
-		if ( x == 2 ) return x << (y - 1);				/* positive shifting */ \
-		if ( y >= sizeof(y) * CHAR_BIT ) return 0;		/* immediate overflow, negative exponent > 2^size-1 */ \
-	) \
-	typeof(x) op = 1;									/* accumulate odd product */ \
-	typeof(x) w = x; /* FIX-ME: possible bug in the box pass changing value argument through parameter */ \
-	for ( ; y > 1; y >>= 1 ) {							/* squaring exponentiation, O(log2 y) */ \
-		if ( (y & 1) == 1 ) op = op * w;				/* odd ? */ \
-		w = w * w; \
-	} \
-	return w * op
-#define __CFA_EXP_INT__(...) __VA_ARGS__
+int ?\?( int x, unsigned int y );
+long int ?\?( long int x, unsigned long int y );
+long long int ?\?( long long int x, unsigned long long int y );
+// unsigned computation may be faster and larger
+unsigned int ?\?( unsigned int x, unsigned int y );
+unsigned long int ?\?( unsigned long int x, unsigned long int y );
+unsigned long long int ?\?( unsigned long long int x, unsigned long long int y );
 
-static inline {
-	int ?\?( int x, unsigned int y ) { __CFA_EXP__(); }
-	long int ?\?( long int x, unsigned long int y ) { __CFA_EXP__(); }
-	long long int ?\?( long long int x, unsigned long long int y ) { __CFA_EXP__(); }
-	// unsigned computation may be faster and larger
-	unsigned int ?\?( unsigned int x, unsigned int y ) { __CFA_EXP__(); }
-	unsigned long int ?\?( unsigned long int x, unsigned long int y ) { __CFA_EXP__(); }
-	unsigned long long int ?\?( unsigned long long int x, unsigned long long int y ) { __CFA_EXP__(); }
+forall( OT | { void ?{}( OT & this, one_t ); OT ?*?( OT, OT ); } ) {
+	OT ?\?( OT x, unsigned int y );
+	OT ?\?( OT x, unsigned long int y );
+	OT ?\?( OT x, unsigned long long int y );
 } // distribution
-
-#undef __CFA_EXP_INT__
-#define __CFA_EXP_INT__(...)
-
-static inline forall( OT | { void ?{}( OT & this, one_t ); OT ?*?( OT, OT ); } ) {
-	OT ?\?( OT x, unsigned int y ) { __CFA_EXP__(); }
-	OT ?\?( OT x, unsigned long int y ) { __CFA_EXP__(); }
-	OT ?\?( OT x, unsigned long long int y ) { __CFA_EXP__(); }
-} // distribution
-
-#undef __CFA_EXP_INT__
-#undef __CFA_EXP__
 
 static inline {
Index: libcfa/src/Makefile.am
===================================================================
--- libcfa/src/Makefile.am	(revision e25ef8c9bc1cec34146129133c0654aaa9d5c268)
+++ libcfa/src/Makefile.am	(revision 108b2c75260d5b15cab02e847700d0ca68637ebe)
@@ -47,5 +47,4 @@
 	gmp.hfa \
 	math.trait.hfa \
-	math.hfa \
 	raii.hfa \
 	time_t.hfa \
@@ -81,4 +80,5 @@
 	iterator.hfa \
 	limits.hfa \
+	math.hfa \
 	memory.hfa \
 	parseargs.hfa \
Index: libcfa/src/math.cfa
===================================================================
--- libcfa/src/math.cfa	(revision 108b2c75260d5b15cab02e847700d0ca68637ebe)
+++ libcfa/src/math.cfa	(revision 108b2c75260d5b15cab02e847700d0ca68637ebe)
@@ -0,0 +1,57 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// math.cpp --
+//
+// Author           : Andrew Beach
+// Created On       : Mon Nov 25 16:20:00 2024
+// Last Modified By : Andrew Beach
+// Created On       : Mon Nov 27 15:11:00 2024
+// Update Count     : 0
+//
+
+#include "math.hfa"
+
+#include <limits.h>
+
+#pragma GCC visibility push(default)
+
+// Implementation of power functions (from the prelude):
+
+#define __CFA_EXP__() \
+	if ( y == 0 ) return 1;                             /* convention */ \
+	__CFA_EXP_INT__(                                    /* special cases for integral types */ \
+		if ( x == 1 ) return 1;                         /* base case */ \
+		if ( x == 2 ) return x << (y - 1);              /* positive shifting */ \
+		if ( y >= sizeof(y) * CHAR_BIT ) return 0;      /* immediate overflow, negative exponent > 2^size-1 */ \
+	) \
+	typeof(x) op = 1;                                   /* accumulate odd product */ \
+	typeof(x) w = x; /* FIX-ME: possible bug in the box pass changing value argument through parameter */ \
+	for ( ; y > 1; y >>= 1 ) {                          /* squaring exponentiation, O(log2 y) */ \
+		if ( (y & 1) == 1 ) op = op * w;                /* odd ? */ \
+		w = w * w; \
+	} \
+	return w * op
+#define __CFA_EXP_INT__(...) __VA_ARGS__
+
+int ?\?( int x, unsigned int y ) { __CFA_EXP__(); }
+long int ?\?( long int x, unsigned long int y ) { __CFA_EXP__(); }
+long long int ?\?( long long int x, unsigned long long int y ) { __CFA_EXP__(); }
+unsigned int ?\?( unsigned int x, unsigned int y ) { __CFA_EXP__(); }
+unsigned long int ?\?( unsigned long int x, unsigned long int y ) { __CFA_EXP__(); }
+unsigned long long int ?\?( unsigned long long int x, unsigned long long int y ) { __CFA_EXP__(); }
+
+#undef __CFA_EXP_INT__
+#define __CFA_EXP_INT__(...)
+
+forall( OT | { void ?{}( OT & this, one_t ); OT ?*?( OT, OT ); } ) {
+	OT ?\?( OT x, unsigned int y ) { __CFA_EXP__(); }
+	OT ?\?( OT x, unsigned long int y ) { __CFA_EXP__(); }
+	OT ?\?( OT x, unsigned long long int y ) { __CFA_EXP__(); }
+} // distribution
+
+#undef __CFA_EXP_INT__
+#undef __CFA_EXP__
Index: tests/.expect/KRfunctions.arm64.txt
===================================================================
--- tests/.expect/KRfunctions.arm64.txt	(revision e25ef8c9bc1cec34146129133c0654aaa9d5c268)
+++ tests/.expect/KRfunctions.arm64.txt	(revision 108b2c75260d5b15cab02e847700d0ca68637ebe)
@@ -104,6 +104,6 @@
     signed int _X1bi_2;
     {
-        signed int *(*_tmp_cp_ret6)(signed int __param_0, signed int __param_1);
-        ((void)(_X1xFPi_ii__2=(((void)(_tmp_cp_ret6=_X3f10FFPi_ii__iPiPid__1(3, (&_X1ai_2), (&_X1bi_2), 3.5))) , _tmp_cp_ret6)));
+        signed int *(*_tmp_cp_ret0)(signed int __param_0, signed int __param_1);
+        ((void)(_X1xFPi_ii__2=(((void)(_tmp_cp_ret0=_X3f10FFPi_ii__iPiPid__1(3, (&_X1ai_2), (&_X1bi_2), 3.5))) , _tmp_cp_ret0)));
     }
 
Index: tests/.expect/KRfunctions.x64.txt
===================================================================
--- tests/.expect/KRfunctions.x64.txt	(revision e25ef8c9bc1cec34146129133c0654aaa9d5c268)
+++ tests/.expect/KRfunctions.x64.txt	(revision 108b2c75260d5b15cab02e847700d0ca68637ebe)
@@ -104,6 +104,6 @@
     signed int _X1bi_2;
     {
-        signed int *(*_tmp_cp_ret6)(signed int __param_0, signed int __param_1);
-        ((void)(_X1xFPi_ii__2=(((void)(_tmp_cp_ret6=_X3f10FFPi_ii__iPiPid__1(3, (&_X1ai_2), (&_X1bi_2), 3.5))) , _tmp_cp_ret6)));
+        signed int *(*_tmp_cp_ret0)(signed int __param_0, signed int __param_1);
+        ((void)(_X1xFPi_ii__2=(((void)(_tmp_cp_ret0=_X3f10FFPi_ii__iPiPid__1(3, (&_X1ai_2), (&_X1bi_2), 3.5))) , _tmp_cp_ret0)));
     }
 
Index: tests/.expect/KRfunctions.x86.txt
===================================================================
--- tests/.expect/KRfunctions.x86.txt	(revision e25ef8c9bc1cec34146129133c0654aaa9d5c268)
+++ tests/.expect/KRfunctions.x86.txt	(revision 108b2c75260d5b15cab02e847700d0ca68637ebe)
@@ -104,6 +104,6 @@
     signed int _X1bi_2;
     {
-        signed int *(*_tmp_cp_ret6)(signed int __param_0, signed int __param_1);
-        ((void)(_X1xFPi_ii__2=(((void)(_tmp_cp_ret6=_X3f10FFPi_ii__iPiPid__1(3, (&_X1ai_2), (&_X1bi_2), 3.5))) , _tmp_cp_ret6)));
+        signed int *(*_tmp_cp_ret0)(signed int __param_0, signed int __param_1);
+        ((void)(_X1xFPi_ii__2=(((void)(_tmp_cp_ret0=_X3f10FFPi_ii__iPiPid__1(3, (&_X1ai_2), (&_X1bi_2), 3.5))) , _tmp_cp_ret0)));
     }
 
Index: tests/.expect/declarationSpecifier.arm64.txt
===================================================================
--- tests/.expect/declarationSpecifier.arm64.txt	(revision e25ef8c9bc1cec34146129133c0654aaa9d5c268)
+++ tests/.expect/declarationSpecifier.arm64.txt	(revision 108b2c75260d5b15cab02e847700d0ca68637ebe)
@@ -1059,6 +1059,6 @@
     }
 
-    signed int _tmp_cp_ret6;
-    signed int _X3reti_2 = (((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6);
+    signed int _tmp_cp_ret0;
+    signed int _X3reti_2 = (((void)(_tmp_cp_ret0=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret0);
     if ( ((&_X17cfa_main_returnedi_1)!=((signed int *)0)) ) {
         {
Index: tests/.expect/declarationSpecifier.x64.txt
===================================================================
--- tests/.expect/declarationSpecifier.x64.txt	(revision e25ef8c9bc1cec34146129133c0654aaa9d5c268)
+++ tests/.expect/declarationSpecifier.x64.txt	(revision 108b2c75260d5b15cab02e847700d0ca68637ebe)
@@ -1059,6 +1059,6 @@
     }
 
-    signed int _tmp_cp_ret6;
-    signed int _X3reti_2 = (((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6);
+    signed int _tmp_cp_ret0;
+    signed int _X3reti_2 = (((void)(_tmp_cp_ret0=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret0);
     if ( ((&_X17cfa_main_returnedi_1)!=((signed int *)0)) ) {
         {
Index: tests/.expect/declarationSpecifier.x86.txt
===================================================================
--- tests/.expect/declarationSpecifier.x86.txt	(revision e25ef8c9bc1cec34146129133c0654aaa9d5c268)
+++ tests/.expect/declarationSpecifier.x86.txt	(revision 108b2c75260d5b15cab02e847700d0ca68637ebe)
@@ -1059,6 +1059,6 @@
     }
 
-    signed int _tmp_cp_ret6;
-    signed int _X3reti_2 = (((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6);
+    signed int _tmp_cp_ret0;
+    signed int _X3reti_2 = (((void)(_tmp_cp_ret0=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret0);
     if ( ((&_X17cfa_main_returnedi_1)!=((signed int *)0)) ) {
         {
Index: tests/.expect/extension.arm64.txt
===================================================================
--- tests/.expect/extension.arm64.txt	(revision e25ef8c9bc1cec34146129133c0654aaa9d5c268)
+++ tests/.expect/extension.arm64.txt	(revision 108b2c75260d5b15cab02e847700d0ca68637ebe)
@@ -457,6 +457,6 @@
 
     {
-        signed int _tmp_cp_ret6;
-        ((void)(((void)(_tmp_cp_ret6=__extension__ _X4fredFi_i__1(3))) , _tmp_cp_ret6));
+        signed int _tmp_cp_ret0;
+        ((void)(((void)(_tmp_cp_ret0=__extension__ _X4fredFi_i__1(3))) , _tmp_cp_ret0));
     }
 
Index: tests/.expect/extension.x64.txt
===================================================================
--- tests/.expect/extension.x64.txt	(revision e25ef8c9bc1cec34146129133c0654aaa9d5c268)
+++ tests/.expect/extension.x64.txt	(revision 108b2c75260d5b15cab02e847700d0ca68637ebe)
@@ -457,6 +457,6 @@
 
     {
-        signed int _tmp_cp_ret6;
-        ((void)(((void)(_tmp_cp_ret6=__extension__ _X4fredFi_i__1(3))) , _tmp_cp_ret6));
+        signed int _tmp_cp_ret0;
+        ((void)(((void)(_tmp_cp_ret0=__extension__ _X4fredFi_i__1(3))) , _tmp_cp_ret0));
     }
 
Index: tests/.expect/extension.x86.txt
===================================================================
--- tests/.expect/extension.x86.txt	(revision e25ef8c9bc1cec34146129133c0654aaa9d5c268)
+++ tests/.expect/extension.x86.txt	(revision 108b2c75260d5b15cab02e847700d0ca68637ebe)
@@ -457,6 +457,6 @@
 
     {
-        signed int _tmp_cp_ret6;
-        ((void)(((void)(_tmp_cp_ret6=__extension__ _X4fredFi_i__1(3))) , _tmp_cp_ret6));
+        signed int _tmp_cp_ret0;
+        ((void)(((void)(_tmp_cp_ret0=__extension__ _X4fredFi_i__1(3))) , _tmp_cp_ret0));
     }
 
Index: tests/.expect/gccExtensions.arm64.txt
===================================================================
--- tests/.expect/gccExtensions.arm64.txt	(revision e25ef8c9bc1cec34146129133c0654aaa9d5c268)
+++ tests/.expect/gccExtensions.arm64.txt	(revision 108b2c75260d5b15cab02e847700d0ca68637ebe)
@@ -339,6 +339,6 @@
     }
 
-    signed int _tmp_cp_ret6;
-    signed int _X3reti_2 = (((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6);
+    signed int _tmp_cp_ret0;
+    signed int _X3reti_2 = (((void)(_tmp_cp_ret0=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret0);
     if ( ((&_X17cfa_main_returnedi_1)!=((signed int *)0)) ) {
         {
Index: tests/.expect/gccExtensions.x64.txt
===================================================================
--- tests/.expect/gccExtensions.x64.txt	(revision e25ef8c9bc1cec34146129133c0654aaa9d5c268)
+++ tests/.expect/gccExtensions.x64.txt	(revision 108b2c75260d5b15cab02e847700d0ca68637ebe)
@@ -339,6 +339,6 @@
     }
 
-    signed int _tmp_cp_ret6;
-    signed int _X3reti_2 = (((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6);
+    signed int _tmp_cp_ret0;
+    signed int _X3reti_2 = (((void)(_tmp_cp_ret0=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret0);
     if ( ((&_X17cfa_main_returnedi_1)!=((signed int *)0)) ) {
         {
Index: tests/.expect/gccExtensions.x86.txt
===================================================================
--- tests/.expect/gccExtensions.x86.txt	(revision e25ef8c9bc1cec34146129133c0654aaa9d5c268)
+++ tests/.expect/gccExtensions.x86.txt	(revision 108b2c75260d5b15cab02e847700d0ca68637ebe)
@@ -317,6 +317,6 @@
     }
 
-    signed int _tmp_cp_ret6;
-    signed int _X3reti_2 = (((void)(_tmp_cp_ret6=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret6);
+    signed int _tmp_cp_ret0;
+    signed int _X3reti_2 = (((void)(_tmp_cp_ret0=invoke_main(_X4argci_1, _X4argvPPc_1, _X4envpPPc_1))) , _tmp_cp_ret0);
     if ( ((&_X17cfa_main_returnedi_1)!=((signed int *)0)) ) {
         {
