Integer Exponent multiplier (for enums/ints)

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Integer Exponent multiplier (for enums/ints)

Re: Integer Exponent multiplier (for enums/ints)

by Major Cooke » Sat Mar 24, 2018 11:01 am

Awesome. That way this doesn't have to be a royal pain to deal with.

Re: Integer Exponent multiplier (for enums/ints)

by Graf Zahl » Wed Feb 28, 2018 8:49 am

Yeah, that shouldn't be too hard to add.

Integer Exponent multiplier (for enums/ints)

by Major Cooke » Wed Feb 28, 2018 8:16 am

According to Gutawer who did some testing, performing x * x (up until 9 multipliers, then it gets slower) is apparently faster than doing x ** y. In particular this seems a bit counter-intuitive especially if we're just doing integer multiplication.

And on that note:

Code: Select all

enum TestNum
{
	MyVar = 8 ** 2
};
Currently this does not work. I suggest an integer version of exponential power.

Top