"magic brackets" in GNUmeric



Dear list,

I've just discovered that GNUmeric 1.12.9 running as a portable 
application on my Win7x64Prof shows the same "uncanny powers of 
parentheses" (W. Kahan) as Excel does. For example, if n>0, x(n) = 
1/2^n, y(n) = 1- x(n), and z(n) = 1- y(n), then calculations in 
IEEE754 DP mode should yield z(n) = x(n) up to n = 53. This holds true
in case of GNUmeric 1.12.6, which is the version shipping with my 
Ubuntu 13.10 x64. On the contrary, the GNUmeric portable app version 
1.12.9 running on my Win7x64Prof yields z(n) = 0 for n>=50, and this 
is exactly equal to what XL14x64 gives me. Enclosing this difference 
in parentheses, i.e. defining z_p(n) = (1-y(n)), yields z_p(n) = x(n) 
for n <= 53, again exactly mimicking XL's output. I checked this using
the newly implemented hexrep function, many thanks to the developer(s)
for implementing it!! 

In case somebody besides me likes the output of hexrep to show up in 
big endian byte order with spaces between the bytes on a little endian
machine, here is my "trick":
enter =upper(hexrep(some_value)) in cell XY, and
=right(XY,2)&" "&mid(XY,13,2)&" "&mid(XY,11,2)&" "&mid(XY,9,2)&" 
"&mid(XY,7,2)&" "&mid(XY,5,2)&" "&mid(XY,3,2)&" "&left(XY,2)
in the cell where you want the "pretty print" version of hexrep to 
show up.

So my question is whether introducing these "magic brackets" on Win 
happens because GNUmeric calls some Win dlls, or wether it has been 
explicitly added in order to exactly mimic XL?

FYI: all forks of openoffice I managed to get my hands on yield the 
correct result for n <= 48  only, and do not implement "magic 
brackets".

All the best
Schorsch



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]