Using fixed point maths in a physics engine
Posted: Mon Mar 19, 2007 4:41 pm
Hi,
I'm currently working on porting a physics project to a machine without any native floating point support. I'm using ODE (in single floating point mode) and find it works very well on a PC but is very slow when using an emulated floating point system.
I was going to reimplement ODE using a fixed point maths class but would like to know if anyone had any information on this before I go ahead. Ideally I would use a 16:16 system but I'm unsure whether this would be too limited for the scale of numbers being used.
If anyone could give their opinion on the following questions I would be really grateful:
1) Has anyone used fixed-point maths for physics before?
2) Do physics systems require support for NaN/Infinity etc...?
3) What would be a reasonable size to use for the fixed-point (e.g. 32:32, 16:16, 48:16)
Thanks!
Tone
I'm currently working on porting a physics project to a machine without any native floating point support. I'm using ODE (in single floating point mode) and find it works very well on a PC but is very slow when using an emulated floating point system.
I was going to reimplement ODE using a fixed point maths class but would like to know if anyone had any information on this before I go ahead. Ideally I would use a 16:16 system but I'm unsure whether this would be too limited for the scale of numbers being used.
If anyone could give their opinion on the following questions I would be really grateful:
1) Has anyone used fixed-point maths for physics before?
2) Do physics systems require support for NaN/Infinity etc...?
3) What would be a reasonable size to use for the fixed-point (e.g. 32:32, 16:16, 48:16)
Thanks!
Tone