Greetings. I'm currently implementing small ANN on my microcontroller. I need to calculate sigmoid activation function. The problem is that I cannot use standard c libraries like math.h so I need custom written pow function.

This is how it will be used:pow(e,-(someFloat));

Did anyone have already implemented something similar ?

Dr_Freeman
0
Newbie Poster

## Recommended Answers

Jump to PostYou could use Maclaurin series expansion for e^x = Sum(x^n/n!,0..N) were you pick N to give the you precision want. The power here is always an integer so that is just a for loop. And the factorial is just another loop.

## All 2 Replies

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.