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

function/stdlib: Preserve infinity for floor/ceil #51

Merged

Conversation

alisdair
Copy link
Contributor

floor(±infinity) and ceil(±infinity) would previously return the max/min limit of int64. This could lead to confusing behaviour. Instead, we want to pass through the infinite value without converting to integer.

From hashicorp/terraform#21463

floor(±infinity) and ceil(±infinity) would previously return the max/min
limit of int64. This could lead to confusing behaviour. Instead, we want
to pass through the infinite value without converting to integer.
@codecov
Copy link

codecov bot commented Mar 25, 2020

Codecov Report

Merging #51 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
+ Coverage   70.28%   70.30%   +0.01%     
==========================================
  Files          79       79              
  Lines        7098     7102       +4     
==========================================
+ Hits         4989     4993       +4     
  Misses       1666     1666              
  Partials      443      443              
Impacted Files Coverage Δ
cty/function/stdlib/number.go 72.44% <100.00%> (+0.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0b5d9cf...68c3af2. Read the comment docs.

@apparentlymart
Copy link
Collaborator

Thanks! This looks good to me. 🎉

@apparentlymart apparentlymart merged commit 6ac89ea into zclconf:master Mar 25, 2020
@alisdair alisdair deleted the alisdair/floor-ceil-infinity branch April 6, 2020 13:20
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

Successfully merging this pull request may close these issues.

2 participants