This site is no longer active and is available for archival purposes only. Registration and login is disabled.

FP resolution


FP resolution

Postby Lewil » Jul 17, 2002 @ 5:51pm

Hi again,

FP calculation is based on int which are 4*8 bits (aren't they ?) with the standard FP_Q = 10, it means each number is multiplicated by 1024 so the resolution do no exceed 1/1024 (not far from 0.001) but numbers can go up to 2^((4*8-1)-10)=2 097 151

if we compare, floats have a resolution of 0.0000001 (no?) wich is much better in many case

it leads to strange behaviours when we translate a code from floats to FP.

so this is my questions:

why FP_Q is set to 10 when it could be set to 16 or 20 to stick with floats resolution ?

as it is a Constant in overloaded.h we come back to the old problem: no more common overloaded.dll if we change it ;)

could we have a way to set a variable FP_Q value (could be set for exemple at 10 by default and changed by a function call if necessary) ?

and the main question: did i miss something ? (which could be more than 75% chance huhu)
User avatar
Lewil
pm Member
 
Posts: 108
Joined: Apr 25, 2002 @ 1:39pm


Postby MirekCz » Jul 17, 2002 @ 6:52pm

With best regards,
Mirek Czerwinski
User avatar
MirekCz
pm Member
 
Posts: 269
Joined: Sep 18, 2001 @ 6:42pm
Location: Poland,city Poznań


Postby s9801758 » Jul 17, 2002 @ 7:18pm

User avatar
s9801758
pm Member
 
Posts: 48
Joined: May 10, 2002 @ 10:20am
Location: Vancouver BC, Canada


Postby Lewil » Jul 17, 2002 @ 9:12pm

User avatar
Lewil
pm Member
 
Posts: 108
Joined: Apr 25, 2002 @ 1:39pm


Postby s9801758 » Jul 17, 2002 @ 9:19pm

User avatar
s9801758
pm Member
 
Posts: 48
Joined: May 10, 2002 @ 10:20am
Location: Vancouver BC, Canada


Return to Phantom's Forum


Sort


Forum Description

Discuss any of Phantom's projects here (Operation Nutcracker, etc.)

Moderators:

sponge, RICoder, Phantom

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum