Closed yorickhardy closed 6 months ago
R7RS requires (round x) to round to even when x is halfway between two integers. The current implementation uses round() which rounds away from zero.
This pull request adds two tests for the half integer behavior, and an implementation that rounds to even for the half integer case.
This is great - thanks for the PR @yorickhardy!
R7RS requires (round x) to round to even when x is halfway between two integers. The current implementation uses round() which rounds away from zero.
This pull request adds two tests for the half integer behavior, and an implementation that rounds to even for the half integer case.