C Integer Power / Integer Potenz

#include <math.h>
double pow(double x, double y);

period = pow(2, log_inter_message_period);
rate   = 1 / period;

printf("every %lg seconds", period);

Wikipedia

Potenz

stackoverflow

Why is my power operator (^) not working?
power of an integer in c++
Integer power in c
The most efficient way to implement an integer based power function pow(int, int)

Divers

Bit Twiddling Hacks – Determining if an integer is a power of 2

Leave a Reply

Your email address will not be published. Required fields are marked *