Issue 122171 - Function to return roots of quadratic equation
Summary: Function to return roots of quadratic equation
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: 4.0.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2013-04-26 13:41 UTC by Edwin Sharp
Modified: 2017-05-20 09:55 UTC (History)
3 users (show)

See Also:
Issue Type: FEATURE
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description Edwin Sharp 2013-04-26 13:41:35 UTC
Quadratic function ax^2+bx+c=0

Proposed added function:
=quadratic(a,b,c,1) will return (-b+sqrt(b^2-4ac))/(2a)
=quadratic(a,b,c,2) will return (-b-sqrt(b^2-4ac))/(2a)
Comment 1 Rainer Bielefeld 2013-05-11 06:19:36 UTC
A major condition for such requests is ODF compliance. AOO should not add functions what can not work if the document will be opened in with a different software.

@ Edwin Sharp 
Did you already check whether there something like your requests exists in ODF definitions? The manuals can be ofund here: <>
Comment 2 Edwin Sharp 2013-05-11 17:06:10 UTC
So a precondition to improve our software is that the improvement already present in a different software like Excel, Gnumeric or Corel Calculate?

This is absurd.
Comment 3 Ariel Constenla-Haile 2013-05-11 17:18:36 UTC
In fact, Calc functions can even be developed by extensions.

The functions need not be defined in the ODF standard.
The standard must be followed *only* when implementing a function defined in it, in such case, following the standard means that the behavior must be the one described there.

And this quadratic function is a good example for starting a pool for ideas about spreadsheet functions that would be good to develop as extensions. Feel free to start and populate a wiki page, for example
Comment 4 Edwin Sharp 2013-05-11 18:47:16 UTC
Thanks Ariel!
Comment 5 Rob Weir 2013-05-11 23:08:09 UTC
Ariel is correct.  ODF defines an extensibility mechanism for spreadsheet functions, where new ones can be included in a document, so long as it is not in the standard-defined XML namespace.   ODF only defined the most-common functions, the common overlap among implementations.  It should be possible to add more functions, either core or as extensions.
Comment 6 Rainer Bielefeld 2013-05-12 06:19:30 UTC
That's well known. And of course AOO should be interested in enhancing range of available functions. The question is how that can be done the best way. It is not a good idea to break compatibility in the ODF world without good reasons. Such efforts might bring some "technology leader bonus points" for AOO, but discredit for ODF because of compatibility issues.

So the first check always should be whether such a new function already is defined in ODF specifications, only not implemented. Such a "missing" function simply should be added as soon as possible, AOO examples for such work are 
* Bug 101466 - ODFF: implement AVERAGEIF and AVERAGEIFS
* Bug 95144 - ODFF: implement SUMIFS()
* Bug 90269 - ODFF: implement COUNTIFS function
and may be others.

If not defined in ODF, it might be the best idea to gather such "good idea but undefined" functions in an Extension. And a good first step (I totally agree with Ariel) is a Wiki page (in a Category "New Calc functions" or whatever) with a clear definition, what in an ideal world might lead to a Basic code snippet, what will be integrated in an Extension, and some day the functions in such an Extensions become integrated into AOO core.

And for that a tracking Bug here in Bugzilla might be useful, everybody having a problem looks ifrst in Bugzilla whether it's already known, and links to the Wiki  with specifications might invite some users to contribute.