The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 sum_* returns rounded values in row mode
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

AKazak

Russia
1228 Posts

Posted - 10/26/2022 :  03:56:52 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 2022b (64-bit) SR1 9.9.5.167
Windows 7 Pro SP1 x64

Greetings!

https://www.originlab.com/doc/en/LabTalk/ref/Sum-func tells:
quote:
In "row" mode
Returns a dataset of sums by row. Temporary datasets are also created to hold several related values generated by this syntax: _mean, _sd, _max, _min, _range, _npts.


However I discovered that _mean returns integer part of mean instead of mean. I assume that _sd, _max, _min, _range, _npts also deliver rounded values.

---
Andrey

YimingChen

1683 Posts

Posted - 10/26/2022 :  11:38:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I couldn't reproduce the issue. Can you double check?


James
Go to Top of Page

AKazak

Russia
1228 Posts

Posted - 10/26/2022 :  3:24:08 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by YimingChen

I couldn't reproduce the issue. Can you double check?


James



I use the following syntax:
sum(WorksheetNameorIndex, col1, col2);



---
Andrey
Go to Top of Page

YimingChen

1683 Posts

Posted - 10/26/2022 :  3:59:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
try this


Go to Top of Page

AKazak

Russia
1228 Posts

Posted - 10/27/2022 :  06:01:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by YimingChen

try this




SUM still delivers the rounded result with the suggested syntax.

Besides, I observe the same behavior with the following syntax:


---
Andrey

Edited by - AKazak on 10/27/2022 06:01:37 AM
Go to Top of Page

YimingChen

1683 Posts

Posted - 10/27/2022 :  09:56:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Can you share your workbook? I couldn't reproduce. Thank you.


James
Go to Top of Page

AKazak

Russia
1228 Posts

Posted - 10/31/2022 :  01:31:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by YimingChen

Can you share your workbook? I couldn't reproduce. Thank you.


James



Dear James,

Here you are:
https://my.originlab.com/ftp/forum_and_kbase/Images/sum_mean%202022-10-31.zip

---
Andrey
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000