Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

891100 Posts in 33521 Topics- by 24766 Members - Latest Member: karlari84

June 18, 2013, 09:20:13 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Proposing a new Number-Representation: "FixedFloat"
Pages: 1 ... 11 12 [13] 14
Print
Author Topic: Proposing a new Number-Representation: "FixedFloat"  (Read 5082 times)
Ben_Hurr
Level 10
*****


nom nom nom


View Profile Email
« Reply #180 on: March 22, 2013, 04:25:06 PM »

< desire to make J-Snake style post >

Do it, I can then accuse you of selling Evan Oil.  Grin
But no really do it I love reading technical articles.
Logged
epcc
Level 1
*


View Profile Email
« Reply #181 on: March 22, 2013, 06:34:31 PM »

what are micro impulses? why are they so good?
Logged

Evan Balster
Level 10
*****


dreaming close to metal


View Profile WWW Email
« Reply #182 on: March 22, 2013, 08:20:51 PM »

Force vectors.  Since they're relative values, we've established there's no benefit to representing them as fixedFloats rather than doubles.
Logged

Infinite Blank, SoundSelf, Cave Story+, Wreath
voice, accordion, mandolin, oboe (?!)
Game audio programming consultant.
<plaid/audio> 0.2: opensource audio framework
J-Snake
Level 10
*****



View Profile WWW Email
« Reply #183 on: March 23, 2013, 02:20:09 AM »

In order to compute a distance-vector you need to subtract positions. Now think about the demands in order to compute microscopic distance-vectors.

If you don't need resolution-spikes around full parts for cave story+ etc. Fine. But you don't need to repeat telling it over and over. I am the creator of the upcoming fixedPoint perfection called TrapThem.
Logged

Independent game developer with an elaborate focus on interesting gameplay, rewarding depth of play and technical quality.

              TrapThem
Gimym TILBERT
Level 10
*****


Sorry! discussing feminism is forbiden on tigs :(


View Profile Email
« Reply #184 on: March 23, 2013, 09:22:38 AM »

What's the effect of resolution spikes?
Logged


ILLOGICAL, random guy on internet, do not trust
Quarry
Level 10
*****



View Profile WWW
« Reply #185 on: March 23, 2013, 02:35:26 PM »

So, I was working on a FixedFloat-like implementation in Java. However I noticed some flaw I had done;

http://pastebin.com/XvGKyRsY

output the following

Code:
floatOne: -2.5000
floatTwo: 2.3499
floatOne + floatTwo: 0.1501
floatTwo + floatOne: 2.5000

because I didn't have the "right" of the number have the ability to be negative!
Logged

 
rivon
Level 10
*****



View Profile
« Reply #186 on: March 23, 2013, 04:03:39 PM »

Have you even read the first post in this thread? FixedFloat uses int+float, not int+short.
Logged
Quarry
Level 10
*****



View Profile WWW
« Reply #187 on: March 23, 2013, 11:24:30 PM »

Quote
FixedFloat-like

I tried using integers for the float part for extra precision
Logged

 
Crimsontide
Level 3
***


View Profile
« Reply #188 on: March 24, 2013, 02:24:02 AM »

Quote
FixedFloat-like

I tried using integers for the float part for extra precision

So what you have is fixed point then?
Logged
Quarry
Level 10
*****



View Profile WWW
« Reply #189 on: March 24, 2013, 02:31:28 AM »

I suppose
Logged

 
nikki
Level 10
*****


View Profile Email
« Reply #190 on: March 24, 2013, 02:38:10 AM »

I would like to see an implementation to this number proposition too though I guess,
 makes things alot clearer to me then talks of äquidistant and correlations and resolution spikes.

Logged
Quarry
Level 10
*****



View Profile WWW
« Reply #191 on: March 24, 2013, 09:24:47 AM »

I went back on the drawing board and came up with a lot healthier solution, the code below;

http://pastebin.com/e3wWfCzQ

and outputs

Code:
Addition and Subtraction
floatOne: 2.5000
floatTwo: -1.8999
floatOne + floatTwo: 0.6001
floatTwo - floatOne: -2.5000
Multiplication
floatThree: 2.5000
floatFour: -5.7500
floatThree * floatFour: -14.3750
Division
floatFive: 16.7999
floatSix: -5.1999
floatFive / floatFive: -3.2308

It's again not exactly FixedFloat (I didn't want to call it IntFloat) but it has no precision errors (except for the ones of the floats in the constructor)

EDIT: Disregard this post, I just unknowingly reinvented fixed point arithmetics
« Last Edit: March 24, 2013, 09:39:05 AM by Quarry » Logged

 
rivon
Level 10
*****



View Profile
« Reply #192 on: March 24, 2013, 10:45:23 AM »

floatTwo - floatOne is not -2.5...
Logged
Crimsontide
Level 3
***


View Profile
« Reply #193 on: March 24, 2013, 11:01:13 AM »

EDIT: Disregard this post, I just unknowingly reinvented fixed point arithmetics

LOL, its ok, I've done that many times in other areas Wink  Its how you learn.
Logged
Quarry
Level 10
*****



View Profile WWW
« Reply #194 on: March 24, 2013, 11:04:24 AM »

floatTwo - floatOne is not -2.5...

floatOne is 0.6 after the first equation. -1.9 - 0.6 = -2.5!
Logged

 
Pages: 1 ... 11 12 [13] 14
Print
Jump to:  

Theme orange-lt created by panic