User:Hossein/Blog/own

EasyHack: Use std functions instead of our own implementation
Historically speaking, some functions including various mathematical functions were not available in the early versions of C/C++. In order to use those functions inside LibreOffice, these functions were implemented internally.

For an example, some (inverse) hyperbolic and trigonometric functions like  and   were not available in the early versions of C++ std.

Look at this gerrit submission:

Use  and   instead of ours
 * https://gerrit.libreoffice.org/c/core/+/132316

Instead of our own implementation inside LibreOffice, we now can use  and   from, available since C++11:
 * https://en.cppreference.com/w/cpp/numeric/math/asinh

The underlying methods from  are available since C99:
 * https://en.cppreference.com/w/c/numeric/math/asinh

The reason provided in f70de5267d7d9b7b6946cd72fe26e91bb6ac8431 to provide an internal implementation was that asinh and acosh were "part of the C99 standard, but not provided by some compilers". This was true at that time, but is no longer the case as the methods are now well established.

Final Notes
Besides fixing the bugs, there are many places to work on improving the code, and some of these are listed as EasyHacks. The specific improvement that is discussed in this blog post is filed as tdf#123.

If you want to work on this improvement, but you need to know how to get started with LibreOffice development, I suggest you to see our video tutorial:


 * YouTube: Getting Started with LibreOffice Development