fixed point arithmetic on the iPhone
April 9th, 2008
So I've started to check out what's involved in making games on the iPhone, you know like OpenGL ES, Open AL etc - the usual stuff... In amongst my fooling around, I've started to create a Vector class for doing some basic physics. While I was researching how to do that correctly, I came across a realization. The ARM processor of the iPhone and iPod Touch doesn't have an FPU (Floating Point Unit) so to get any decent performance out of a game, i'll have to get to grips with Fixed Point maths (again).
If you're looking to get up to scratch on that too, this might come in handy.
There's a helluva lot to learn for anyone making the move from the desktop to the iPhone... Well it's not as simple as a lot of people have made it out to be.
I think this is the most geeky post i've ever written.
Update: Thanks to John in the comments. Looks like iPhone does have an FPU.
3 Responses to “fixed point arithmetic on the iPhone”
Sorry, comments are closed for this article.

April 23rd, 2008 at 04:47 PM
Jeeesus Christ man… and I thought revising GCSE maths was bad! What the hell does all that stuff mean?
May 1st, 2008 at 05:39 PM
I haven’t a clue… My geekiness is just an act…
;-)
August 17th, 2008 at 01:25 PM
I don’t think that you are completely correct, sir. The consensus among our fellow devs is that unless you’ve boiled it down to floats being your speed problem keep using them and don’t bother with fixed point stuff b/c the iPhone does, in fact, contain an FPU.
I’m looking for article’s to back me up but having trouble (probably thanks to the f*ing NDA):
http://toucharcade.com/2008/07/07/under-the-hood-the-iphones-gaming-mettle/
or:
http://forum.beyond3d.com/showthread.php?t=42496
(search for “floating point unit” on the page)
I’d love to see what you’re working on OpenGL-wise…