Andreas J. Guelzow wrote:
> On Sat, 2008-02-02 at 12:55 +1100, John Machin wrote:
>   
>> Hello,
>> Here's the results of a little experiment (start up the UI, type 
>> =sqrt(2) into cell A1, save as ...) for a few varieties of XML 
>> spreadsheet file formats:
>>
>> [my comments in [], whitespace adjusted by me]
>>
>> Excel 2007 .xlsx file:
>> <c r="A1">
>>     <f>SQRT(2)</f>
>>     <v>1.4142135623730951</v> [OK]
>> </c>
>>
>> Excel 2003 "Save as XML Spreadsheet":
>> <Cell ss:Formula="=SQRT(2)">
>>     <Data ss:Type="Number">1.4142135623730951</Data> [OK]
>> </Cell>
>>
>> OpenOffice.org Calc 2.x .ods file:
>> <table:table-cell table:formula="oooc:=SQRT(2)" 
>> office:value-type="float" office:value="1.4142135623731"> [only 14 
>> digits of precision]
>>     <text:p>1.41</text:p>
>> </table:table-cell>
>>
>> Gnumeric [1.6.3, Windows] .gnumeric file:
>> <gnm:Cell Col="0" Row="0">=sqrt(2)</gnm:Cell> [no result at all]
>>
>> Bug or feature? Is it fixed in the 1.8.1 release?
>>     
>
> I don't see a bug or feature...
>
> Excel 2007, 2003 and OO 2.x appear to give 2 values for each cell (and
> those values are even the same since none of the given floating point
> values are equal to the square root of 2.)
>
> So Gnumeric is more consistent by giving just one value.
>
>   
I think that what you are trying to say is that it is impossible to 
represent the square root of 2 exactly as a floating-point number. This 
is true/well-known/irrelevant. What is of *practical* interest is the 
actual FP result of evaluation of any formula, irrespective of whether 
the result can be represented exactly or not. The two Excel outputs give 
in this case what appears to be the nearest possible FP result.  OO 2.x 
records an inaccurate result. Gnumeric gives *ZERO* results.
_______________________________________________
gnumeric-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnumeric-list

Reply via email to