-
Notifications
You must be signed in to change notification settings - Fork 177
feat(objectionary#4751): separated pow from real
#4832
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
Conversation
📝 WalkthroughWalkthroughExtracted the power operation from Changes
Sequence Diagram(s)(omitted — changes are localized refactor/extraction and do not introduce a multi-component sequential flow requiring diagram) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 Performance AnalysisAll benchmarks are within the acceptable range. No critical degradation detected (threshold is 100%). Please refer to the detailed report for more information. Click to see the detailed report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@eo-runtime/src/main/eo/org/eolang/ms/pow.eo`:
- Around line 251-255: The test named
tests-positive-int-to-the-pow-of-positive-float-is-float is misleading because
it calls pow 4 5 (both integers); update the test to match its name by changing
the exponent to a float (e.g., replace the second argument with 5.0 in the pow
invocation) or alternatively rename the test to reflect integer arguments (e.g.,
tests-positive-int-to-the-pow-of-positive-int-is-int); edit the test declaration
and the pow call accordingly to keep name and behavior consistent (refer to the
test symbol tests-positive-int-to-the-pow-of-positive-float-is-float and the pow
invocation).
- Around line 42-44: The tests conflict: the case
"throws-on-negative-pow-of-zero" expects pow 0 -567 to throw while
"tests-zero-to-the-negative-pow-is-positive-infinity" expects pow 0 -52 to be
positive-infinity; reconcile them by making the behavior consistent with the
implementation (Java Math.pow returns Infinity). Update the test named
throws-on-negative-pow-of-zero to assert positive-infinity instead of expecting
an exception (replace the throw expectation with the same positive-infinity
assertion used in tests-zero-to-the-negative-pow-is-positive-infinity), keeping
the pow invocation and test name as needed.
- Around line 10-11: The docstring for the pow object contains a stray
apostrophe in "`num'`"; update the documentation line in pow.eo (the header for
the [num x] > pow ? object) to read "num" instead of "num'" so the description
becomes "An operation that raises num to the power of x".
🧹 Nitpick comments (1)
eo-runtime/src/main/java/EOorg/EOeolang/EOms/EOpow.java (1)
19-23: Update outdated Javadoc.The Javadoc still references "Real.pow" but the class is now a standalone
powoperation./** - * Real.pow. + * Pow. * * `@since` 0.40 * `@checkstyle` TypeNameCheck (100 lines) */
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
eo-runtime/src/main/java/EOorg/EOeolang/EOms/EOpow.java (1)
19-23: Outdated Javadoc comment.The Javadoc still says "Real.pow" but this class is now a standalone
powobject, no longer nested underreal.📝 Suggested fix
/** - * Real.pow. + * Pow. * * `@since` 0.40 * `@checkstyle` TypeNameCheck (100 lines) */
|
@yegor256, check please |
|
@tihiyn Hey there! 🎉 Nice work on that contribution - you've earned +12 points! Here's the breakdown: +16 base points, but -4 for going over 100 hits-of-code (you hit 117). To maximize your bonus next time, try to keep contributions under 100 lines and ensure there's a code review - it really helps boost those points! Your running score is now +68, so keep the momentum going and don't forget to check your Zerocracy account. |
In this PR, I separated
powobject fromreal. But the tests are still inreal.eodue to the PR size limit.Resolves: #4751
Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.