Skip to content

Conversation

@iCharlesHu
Copy link
Contributor

Resolves: #1455

)
return result ?? .nan
}
#else
Copy link
Contributor

Choose a reason for hiding this comment

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

Is pow available as API on Decimal itself instead of just via the free function?

Copy link
Contributor

Choose a reason for hiding this comment

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

My read is that this has always been a free function, both on Darwin and non-Darwin. This PR just unifies the code and makes it available for FoundationEssentials too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ditto

@itingliu
Copy link
Contributor

@swift-ci please test

@iCharlesHu iCharlesHu merged commit 574d608 into swiftlang:main Aug 21, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Raise Decimal to a power with FoundationEssentials

4 participants