Code: Select all
let v = 0.4f
- sinf(v) = 0.389418, cycles: 856
- vfpu_sinf(v) = 0.389418, cycles: 160
- cosf(v) = 0.921061, cycles: 990
- vfpu_cosf(v) = 0.921061, cycles: 154
- tanf(v) = 0.422793, cycles: 1632
- vfpu_tanf(v) = 0.422793, cycles: 121
- asinf(v) = 0.411517, cycles: 1265
- vfpu_asinf(v) = 0.411517, cycles: 154
- acosf(v) = 1.159279, cycles: 1433
- vfpu_acosf(v) = 1.159280, cycles: 107
- atanf(v) = 0.380506, cycles: 692
- vfpu_atanf(v) = 0.380506, cycles: 126
- sinhf(v) = 0.410752, cycles: 1898
- vfpu_sinhf(v) = 0.410752, cycles: 356
- coshf(v) = 1.081072, cycles: 1885
- vfpu_coshf(v) = 1.081072, cycles: 246
- tanhf(v) = 0.379949, cycles: 1525
- vfpu_tanhf(v) = 0.379949, cycles: 208
- expf(v) = 1.491825, cycles: 1351
- vfpu_expf(v) = 1.491824, cycles: 212
- logf(v) = -0.916291, cycles: 1409
- vfpu_logf(v) = -0.916292, cycles: 210
- fabsf(v) = 0.400000, cycles: 7
- vfpu_fabsf(v) = 0.400000, cycles: 93
- sqrtf(v) = 0.632456, cycles: 40
- vfpu_sqrtf(v) = 0.632455, cycles: 240
- powf(v, v) = 0.693145, cycles: 3488
- vfpu_powf(v, v) = 0.693145, cycles: 412
My lib will have other functions not in libm though, some related to vector operations (like vfpu_normalize_vector), some matrix ops (like vfpu_perspective_matrix, libpspgum_vfpu didnt have a proper asm version at the time), and some quaternion math as well. Stay tuned as I make progress.
As I said, this is a work in progress, as such, dont expect much help from me using it =) Here's the link, you should know what do with the files: http://mrmrice.fx-world.org/libpspmath.zip