Commit a1f3b1b0 authored by Morten Welinder's avatar Morten Welinder

LOG2: fix accuracy. Again.

parent 3a6c3682
2014-03-17 Morten Welinder <terra@gnome.org>
* src/mathfunc.c (gnm_log2): Normalize to ]0.5;1], not [0.5;1[.
2014-03-16 Morten Welinder <terra@gnome.org>
* src/expr.c (gnm_expr_eval): Survive dynamic deps in conditional
......
......@@ -31,6 +31,7 @@ Morten:
* Fix crash reading strange xls file. [Redhat #1076912]
* Fix problem clearing existing values in some xlsx cells. [#726297]
* Fix criticals for dynamic deps in conditional formats. [#726163]
* Fix LOG2 problem. [#726464]
--------------------------------------------------------------------------
Gnumeric 1.12.12
......
......@@ -327,6 +327,8 @@ gnm_log2 (gnm_float x)
/* This split ensures accurate integer results for 2^x. */
x = gnm_frexp (x, &e);
if (x == 0.5)
x = 1.0, e--;
return e + gnm_log (x) / M_LN2gnum;
}
......
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