AVG function returns always integer class value
a5-stable opened this issue · 2 comments
a5-stable commented
I am having trouble getting an accurate result when using the AVG function with decimal values。
For example, when I run AVG(2, 3),
c = Dentaku::Calculator.new
c.evaluate!("AVG(2, 3)")
# expected value
#=> 2.5
# actual value
#=> 2
I think that the result should be 2.5.
a5-stable commented
I made PR #294 to fix this.
If you have some free time, please take a look and let me know your thoughts, thank you 🙇♀️
a5-stable commented
the fix was merged, thank you 🙇♀️