Bug 127746 - Computation error with negative sign in some instances
Summary: Computation error with negative sign in some instances
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2019-09-24 13:57 UTC by oliver.schib
Modified: 2019-09-26 11:18 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description oliver.schib 2019-09-24 13:57:59 UTC

In le calc
the expression
should evaluate to ~0.28. But it evaluates to ~3.5.
It can be 'fixed' by adding a "1*":
So the negative sign seems to be the problem.
However it is not clear (to me at least), why this happens here and not elsewhere. E.g. exp(-5) and exp(-(5)) evaluate correctly.

Steps to Reproduce:
1. Enter =EXP(-1*(LOG(A25)-LOG(0.08))^2/(2*0.69^2)) into a cell and hit Enter key.

Actual Results:

Expected Results:

Reproducible: Always

User Profile Reset: No

Additional Info:
Comment 1 Xisco Faulí 2019-09-25 15:16:13 UTC
What's the value of A25 ?

Please attach a sample document, as this makes it easier for us to verify the bug. 
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Comment 2 GerardF 2019-09-25 19:35:01 UTC
-5^2 is evaluate in Calc (& Excel) as (-5)^2 and not -(5^2).
The minus sign apply to the following number, not to the whole calculation.

It is not a bug.
Comment 3 oliver.schib 2019-09-26 11:18:23 UTC
@ Xisco Faulí
A25 is just 1.
Sorry forgot to replace it.

Thanks, that seems to be it.
Confusing, but apparently not a but...