Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behaviour of AVG and Q.AVG? #38

Closed
samdoshi opened this issue Apr 14, 2016 · 4 comments
Closed

Behaviour of AVG and Q.AVG? #38

samdoshi opened this issue Apr 14, 2016 · 4 comments
Assignees

Comments

@samdoshi
Copy link
Collaborator

At the moment AVG and Q.AVG perform integer division when calculating the average.

e.g.

AVG 2 3
>>> 2

Should they round instead?

@tehn
Copy link
Member

tehn commented Apr 16, 2016

i can definitely see that as being desirable!

On Thu, Apr 14, 2016 at 10:05 AM, Sam Doshi notifications@github.com
wrote:

At the moment AVG and Q.AVG perform integer division when calculating the
average.

e.g.

AVG 2 3

2

Should they round instead?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#38

@samdoshi samdoshi self-assigned this Apr 16, 2016
burnsauce added a commit to burnsauce/teletype that referenced this issue Sep 4, 2017
@burnsauce
Copy link
Contributor

burnsauce commented Sep 4, 2017

In the PR, AVG -32767 -32768 == -32767 and AVG 32766 32767 == 32767, which is "round up" not "round away from zero".

burnsauce added a commit to burnsauce/teletype that referenced this issue Sep 4, 2017
AVG -32767 -32768 == -32767
AVG 32767 32766 == 32767
burnsauce added a commit to burnsauce/teletype that referenced this issue Sep 4, 2017
@burnsauce
Copy link
Contributor

GNU C round() goes away from zero.

@tehn
Copy link
Member

tehn commented Sep 12, 2017 via email

@tehn tehn closed this as completed in ad358cd Oct 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants