obsidian-dataview
obsidian-dataview copied to clipboard
Support for power
Is your feature request related to a problem? Please describe..
I am trying to do some quick math operation on IP addresses and masks.
In particular from a mask (10.0.0.0/16), finding how many IP addresses are available.
The operation should be simple 2^(32-x) where x is the mask.
Describe the solution you'd like
Support the power operation, either natively x^y, x**y, or through a function pow(x, y)
Describe alternatives you've considered At the moment the alternative is a bit (unnecessarily) complex:
product(
number(
split("1"+"2"*(32-mask), "")
)
)
Generate a string of "2" n times, split it into an array of n entries, transform into numbers, and run product on the array.