|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#16
|
||||
|
||||
|
Re: ERROR
First of all, I would HIGHLY recommend writing and using your own functions.
Are you using floating point powers (6^2.5) or only integers(6^3). If you are using integer powers then it would be very easy to write your own function: Code:
long powl(long y, int x) {
long result=1;
int i;
for (i=0;i<x;++i) {
result*=y;
}
return result;
}
That is much faster and better than using a function with floating point numbers (doubles), which are bad to use on these microprocessors and which one has little reason to use. ------------------------ Now, to answer your question about the hard way to do this: The "old style" functions are when you do: Code:
double pow(y,x)
double y, x;
{
...
}
Code:
double pow(double y,double x)
{
...
}
Code:
double ceil(double x)
{
...
}
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| error with adc.h | incognito_NICK | Programming | 2 | 05-02-2005 23:27 |
| MPLink Error | cloudago | Programming | 2 | 01-02-2005 23:00 |
| MPLAB build error | cabbagekid2 | Programming | 7 | 12-01-2005 13:36 |
| PHP and Wiki Error | Venkatesh | Website Design/Showcase | 2 | 24-07-2004 15:51 |
| EMERGENCY! EPROM FULL error?!? | CHSguard72 | Programming | 2 | 05-03-2003 20:51 |