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

Commit

Permalink
#134 - made number.pow object strong typed
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Jul 12, 2023
1 parent da0fe6e commit 648868c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/eo/org/eolang/math/number.eo
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
self-as-int.plus 1

# Make ^.n power x
[x] > pow /?
[x] > pow /number

# Make ^.n power x
# @todo #21:30 min. Add an ability to raise a number to float power.
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/EOorg/EOeolang/EOmath/EOnumber$EOpow.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
// @checkstyle PackageNameCheck (1 line)
package EOorg.EOeolang.EOmath;

import EOorg.EOeolang.EOerror;
import org.eolang.AtComposite;
import org.eolang.AtFree;
import org.eolang.Data;
Expand Down Expand Up @@ -89,7 +88,11 @@ public final class EOnumber$EOpow extends PhDefault {
)
);
}
return phi;
return new PhWith(
new EOnumber(Phi.Φ),
"n",
phi
);
}
)
);
Expand Down

0 comments on commit 648868c

Please sign in to comment.