Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Fix is-int and is-float; add tests #147

Merged
merged 2 commits into from
Oct 23, 2023
Merged

Fix is-int and is-float; add tests #147

merged 2 commits into from
Oct 23, 2023

Conversation

c71n93
Copy link
Member

@c71n93 c71n93 commented Oct 23, 2023

Closes #146


PR-Codex overview

Focus of this PR:

This PR focuses on adding new methods to the number class in the math package. These methods check if a number is equal to zero, whether it is an integer or a float, and if it is NaN.

Detailed summary:

  • Added a new method is-int-zero to check if a number is an integer zero.
  • Added a new method is-float-zero to check if a number is a floating-point zero.
  • Added a new method is-nan to check if a number is NaN.
  • Added test cases to verify the functionality of the new methods.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@c71n93
Copy link
Member Author

c71n93 commented Oct 23, 2023

@maxonfjvipon could you check this one, please?

Copy link
Member

@maxonfjvipon maxonfjvipon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@c71n93 Good one! Just a several comments from my side

if. > @
eq.
value.as-bytes
0.0.as-bytes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@c71n93 let's make a minor optimization and replace 0.0.as-bytes with 00-00-00.... The same story with -0.0.as-bytes below

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@c71n93 or at least you can cache 0.0.as-bytes

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@c71n93
Copy link
Member Author

c71n93 commented Oct 23, 2023

@yegor256 could you check this one, please?

@yegor256
Copy link
Member

@rultor merge

@rultor
Copy link
Contributor

rultor commented Oct 23, 2023

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit ca3d830 into objectionary:master Oct 23, 2023
8 checks passed
@rultor
Copy link
Contributor

rultor commented Oct 23, 2023

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 6min)

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

Successfully merging this pull request may close these issues.

Fix is-int and is-float attributes of number using as-bytes
4 participants