Commit 91a13901 authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Use gpow10. (gnumeric_dollarfr): Ditto.

2002-07-16  Morten Welinder  <terra@diku.dk>

	* functions.c (gnumeric_dollarde): Use gpow10.
	(gnumeric_dollarfr): Ditto.
parent 74650b15
2002-07-16 Morten Welinder <welinder@rentec.com>
* functions.c (gnumeric_dollarde): Use gpow10.
(gnumeric_dollarfr): Ditto.
2002-07-16 Morten Welinder <terra@diku.dk>
* functions.c (gnumeric_yield): Use existing root finding
......
......@@ -34,6 +34,7 @@
#include <datetime.h>
#include <value.h>
#include <str.h>
#include <mathfunc.h>
#include <math.h>
#include <limits.h>
......@@ -1186,8 +1187,7 @@ gnumeric_dollarde (FunctionEvalInfo *ei, Value **argv)
floored = floor (fractional_dollar);
rest = fractional_dollar - floored;
return value_new_float (floored + ((gnum_float) rest * powgnum (10, n) /
fraction));
return value_new_float (floored + rest * gpow10 (n) / fraction);
}
/***************************************************************************/
......@@ -1228,8 +1228,7 @@ gnumeric_dollarfr (FunctionEvalInfo *ei, Value **argv)
floored = floor (fractional_dollar);
rest = fractional_dollar - floored;
return value_new_float (floored + ((gnum_float) (rest * fraction) /
powgnum (10, n)));
return value_new_float (floored + rest * fraction / gpow10 (n));
}
/***************************************************************************/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment