https://bugs.documentfoundation.org/show_bug.cgi?id=99996

--- Comment #6 from Laurent BP <[email protected]> ---
(In reply to Wolfgang Jäger from comment #5)
> (In reply to Laurent BP from comment #4)
> ...
> > I can confirm this bug in OOo 3.3.0
> > Set as New. Change version.
> 
> This bug#99996 is still present in AOO4.1.2, the forgetting of user formats,
> too. 
> 
> To anybody who may address the issue of wrong results when formats of the
> fraction type are used: 
> I can provide a well tested algorithm for the task (coded in BASIC e.g.). 

Fractions are determined in SvNumberformat::ImpGetFractionOutput here:
http://opengrok.libreoffice.org/xref/core/svl/source/numbers/zformat.cxx#ImpGetFractionOutput

You may propose improvements of Farey sequence algorithm. But the code is
limiting to 3 digits the maximum number of digits in fraction. See:
http://opengrok.libreoffice.org/xref/core/svl/source/numbers/zformat.cxx#MAX_FRACTION_PREC

For higher number of digits, a simpler (and less accurate as you noticed)
algorithm is used. See:
http://opengrok.libreoffice.org/xref/core/svl/source/numbers/zformat.cxx#2612

What should be the maximum number of digits of denominator for Farey sequence
algorithm? You must take into account computing time and readability:
254136/527748 is not quite understandable.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to