Azure / Azure/bicep

Add a power numerical operator

Open
#7,401 4 comments 3 reactions 0 assignees View on GitHub
enhancement intermediate language
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Is your feature request related to a problem? Please describe.**
According to the documentation on numerical operators (https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/operators-numeric), the following operators are available:
\* (multiply)
\/ (divide)
\% (modulo)
\+ (add)
\- (subtract)
\- (minus)

It is however missing a power operator, which I need for some CIDR math.

**Describe the solution you'd like**
Add a power or exponent operator like ^ or ** so that `var num = 2 ^ 5` gives num = 32

Contributor guide

Open the contributing guide

Research direction

The issue points to Azure's numerical-operator documentation; start by reviewing that reference and the existing Bicep numerical operators. Done means Bicep accepts a power or exponent form such as `2 ^ 5` and produces 32, with the supported syntax documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.