Index: sansmodels/src/sans/models/c_extensions/libmultifunc/librefl.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/libmultifunc/librefl.c	(revision b9765ad2dabcf6f74c440ad2088d1e6d40701eb8)
+++ sansmodels/src/sans/models/c_extensions/libmultifunc/librefl.c	(revision 8ff5cb3da7d659c05ad4b1db717b521b4257953b)
@@ -21,5 +21,5 @@
 
 
-complex cadd(x,y)
+complex cplx_add(x,y)
 	complex x,y;
 {
@@ -40,5 +40,5 @@
 }
 
-complex csub(x,y)
+complex cplx_sub(x,y)
 	complex x,y;
 {
@@ -50,5 +50,5 @@
 
 
-complex cmult(x,y)
+complex cplx_mult(x,y)
 	complex x,y;
 {
@@ -59,5 +59,5 @@
 }
 
-complex cdiv(x,y)
+complex cplx_div(x,y)
 	complex x,y;
 {
@@ -68,5 +68,5 @@
 }
 
-complex cexp(b)
+complex cplx_exp(b)
 	complex b;
 {
@@ -81,5 +81,5 @@
 
 
-complex csqrt(z)    //see Schaum`s Math Handbook p. 22, 6.6 and 6.10
+complex cplx_sqrt(z)    //see Schaum`s Math Handbook p. 22, 6.6 and 6.10
 	complex z;
 {
@@ -124,5 +124,5 @@
 }
 
-complex ccos(b)
+complex cplx_cos(b)
 	complex b;
 {
@@ -131,7 +131,7 @@
 	two = cassign(2.0,0.0);
 	i = cassign(0.0,1.0);
-	bi = cmult(b,i);
-	negbi = csub(zero,bi);
-	z = cdiv(cadd(cexp(bi),cexp(negbi)),two);
+	bi = cplx_mult(b,i);
+	negbi = cplx_sub(zero,bi);
+	z = cplx_div(cplx_add(cplx_exp(bi),cplx_exp(negbi)),two);
 	return z;
 }
Index: sansmodels/src/sans/models/c_extensions/libmultifunc/librefl.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/libmultifunc/librefl.h	(revision a24f530f78afcdef6c68238cd38554623b2bb2c6)
+++ sansmodels/src/sans/models/c_extensions/libmultifunc/librefl.h	(revision 8ff5cb3da7d659c05ad4b1db717b521b4257953b)
@@ -16,19 +16,19 @@
 complex cassign(double real, double imag);
 
-complex cadd(complex x,complex y);
+complex cplx_add(complex x,complex y);
 
 complex rcmult(double x,complex y);
 
-complex csub(complex x,complex y);
+complex cplx_sub(complex x,complex y);
 
-complex cmult(complex x,complex y);
+complex cplx_mult(complex x,complex y);
 
-complex cdiv(complex x,complex y);
+complex cplx_div(complex x,complex y);
 
-complex cexp(complex b);
+complex cplx_exp(complex b);
 
-complex csqrt(complex z);
+complex cplx_sqrt(complex z);
 
-complex ccos(complex b);
+complex cplx_cos(complex b);
 
 double intersldfunc(int fun_type, double n_sub, double i, double nu, double sld_l, double sld_r);
Index: sansmodels/src/sans/models/c_extensions/refl.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/refl.c	(revision 33aea7f36de30ed6b50cca51d327d976211f1547)
+++ sansmodels/src/sans/models/c_extensions/refl.c	(revision 8ff5cb3da7d659c05ad4b1db717b521b4257953b)
@@ -69,10 +69,10 @@
 
     phi = asin(lamda*q/(4.0*pi));
-    phi1 = cdiv(rcmult(phi,one),n_sup);
-    alpha = cmult(n_sup,ccos(phi1));
-	alpha2 = cmult(alpha,alpha);
+    phi1 = cplx_div(rcmult(phi,one),n_sup);
+    alpha = cplx_mult(n_sup,cplx_cos(phi1));
+	alpha2 = cplx_mult(alpha,alpha);
 
     nnp1=n_sub;
-    knp1=csqrt(rcmult(ko2,csub(cmult(nnp1,nnp1),alpha2)));  //nnp1*ko*sin(phinp1)
+    knp1=cplx_sqrt(rcmult(ko2,cplx_sub(cplx_mult(nnp1,nnp1),alpha2)));  //nnp1*ko*sin(phinp1)
     Xnp1=cassign(0.0,0.0);
     dz = 0.0;
@@ -102,13 +102,13 @@
 				}
 				nn = cassign(1.0-sld_i*pow(lamda,2.0)/(2.0*pi),0.0);
-				nn2=cmult(nn,nn);
-
-				kn=csqrt(rcmult(ko2,csub(nn2,alpha2)));        //nn*ko*sin(phin)
-				an=cexp(rcmult(dz,cmult(two,kn)));
-
-				fnm=csub(kn,knp1);
-				fnp=cadd(kn,knp1);
-				rn=cdiv(fnm,fnp);
-				Xn=cmult(an,cdiv(cadd(rn,Xnp1),cadd(one,cmult(rn,Xnp1))));    //Xn=an*((rn+Xnp1*anp1)/(1+rn*Xnp1*anp1))
+				nn2=cplx_mult(nn,nn);
+
+				kn=cplx_sqrt(rcmult(ko2,cplx_sub(nn2,alpha2)));        //nn*ko*sin(phin)
+				an=cplx_exp(rcmult(dz,cplx_mult(two,kn)));
+
+				fnm=cplx_sub(kn,knp1);
+				fnp=cplx_add(kn,knp1);
+				rn=cplx_div(fnm,fnp);
+				Xn=cplx_mult(an,cplx_div(cplx_add(rn,Xnp1),cplx_add(one,cplx_mult(rn,Xnp1))));    //Xn=an*((rn+Xnp1*anp1)/(1+rn*Xnp1*anp1))
 
 				Xnp1=Xn;
Index: sansmodels/src/sans/models/c_extensions/refl_adv.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/refl_adv.c	(revision a24f530f78afcdef6c68238cd38554623b2bb2c6)
+++ sansmodels/src/sans/models/c_extensions/refl_adv.c	(revision 8ff5cb3da7d659c05ad4b1db717b521b4257953b)
@@ -83,10 +83,10 @@
 
     phi = asin(lamda*q/(4.0*pi));
-    phi1 = cdiv(rcmult(phi,one),n_sup);
-    alpha = cmult(n_sup,ccos(phi1));
-	alpha2 = cmult(alpha,alpha);
+    phi1 = cplx_div(rcmult(phi,one),n_sup);
+    alpha = cplx_mult(n_sup,cplx_cos(phi1));
+	alpha2 = cplx_mult(alpha,alpha);
 
     nnp1=n_sub;
-    knp1=csqrt(rcmult(ko2,csub(cmult(nnp1,nnp1),alpha2)));  //nnp1*ko*sin(phinp1)
+    knp1=cplx_sqrt(rcmult(ko2,cplx_sub(cplx_mult(nnp1,nnp1),alpha2)));  //nnp1*ko*sin(phinp1)
     Xnp1=cassign(0.0,0.0);
     dz = 0.0;
@@ -124,13 +124,13 @@
 				}
 				nn = cassign(1.0-sld_i*pow(lamda,2.0)/(2.0*pi),pow(lamda,2.0)/(2.0*pi)*sldim_i);
-				nn2=cmult(nn,nn);
-
-				kn=csqrt(rcmult(ko2,csub(nn2,alpha2)));        //nn*ko*sin(phin)
-				an=cexp(rcmult(dz,cmult(two,kn)));
-
-				fnm=csub(kn,knp1);
-				fnp=cadd(kn,knp1);
-				rn=cdiv(fnm,fnp);
-				Xn=cmult(an,cdiv(cadd(rn,Xnp1),cadd(one,cmult(rn,Xnp1))));    //Xn=an*((rn+Xnp1*anp1)/(1+rn*Xnp1*anp1))
+				nn2=cplx_mult(nn,nn);
+
+				kn=cplx_sqrt(rcmult(ko2,cplx_sub(nn2,alpha2)));        //nn*ko*sin(phin)
+				an=cplx_exp(rcmult(dz,cplx_mult(two,kn)));
+
+				fnm=cplx_sub(kn,knp1);
+				fnp=cplx_add(kn,knp1);
+				rn=cplx_div(fnm,fnp);
+				Xn=cplx_mult(an,cplx_div(cplx_add(rn,Xnp1),cplx_add(one,cplx_mult(rn,Xnp1))));    //Xn=an*((rn+Xnp1*anp1)/(1+rn*Xnp1*anp1))
 
 				Xnp1=Xn;
