summaryrefslogtreecommitdiff
path: root/limbo/types.c
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-23 00:30:12 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-23 00:30:12 +0000
commit6e425a9de8c003b5a733621a6b6730ec3cc902b8 (patch)
tree314123bcab78ff295f38f85f31dc141e5fe22d15 /limbo/types.c
parent74a4d8c26dd3c1e9febcb717cfd6cb6512991a7a (diff)
20061220
Diffstat (limited to 'limbo/types.c')
-rw-r--r--limbo/types.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/limbo/types.c b/limbo/types.c
index 449b53d7..04115207 100644
--- a/limbo/types.c
+++ b/limbo/types.c
@@ -4403,10 +4403,10 @@ ispow2(double x)
}
static int
-round(double x, int n, int *m)
+fround(double x, int n, int *m)
{
if(n != 31)
- fatal("not 31 in round");
+ fatal("not 31 in fround");
return nf(x, m);
}
@@ -4418,7 +4418,7 @@ fixmul2(double sx, double sy, double sr, int *rp, int *ra)
alpha = (sx*sy)/sr;
n = 31;
- k = round(1/alpha, n, &a);
+ k = fround(1/alpha, n, &a);
*rp = 1-k;
*ra = 0;
return IMULX;
@@ -4432,7 +4432,7 @@ fixdiv2(double sx, double sy, double sr, int *rp, int *ra)
beta = sx/(sy*sr);
n = 31;
- k = round(beta, n, &b);
+ k = fround(beta, n, &b);
*rp = k-1;
*ra = 0;
return IDIVX;
@@ -4449,7 +4449,7 @@ fixmul(double sx, double sy, double sr, int *rp, int *ra)
if(ispow2(alpha))
return fixmul2(sx, sy, sr, rp, ra);
n = 31;
- k = round(1/alpha, n, &a);
+ k = fround(1/alpha, n, &a);
m = n-k;
if(m < -n-1)
return IMOVW; /* result is zero whatever the values */
@@ -4480,7 +4480,7 @@ fixdiv(double sx, double sy, double sr, int *rp, int *ra)
if(ispow2(beta))
return fixdiv2(sx, sy, sr, rp, ra);
n = 31;
- k = round(beta, n, &b);
+ k = fround(beta, n, &b);
m = k-n;
if(m <= -2*n)
return IMOVW; /* result is zero whatever the values */