LO calc formulas

antlists antlists at youngman.org.uk
Sun Dec 13 21:53:44 UTC 2020

On 11/12/2020 20:41, Dante Doménech wrote:
> I've been digging into calc code. And it makes me wonder about a few things.
> First, in here: core 
> <https://opengrok.libreoffice.org/xref/core/>/include 
> <https://opengrok.libreoffice.org/xref/core/include/>/rtl 
> <https://opengrok.libreoffice.org/xref/core/include/rtl/>/math.hxx 
> <https://opengrok.libreoffice.org/xref/core/include/rtl/math.hxx>
> We have our own isnan, isinf, isfinite, ... and some of them with quite 
> strange code.
> Why is the default c++ standard library isn't good enough?
> The same goes for floor / ceil / round ...
> Thank you for your time.

I believe git blame is your friend - when was this code last modified?

It may have been written before the c++ standard library (probably not). 
It may have been written by someone who didn't realise those functions 
were in the standard library (you'd be surprised - I've seen that!). It 
may have been written way back when before the c++ library had the **** 
optimised out of it.

It's probably a safe bet that, however it got in to the code base, 
everybody since has taken the attitude "if it ain't broke, don't fix it".


More information about the LibreOffice mailing list