Commit 7f197297 authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Don't look closely if the result is an int because it no longer matters.

2006-04-12  Morten Welinder  <terra@gnome.org>

	* src/expr.c (bin_arith): Don't look closely if the result is an
	int because it no longer matters.
parent ca299eed
2006-04-12 Morten Welinder <terra@gnome.org>
* src/expr.c (bin_arith): Don't look closely if the result is an
int because it no longer matters.
* src/number-match.c (format_match_decimal_number): Fix FMR.
(format_match_simple): Don't do the integer dance. (And don't do
it with two left feet either.)
......
2006-04-12 Morten Welinder <terra@gnome.org>
* src/expr.c (bin_arith): Don't look closely if the result is an
int because it no longer matters.
* src/number-match.c (format_match_decimal_number): Fix FMR.
(format_match_simple): Don't do the integer dance. (And don't do
it with two left feet either.)
......
......@@ -727,9 +727,7 @@ bin_arith (GnmExpr const *expr, GnmEvalPos const *ep,
g_assert_not_reached ();
}
if (res >= INT_MIN && res <= INT_MAX && res == (ires = (int)res))
return value_new_int (ires);
else if (gnm_finite (res))
if (gnm_finite (res))
return value_new_float (res);
else
return value_new_error_NUM (ep);
......
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