Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Power function that accepts real numbers

Posted on 2007-03-24
4
Medium Priority
?
170 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

Independent Software Vendors: 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

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Iteration: Iteration is repetition of a process. A student who goes to school repeats the process of going to school everyday until graduation. We go to grocery store at least once or twice a month to buy products. We repeat this process every mont…
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.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

610 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