You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great catch. I looked into it, and it seems like it's wrapping around due to integer overflow while taking the average of the middle two values (since the count is even).
low: [-85], high: -56, median: 57 datatype: Int8
-85 + -56 = -141 -> wraparound to 115
Then 115 / 2 -> 57.5 -> 57 (truncated due to integer type)
What's our desired behavior in this case? We could promote to a larger datatype to perform the calculation. Also is it intentional to return the value as a truncated integer instead of a float?
Hi @Yuvraj-cyborg ,
just checking in — are you still working on this issue?
If you're busy or no longer planning to continue, I'd be happy to pick it up. Thanks!
Activity
[-]Median() truncates integers[/-][+]bug: Median() truncates integers[/+]Yuvraj-cyborg commentedon Dec 29, 2025
take
CuteChuanChuan commentedon Apr 18, 2026
Hi @Yuvraj-cyborg ,
just checking in — are you still working on this issue?
If you're busy or no longer planning to continue, I'd be happy to pick it up. Thanks!
Yuvraj-cyborg commentedon Apr 21, 2026
@CuteChuanChuan feel free to pick it, got busy lately