Skip to content

Suggestion: implement an exponentiation (power-of) operator #3603

@mklement0

Description

@mklement0

Currently, to get exponentiation ($x to the power of $n), you must use the .NET framework:

E.g., to calculate 2 to the power of 8:

> [Math]::Pow(2, 8)
256

It would be nice to have a dedicated operator, such as **, as in other languages (e.g., Python, Ruby, JavaScript, Perl):

 > 2 ** 8
 256

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifIssue-Enhancementthe issue is more of a feature request than a bugResolution-Won't FixThe issue won't be fixed, possibly due to compatibility reason.WG-Languageparser, language semantics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions