Quadruple Precision Float Point Emulator

Grab your favourite IDE and tinker with the innards of game engines

Quadruple Precision Float Point Emulator

Postby coder0xff on Sat Sep 04, 2010 4:36 pm

Several weeks ago I promised to release this. It's a library for doing high precision mathematics. I'm releasing it under the GPL license. See the readme.txt file.

http://dl.dropbox.com/u/5105767/QPFloat.rar
Last edited by coder0xff on Sun Sep 05, 2010 1:00 am, edited 1 time in total.
User avatar
coder0xff
Veteran
Veteran
 
Joined: Fri Jun 13, 2008 1:51 am

Re: Quadruple Precision Float Point Emulator

Postby Gary on Sat Sep 04, 2010 5:39 pm

Can you tell us what exactly this allows us to do? Is it something to do with huge objects(planets)?
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Quadruple Precision Float Point Emulator

Postby Rasky_26 on Sat Sep 04, 2010 6:11 pm

This is frickin' awesome! Seriously coder, the things you do blow me away.

@Gary: The more precision that is utilized, the more accurate the results. This is because computers usually only go to X decimal points and round off when they hit that limit. For standard uses this poses little issue; however, this rounding becomes more apparent when you are using something like a weather model and it is cycling through these numbers many million times. A small error becomes more pronounced the further along something propagates and leads to a greater error distribution. Something with quadruple precision point would greatly lessen such errors and would essentially allow a model to run much longer under a greatly lessened error curve.
Rasky_26
Regular
Regular
 
Joined: Sat Nov 10, 2007 9:09 pm

Re: Quadruple Precision Float Point Emulator

Postby Gary on Sat Sep 04, 2010 11:26 pm

Ah, I see. Thanks Rasky.

Good work Coder, though I cannot use this, I am sure it will help others.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Quadruple Precision Float Point Emulator

Postby omnicoder on Sun Sep 05, 2010 12:20 am

Is this designed in a way that I could fairly easily change it to give sextuplet precision etc or is it hardcoded to quadruple?
Image
If only the future implemented IForeseeable...
"whats threading? does it have to do with strings?" - stegarootbeer
User avatar
omnicoder
Been Here A While
Been Here A While
 
Joined: Sun Feb 07, 2010 8:35 am

Re: Quadruple Precision Float Point Emulator

Postby coder0xff on Sun Sep 05, 2010 12:58 am

It is somewhat flexible. The underlying mathematical operations and block copies can work on any size. I wouldn't go so far as to say it's trivial though. At that point, you may just want to go with an arbitrary precision library.

@Gary
Yes, it has a lot to do with huge objects(planets or even the largest stars or bigger) ;)

I've update the download to 0.2 beta just now. I added Tan, ATan, ASin, ACos, and ATan2 at the request of my father. Also filled in some missing function definitions. The download also includes the debug and release binaries now for convenience. If someone would like to follow the ****** USING ****** part of the README.txt and try some tests, I'd greatly appreciate it. (I dare you to divide by zero 8) )

Some example C# code
Code: Select all
Quadruple myVariable = 5;
Quadruple anotherVar = Quadruple.Pow(myVariable, 1000);
String whatIsThat = anotherVar.ToString();
int tryTruncation = (int)anotherVar;
User avatar
coder0xff
Veteran
Veteran
 
Joined: Fri Jun 13, 2008 1:51 am

Re: Quadruple Precision Float Point Emulator

Postby BattleGrunt on Sun Sep 05, 2010 3:59 am

Excuse my ignorance, but what kind of applications to modding would this emulator help? You mentioned the weather model earlier.
User avatar
BattleGrunt
Member
Member
 
Joined: Sat Mar 29, 2008 5:58 am

Re: Quadruple Precision Float Point Emulator

Postby no00dylan on Sun Sep 05, 2010 4:01 am

Coder, if the world was full of coding nerds you would be crowned king. But nope, god fearin' folks like me just sit here and go duhhhhhhh make something explode.
User avatar
no00dylan
Veteran
Veteran
 
Joined: Sat Apr 19, 2008 10:34 pm
Location: NC, USA

Re: Quadruple Precision Float Point Emulator

Postby coder0xff on Sun Sep 05, 2010 5:05 am

you guys make me lol.

@BattleGrunt
This has no usefulness for modding purposes. I've created it as a component of my own engine.

@dylan Thanks for the vote of confidence. <3
User avatar
coder0xff
Veteran
Veteran
 
Joined: Fri Jun 13, 2008 1:51 am

Re: Quadruple Precision Float Point Emulator

Postby BattleGrunt on Sun Sep 05, 2010 5:29 am

@coder0xff

Ahh, cool
User avatar
BattleGrunt
Member
Member
 
Joined: Sat Mar 29, 2008 5:58 am

Re: Quadruple Precision Float Point Emulator

Postby zombie@computer on Sun Sep 05, 2010 11:41 am

Just interested: what was your father needing it for?
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: Quadruple Precision Float Point Emulator

Postby MELVIn on Sun Sep 05, 2010 12:52 pm

Doomsday device!
Image
Interlopers.net steam-chat.
Come on in and ask all your level-design questions, or discuss games.
User avatar
MELVIn
May Contain Skills
May Contain Skills
 
Joined: Sat Jun 25, 2005 1:03 pm
Location: Iceland

Re: Quadruple Precision Float Point Emulator

Postby coder0xff on Sun Sep 05, 2010 2:50 pm

zombie@computer wrote:Just interested: what was your father needing it for?


A toy, lol. He doesn't need it, he just thought it would be fun to use. For his application he needs the "haversine formula" which uses an arcsin. He also convinced me that it would make the library more impressive. :lol:
User avatar
coder0xff
Veteran
Veteran
 
Joined: Fri Jun 13, 2008 1:51 am

Re: Quadruple Precision Float Point Emulator

Postby Deathbagel on Sun Sep 05, 2010 6:55 pm

I came here because the title sounded cool. I only wish I understood the things that you did enough to appreciate them coder, one day, one day........
User avatar
Deathbagel
Regular
Regular
 
Joined: Mon Mar 09, 2009 4:36 am
Location: Seattle, WA

Return to Programming

Who is online

Users browsing this forum: No registered users

cron