|
Time to demote Fixed point maths? |
Neil Walker
Member #210
April 2000
|
Hello, Allegro 5 manual said: The only advantage of fixed point math routines is that you don't require a floating point coprocessor to use them...but stopped being so useful with the coming of the Pentium class of processors [i.e. in the 90's]....Many embedded processors have no FPUs so fixed point maths can be useful there. and they were right, what is the point in Allegro's limited fixed point routines? or rather, given they have very little benefit to almost everyone why not remove the bloat from the core library and make it an add-on. Or better still, given Allegro has dragged it's way into the 21st century, drop it all together? Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
Arthur Kalliokoski
Second in Command
February 2005
|
I read somewhere on the wiki that the mobile processors could easily lack an FPU. They all watch too much MSNBC... they get ideas. |
Neil Walker
Member #210
April 2000
|
Android uses soft-fpu emulation when presented with floating point maths - you don't have to explicitly exclude every other platform from using floating point by coding with fixed point. Besides, it seems to me like it's a minor, little used thing that should be an add-on and to stop presenting it as a core item that people (new to) Allegro should be looking at. Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
Elias
Member #358
May 2000
|
I agree that it should be an addon. Neil Walker said: stop presenting it as a core item Where is that done? I just had to check the docs since I didn't even know those functions are in A5. They are completely disconnected from the rest of the API and nothing suggests that it's a good idea to use them. -- |
Arthur Kalliokoski
Second in Command
February 2005
|
Maybe instead of having it in the Contents, it could be buried in the Platform-specific section. They all watch too much MSNBC... they get ideas. |
Peter Wang
Member #23
April 2000
|
In fact, they are used in the core (scanline_drawers.c) though just barely. I don't think it's worthwhile to remove now, but moving the documentation further down the table of contents is okay. Or is this more to do with appearances?
|
Gideon Weems
Member #3,925
October 2003
|
Don't necessarily consider this a vote for keeping it in the main library, but I've always appreciated the simplistic beauty of fixed-point. There's something satisfying about being able to see 0's and 1's and knowing what they represent. Bit operations work well on fixed-point, as well. |
Pho75_
Member #12,377
November 2010
|
"FROM MY COLD DEAD HANDS !!!" Aside from the lookup tables for the trig functions, this can't be using up much space. How much compared to pulling in the libC math library? Seriously, 1 sprite takes up more resources than these functions. What are we really talking about here? I submit, that if you're app is so pressed for memory you need to drop fixed-point math, then I say you are EXACTLY the person who should be seriously considering fixed-point math. It's beautiful for optimizing tight math loops where you need decimal precision It's already part of 5.0 API. Fixed point math was up saving me cycles last night! Where were you? Leave fixed-point math alone !!! The defense rests. |
|