| View previous topic :: View next topic |
| Author |
Message |
radad
Joined: 19 May 2004 Posts: 246 Location: Melbourne, Australia
|
Posted: Tue May 15, 2007 10:08 am Post subject: png and pow |
|
|
I downloaded and built libpng from svn and was getting some missing references for pow and powf. I fixed the powf by adding mf to the list of libraries but I couldnt find pow anywhere in the ps2sdk. Does it exist?
As a workaround I disabled the floating point support in libpng. Is libpng still able to open all variations? |
|
| Back to top |
|
 |
radad
Joined: 19 May 2004 Posts: 246 Location: Melbourne, Australia
|
Posted: Fri May 18, 2007 12:45 pm Post subject: |
|
|
It seems the floating point unit in the ps2 only handles single precision floats. So what is a good strategy for handling double precision float functions like 'pow'. Would it be ok to just call the single precision version?
ie
| Code: |
double pow(double x, double y)
{
return powf(x, y);
}
|
|
|
| Back to top |
|
 |
EEUG
Joined: 13 May 2005 Posts: 136 Location: The Netherlands
|
Posted: Fri May 18, 2007 5:41 pm Post subject: |
|
|
| ...ogg/vorbis decoder in SMS uses 'powf' from 'ps2sdk'. Alternatively you can try to use 'pow' from 'libm' which is part of the toolchain (I think it uses emulation for the doubles)... |
|
| Back to top |
|
 |
|