[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
division of integers by floats
From: |
Richard Stallman |
Subject: |
division of integers by floats |
Date: |
Wed, 05 May 2004 16:21:14 -0400 |
It seems like this is the best change to make. Does it give correct
results?
*** data.c 27 Apr 2004 04:36:00 -0400 1.235
--- data.c 05 May 2004 14:09:22 -0400
***************
*** 2520,2525 ****
--- 2520,2533 ----
default:
break;
}
+
+ /* For division, if any arg is a float, do the computation
+ in floating point. */
+ if (code == Adiv)
+ for (argnum = 0; argnum < nargs; argnum++)
+ if (FLOATP (args[argnum]))
+ return float_arith_driver ((double) accum, 0, code,
+ nargs, args);
for (argnum = 0; argnum < nargs; argnum++)
{
- division of integers by floats,
Richard Stallman <=