?
Solved

Power function that accepts real numbers

Posted on 2007-03-24
4
Medium Priority
?
169 Views
Last Modified: 2010-04-01
I need an algorithm or C++ pseudo code for exponentiation with real numbers, i.e. 2^3.5.

Thanks
0
Comment
Question by:gromul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 18787436
#include <math.h>
pow(2.0,3.5);
0
 

Author Comment

by:gromul
ID: 18787444
I got that, but how would I code this function myself?
0
 
LVL 84

Accepted Solution

by:
ozo earned 2000 total points
ID: 18787474
exp(log(2.0)*3.5)
0
 
LVL 84

Expert Comment

by:ozo
ID: 18787475
2*2*2*sqrt(2)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of Google's most recent algorithm changes affecting local searches is entitled "The Pigeon Update." This update has dramatically enhanced search inquires for the keyword "Yelp." Google searches with the word "Yelp" included will now yield Yelp a…
Prime numbers are natural numbers greater than 1 that have only two divisors (the number itself and 1). By “divisible” we mean dividend % divisor = 0 (% indicates MODULAR. It gives the reminder of a division operation). We’ll follow multiple approac…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question