Issue 109861 - N() Function miscalculate, regression
Summary: N() Function miscalculate, regression
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: programming (show other issues)
Version: OOO320m12
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sc
URL:
Keywords: oooqa, regression
: 114297 (view as issue list)
Depends on:
Blocks:
 
Reported: 2010-03-06 00:25 UTC by wope
Modified: 2013-08-07 15:14 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description wope 2010-03-06 00:25:51 UTC
put "x" in A1
in A2 =N(A1) , the result is ##VALUE, in 3.1.1 the result is 0
if you say =N("x"), the result is zero
Comment 1 Regina Henschel 2010-03-06 12:58:58 UTC
The semantic is changed. See issue 86721, where the old semantic has bee set.
Unfortunately ODFF 1.2 does not define it, "5.13.26 N [..] It is
implementation-defined what happens if it is provided a Text value." I think OOo
should be consistently over the versions.

Same kind of error: Write ="123" in A1, result of =N(A1) is 0 in OOo3.1.1 but is
number 123 in OOo 3.2.

Comment 2 wope 2010-03-06 17:13:59 UTC
In Help stanfs for the N function

N
Returns the numeric value of the given parameter. Returns 0 if parameter is
text, FALSE or #NA.
If an error occurs, other than #NA, the function returns the error value.
Syntax
N(Value)
Value is the parameter to be converted into a number. N() returns the numeric
value if it can. It returns the logical values TRUE and FALSE as 1 and 0
respectively. It returns text and errors as 0.
Example
=N(123) returns 123
=N(TRUE) returns 1
=N(FALSE) returns 0
=N("abc") returns 0
=N(1/0) returns #DIV/0!

either the help is wrong or the implemantation.
This is another incompatible change to MS
Comment 3 wope 2010-03-06 22:51:06 UTC
=SUM(A1) works right
Comment 4 ooo 2010-03-08 10:15:24 UTC
N("string") should yield 0 again, also for Excel interoperability.
Taking over.
Comment 5 ooo 2010-03-09 12:01:13 UTC
In cws dr73:

changeset ed6958bd4b64
http://hg.services.openoffice.org/cws/dr73/changeset/ed6958bd4b64
M sc/source/core/inc/interpre.hxx
M sc/source/core/tool/interpr1.cxx
M sc/source/core/tool/interpr4.cxx

You can observe the progress and possible integration date of CWS dr73 at
http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fdr73
Comment 6 wope 2010-03-11 11:28:47 UTC
ok in DEV300 m74
Comment 7 ooo 2010-03-12 12:35:24 UTC
No, this is not in m74! Please use the original test case, enter text in A1 and
in A2 =N(A1)
Comment 8 ooo 2010-03-12 12:36:10 UTC
Setting fixed again.
Comment 9 ooo 2010-03-17 18:46:02 UTC
Reassigning to QA for verification.
Comment 10 oc 2010-04-08 10:47:22 UTC
verified in internal build cws_dr73
Comment 11 wope 2010-04-13 23:06:10 UTC
in m76 the error again occurs
Comment 12 oc 2010-04-20 13:25:26 UTC
=>wope: The cws is not yet integrated in m76. Please wait for m77 (hopefully)
Comment 13 oc 2010-04-20 13:25:55 UTC
back to verified
Comment 14 wope 2010-04-25 23:22:22 UTC
I've testet it in m77, the error still occurs
Comment 15 jbf.faure 2010-05-30 18:23:02 UTC
It is fixed in dev300m78.
Regards. JBF
Comment 16 wope 2010-06-25 21:00:22 UTC
ok, it is now fixed. I'll close it
Comment 17 wope 2010-06-25 21:01:03 UTC
closed
Comment 18 wope 2010-09-04 19:45:08 UTC
*** Issue 114297 has been marked as a duplicate of this issue. ***