[Bug 152943] GetErrCode() doesn't work as expected on RISC-V due to floating-point NaN payload not being propagated

2024-03-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152943

Sakura286  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #12 from Sakura286  ---
Here is the patch which add NaN payload check at app startup.

https://gerrit.libreoffice.org/c/core/+/165391

The content of the patch:

1. check nan payload on app startup
2. emit signal to call 'CreateNanPayloadWarningDialog()'
3. the factory creates dialog
4. record property 'ShowNanPayloadWarning' persistent

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 152943] GetErrCode() doesn't work as expected on RISC-V due to floating-point NaN payload not being propagated

2024-02-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152943

--- Comment #11 from Eike Rathke  ---
#3 is not possible as there is no non-NaN-payload mode implemented, and
implementing it would require not only different error handling but also
different transport of errors between intermediary results up to final results
of a formula expression; while technically possible I wouldn't call it feasible
or viable, as the effort would be huge, add even more runtime penalty, and
possibly overlooking things adds uncertainty.

#2 might work to some degree, someone would have to actually try on such an
inferior architecture what happens. My (hopeful) guess is that _some_ NaN is
transported so there will be _some_ error (e.g. indicating numeric failure) but
any detail about what specific error will be lost. But that also means that
code reacting on specific error information will fail, so not everything will
work.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 152943] GetErrCode() doesn't work as expected on RISC-V due to floating-point NaN payload not being propagated

2024-01-31 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152943

--- Comment #10 from Sakura286  ---
I prefer #2, too.

I am wondering whether #2 is acceptable by community. If so, I am willing to do
a bit of work on this.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 152943] GetErrCode() doesn't work as expected on RISC-V due to floating-point NaN payload not being propagated

2024-01-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152943

--- Comment #9 from Rene Engelhard  ---
I'd personally prefer 2.

1. has the problem that one still ships libreoffice-calc. Shipping something
which doesn't work (fails on start, even with a message) is not good.

Or 3, but I don't think there's such a mode (yet). And if we had such a mode we
wouldn't need that NaN payload thingy at all.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 152943] GetErrCode() doesn't work as expected on RISC-V due to floating-point NaN payload not being propagated

2024-01-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152943

--- Comment #8 from Sakura286  ---
(In reply to Eike Rathke from comment #5)

> We might have to have a runtime check in Calc as well and bail out if NaN
> payloads are not supported.

Yes, a compile time check cannot guarantee that this functionality works well
at runtime. So what behaviour should Calc take when detects the lack of NaN
payload support at runtime?

As I understand it, there might be three solutions:

1. Giving a warning and shutting down calc.
2. Giving a warning and disclaimer. Calc continues running.
3. Silently switch to a non-NaN payload mode.

For #1, maybe it is a bit distructive to directly rule out RISC-V as a
supported platform. #2 is a transitional solution. For #3, is it possible to
add this feature?

According to my observation, on riscv64, Calc does return error code when a
formula error occurs, but sometimes it returns wrong error code '#NUM'.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 152943] GetErrCode() doesn't work as expected on RISC-V due to floating-point NaN payload not being propagated

2024-01-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152943

--- Comment #7 from Eike Rathke  ---
No explicit documents, but Calc heavily uses quiet NaNs to transport and
propagate any runtime error in the calculation interpreter engine and relies on
NaN payload propagation in all math operators.
See CreateDoubleError() and GetDoubleErrorValue() at
https://opengrok.libreoffice.org/xref/core/include/formula/errorcodes.hxx?r=807f238f#96
and their use
https://opengrok.libreoffice.org/s?refs=CreateDoubleError=core
https://opengrok.libreoffice.org/s?refs=GetDoubleErrorValue=core

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 152943] GetErrCode() doesn't work as expected on RISC-V due to floating-point NaN payload not being propagated

2024-01-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152943

--- Comment #6 from Chen Xuan  ---
Currently NaN payload are not supported by most RISC-V machines. It might be
necessary for RISC-V porters to know which component is affected by NaN
payload.

Are there any documents that describe how NaN payload work in LibreOffice?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152943] GetErrCode() doesn't work as expected on RISC-V due to floating-point NaN payload not being propagated

2023-07-21 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152943

BogdanB  changed:

   What|Removed |Added

 Blocks||108827
 CC||buzea.bog...@libreoffice.or
   ||g


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=108827
[Bug 108827] [META] Calc functions bugs and enhancements
-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152943] GetErrCode() doesn't work as expected on RISC-V due to floating-point NaN payload not being propagated

2023-03-15 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152943

--- Comment #5 from Eike Rathke  ---
From
https://groups.google.com/a/groups.riscv.org/g/isa-dev/c/g79dHlV4B_k/m/dtlPNaq8AwAJ
"Implementors are free to provide a NaN payload propagation scheme as a
nonstandard extension enabled by a nonstandard operating mode."
I deduce that there may be RISC-V systems that support propagating NaN
payloads. So with bad luck a build, even if it did make check on such system,
would not run properly on systems that do not support the extension.

We might have to have a runtime check in Calc as well and bail out if NaN
payloads are not supported.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152943] GetErrCode() doesn't work as expected on RISC-V due to floating-point NaN payload not being propagated

2023-03-15 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152943

Eike Rathke  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
Version|7.6.0.0 alpha0+ Master  |Inherited From OOo
 OS|Linux (All) |All

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152943] GetErrCode() doesn't work as expected on RISC-V due to floating-point NaN payload not being propagated

2023-03-15 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152943

--- Comment #4 from Commit Notification 
 ---
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2fd915b7d2d2a9e25600a07587ab01d23bffbc58

Related: tdf#152943 Test that a quiet NaN payload is propagated

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152943] GetErrCode() doesn't work as expected on RISC-V due to floating-point NaN payload not being propagated

2023-03-15 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152943

Commit Notification  changed:

   What|Removed |Added

 Whiteboard||target:7.6.0

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152943] GetErrCode() doesn't work as expected on RISC-V due to floating-point NaN payload not being propagated

2023-01-09 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152943

Eike Rathke  changed:

   What|Removed |Added

Summary|GetErrCode() doesn't work   |GetErrCode() doesn't work
   |as expected on RISC-V due   |as expected on RISC-V due
   |to invalid floating-point   |to floating-point NaN
   |operation in KahanSum   |payload not being
   ||propagated

-- 
You are receiving this mail because:
You are the assignee for the bug.