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

Some ValidityTests redundancies #93

Closed
sophiafarrell opened this issue Mar 1, 2021 · 2 comments
Closed

Some ValidityTests redundancies #93

sophiafarrell opened this issue Mar 1, 2021 · 2 comments

Comments

@sophiafarrell
Copy link
Contributor

Thanks to Luke K. on LZ, we have a couple smaller enhancements to add to our new floating point equality function. Shouldn't change any results but will make the code prettier/more logical.

  • The following "else" is redundant:
if (a == b) { // shortcut, handles infinities
    return true;
  } else {

@sophiafarrell
Copy link
Contributor Author

Redundancy 1 taken care of in:
b28c0cd

@sophiafarrell
Copy link
Contributor Author

(The standard epsilon may be useful, but for now the freedom of a scaling factor to this smallest-floating difference may be less physical than the case of people being able to set epsilon to mimic some energy-separation at which point values are indistinguishable. Thus I am opting to leave as-is, for now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant