Skip to content

Commit

Permalink
chore: Switch to using the new ops
Browse files Browse the repository at this point in the history
  • Loading branch information
spotandjake committed Dec 31, 2023
1 parent e084baf commit d539b89
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions stdlib/int32.gr
Original file line number Diff line number Diff line change
Expand Up @@ -521,11 +521,6 @@ provide let popcnt = (value: Int32) => {

// Exponentiation by squaring https://en.wikipedia.org/wiki/Exponentiation_by_squaring special path for int^int
let rec expBySquaring = (y, x, n) => {
let (==) = eq
let (*) = mul
let (%) = mod
let (/) = div
let (-) = sub
if (n == 0l) {
1l
} else if (n == 1l) {
Expand All @@ -547,9 +542,6 @@ let rec expBySquaring = (y, x, n) => {
* @since v0.6.0
*/
provide let (**) = (base, power) => {
let (<) = lt
let (/) = div
let (*) = mul
if (power < 0l) return expBySquaring(1l, 1l / base, power * -1l)
else return expBySquaring(1l, base, power)
}

0 comments on commit d539b89

Please sign in to comment.