• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 172
  • Last Modified:

Power function that accepts real numbers

I need an algorithm or C++ pseudo code for exponentiation with real numbers, i.e. 2^3.5.

Thanks
0
gromul
Asked:
gromul
  • 3
1 Solution
 
ozoCommented:
#include <math.h>
pow(2.0,3.5);
0
 
gromulAuthor Commented:
I got that, but how would I code this function myself?
0
 
ozoCommented:
exp(log(2.0)*3.5)
0
 
ozoCommented:
2*2*2*sqrt(2)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now