I am trying to implement fixed point C code for power function i.e. without using math.h library
For example % base = linspace(-10,10,4) % exp = linspace(-5,5,4)
I want to implement fixed point power() in C. Below is the pseudo code
#include <stdio.h>
#include <stdint.h>
void main()
{
int i,j;
double base[4] = [-10,-3.33333333333333,3.33333333333333,10];
double exp[4] = [-5,-1.66666666666667,1.66666666666667,5];
for (i =0; i < 4;i++)
{
for(j = 0;j < 4;j++)
{
output(i,j) = power(base[i],exp[j]);
}
}
}
Thank you!!