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

Use predefined PHP float epsilon #4873

Closed
wants to merge 1 commit into from
Closed

Use predefined PHP float epsilon #4873

wants to merge 1 commit into from

Conversation

marijnvanwezel
Copy link
Contributor

Instead of using an arbitrary epsilon, use the predefined PHP constant PHP_FLOAT_EPSILON, which is defined to be the smallest representable positive number "x", such that "x + 1.0 != 1.0".

See https://www.php.net/manual/en/reserved.constants.php#constant.php-float-epsilon for additional information.

Instead of using an arbitrary epsilon, use the predefined PHP constant PHP_FLOAT_EPSILON, which is defined to be the smallest representable positive number "x", such that "x + 1.0 != 1.0".

See https://www.php.net/manual/en/reserved.constants.php#constant.php-float-epsilon for additional information.
@codecov
Copy link

codecov bot commented Jan 23, 2022

Codecov Report

Merging #4873 (f27a65d) into 9.5 (e354bc6) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##                9.5    #4873   +/-   ##
=========================================
  Coverage     84.08%   84.08%           
  Complexity     4631     4631           
=========================================
  Files           274      274           
  Lines         12683    12683           
=========================================
  Hits          10665    10665           
  Misses         2018     2018           
Impacted Files Coverage Δ
src/Framework/Constraint/IsIdentical.php 100.00% <100.00%> (ø)

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 e354bc6...f27a65d. Read the comment docs.

@sebastianbergmann
Copy link
Owner

Can you send this against 8.5, please? Thanks!

@marijnvanwezel
Copy link
Contributor Author

@sebastianbergmann Thanks, I'll make a new PR for this, since this one is based on marijnvanwezel/9.5 and it would be confusing to merge it into 8.5. I should have used a separate branch to create this pull request, but I didn't.

@marijnvanwezel
Copy link
Contributor Author

Closed in favour of #4874 (see comment above).

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.

None yet

2 participants