Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length.
 
Entire Forum
This board
This topic
Members
Entire Site
Home
FAQ
Help
Bug and Suggestion Tracker
Search
AGS Wiki
AGS Games
Login
Register
Adventure Game Studio | Forums
|
AGS Support
|
Advanced Technical Forum
(Moderator:
Iceboty V7000a
) |
Topic:
Calculating, Mostly Addition
« previous
next »
Print
Pages: [
1
]
Author
Topic: Calculating, Mostly Addition (Read 505 times)
Tweet
Share
KamikazeHighland
Calculating, Mostly Addition
«
on:
04 Mar 2012, 23:02 »
«
Last Edit: 04 Mar 2012, 23:07 by KamikazeHighland
»
Logged
monkey_05_06
AGS Project Admins
Has left the building.
Re: Calculating, Mostly Addition
«
Reply #1 on:
08 Mar 2012, 23:15 »
[code]int C;
C++;[/code]
Ah, programming jokes. 8)
Logged
Let's be honest. Most people suck at coding. I suck at coding, but at least my code is readable. To Hell with anyone too lazy to maintain consistent formatting in their code. I could deal with bad interfaces and structure if I could even read your horrible code. And that's putting it nicely. -monkey
Iceboty V7000a
Local Moderator
* KILL* * KILL * * KILL *
Re: Calculating, Mostly Addition
«
Reply #2 on:
09 Mar 2012, 02:47 »
Care to elaborate why you need to work with such large numbers in AGS?
Logged
KamikazeHighland
Re: Calculating, Mostly Addition
«
Reply #3 on:
09 Mar 2012, 06:06 »
Well, I don't like for math to ever be wrong.
I've actually finished with all four arithmetic operations for non-negative, non-decimal numbers of any size.
But thank you anyway.
Logged
Iceboty V7000a
Local Moderator
* KILL* * KILL * * KILL *
Re: Calculating, Mostly Addition
«
Reply #4 on:
09 Mar 2012, 07:26 »
Care to elaborate why you need to work with such large numbers in
AGS
?
Is this really needed?
Logged
KamikazeHighland
Re: Calculating, Mostly Addition
«
Reply #5 on:
09 Mar 2012, 08:20 »
Necessary? No.
I don't know c++, and it looks hard to learn.
I'm finished.
Logged
Dualnames
AGS Baker
Re: Calculating, Mostly Addition
«
Reply #6 on:
09 Mar 2012, 08:55 »
Again, in case it didn't go through why are you re-inventing the wheel for?
Logged
Calin Leafshade
AGS Project Admins
Long live King Cat!
Re: Calculating, Mostly Addition
«
Reply #7 on:
09 Mar 2012, 09:19 »
(32bit) Ints themselves are only accurate to 32-bits but larger numbers can be stored using multiple registers. Theoretically a computer can store a number as large as you like with no errors. Its just far slower because it has to do clever, expensive multiple register arithematic.
Logged
Leon: You need the sword first before you can get the monkey.
KamikazeHighland
Re: Calculating, Mostly Addition
«
Reply #8 on:
09 Mar 2012, 09:40 »
It's not about large numbers, it's about accuracy, and uncertainty. When you multiply or divide ints or floating point numbers more than once, multiple rounding errors can creep up in no time at all.
Multiple registers, you say?
Logged
Calin Leafshade
AGS Project Admins
Long live King Cat!
Re: Calculating, Mostly Addition
«
Reply #9 on:
09 Mar 2012, 11:27 »
dividing ints can introduce rounding errors yes. You would use floats if accuracy was important. The accuracy of a float decreases as the value of the number stored increases but the larger the size of the float the less significance the error will have. Even the vast majority of scientific applications dont require accuracy to more than about 6 significant figures.
Accuracy of integer division can be a problem but if you are concerned about the accuracy of floating point numbers then you really need something far more specialised than AGS.
Logged
Leon: You need the sword first before you can get the monkey.
Wyz
AGS Project Admins
anno 1986
Re: Calculating, Mostly Addition
«
Reply #10 on:
10 Mar 2012, 12:43 »
I'm curious what method you use right now; adding two number of 155 (decimal) digits will boil down to around 30 additions. This is still peanuts for any processor and even for AGS' virtual machine. Adding more digits will cause the processing time to grow linearly. It should by no means be slower than multiplication.
Logged
Life is like an adventure without the pixel hunts.
Print
Pages: [
1
]
« previous
next »
Adventure Game Studio | Forums
|
AGS Support
|
Advanced Technical Forum
(Moderator:
Iceboty V7000a
) |
Topic:
Calculating, Mostly Addition