More Awesome Than You!
Welcome,
Guest
. Please
login
or
register
.
2024 November 25, 14:07:15
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
SUPPORT THE MUNICIPALITY!
Have you destroyed a paysite today?
"Jelenedra" is the new "gay".
All Lythdans are stupid and suck!
DEATH TO ALL STUPID HAIRY-BELLIED NESSES!
All Kewians are stupid and suck! Accept no Kewian-based substitutes!
Clearly, BlueSoup has failed us! You must not! BlueSoup has a fat head!
Hobbsee has a
scrawny pencil neck.
Rohina the Ugly Butted is a Horny Turkey
540287
Posts in
18067
Topics by
6545
Members
Latest Member:
cincinancy
More Awesome Than You!
TS2: Burnination
The Podium
Primitive 0x2, int32, and overflow
0 Members and 1 Chinese Bot are viewing this topic.
« previous
next »
Pages:
[
1
]
Author
Topic: Primitive 0x2, int32, and overflow (Read 3352 times)
rufio
Non-Standard
Uncouth Undesirable
Posts: 3030
More Nonstandard Than You
Primitive 0x2, int32, and overflow
«
on:
2010 January 25, 20:23:33 »
I am guessing that the expression primitive does signed 16-bit math, correct? Is there any way to coerce it into doing 32-bit math, or unsigned math, or getting it to check for overflow? Or would I have to implement that myself if I wanted it?
Logged
Quote from: Tsenatserix on 2010 December 08, 08:01:19
I was thinking about these things and I am a feminist.
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
Posts: 26288
Re: Primitive 0x2, int32, and overflow
«
Reply #1 on:
2010 January 26, 06:07:28 »
Quote from: rufio on 2010 January 25, 20:23:33
I am guessing that the expression primitive does signed 16-bit math, correct? Is there any way to coerce it into doing 32-bit math, or unsigned math, or getting it to check for overflow?
Nope.
Logged
Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
Inge
Round Mound of Gray Fatness
Senator
Posts: 4320
Senator Emeritus. Oh hold on, I am still a senator
Re: Primitive 0x2, int32, and overflow
«
Reply #2 on:
2010 January 26, 16:20:46 »
EA make liberal use of mod and div and store values in multiple variables, one for units, one for tens of thousands etc
Logged
\"They\'re here, on the forum. A question riddled, spoiler giving, speculative cancer of sim evil\" -- redearth, Snooty Sims, 2009
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
Posts: 26288
Re: Primitive 0x2, int32, and overflow
«
Reply #3 on:
2010 January 26, 18:12:17 »
That method is only used to store money and not really for anything else, and represents more of a special, handmade behavior than true 32-bit math.
Logged
Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
rufio
Non-Standard
Uncouth Undesirable
Posts: 3030
More Nonstandard Than You
Re: Primitive 0x2, int32, and overflow
«
Reply #4 on:
2010 January 26, 18:42:06 »
Yes, I was actually looking at the earned money value when I asked this - if you use the Date Counter thingy from Darcyland to track wealth, you can see that there appears to be some kind of horrible overflow problem with it, so that my sim has apparently made "92 thousand, -3029 simoleans". It obviously doesn't affect things badly enough that sims can't still make $100K in a reasonable amount of time, but it's extremely annoying when I'm trying to keep track as I go along. I don't know why they didn't simply use (or simulate) 32-bit ints there - it would have made much more sense and probably would have been easier to debug.
Logged
Quote from: Tsenatserix on 2010 December 08, 08:01:19
I was thinking about these things and I am a feminist.
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
TS4: The Pee-ening
-----------------------------
=> Insert Amusing Name Here
=> Facts and Strategery
-----------------------------
TS3/TSM: The Pudding
-----------------------------
=> The World Of Pudding
=> Facts & Strategery
=> Pudding Factory
===> World of Puddings
===> Pudding Plots
-----------------------------
TS2: Burnination
-----------------------------
=> The Podium
===> Oops! You Broke It!
=> The War Room
=> Planet K 20X6
===> Building Contest of Awesomeness
=> Peasantry
===> Taster's Choice
-----------------------------
The Bowels of Trogdor
-----------------------------
=> The Small Intestines of Trogdor
=> The Large Intestines of Trogdor
-----------------------------
Awesomeware
-----------------------------
=> TS4 Stuff
=> Armoire of Invincibility
===> AwesomeMod!
=> The Armory
===> Playsets & Toys
===> The Scrapyard
-----------------------------
Darcyland
-----------------------------
=> Lord Darcy Investigates
-----------------------------
Ye Olde Simmes 2 Archives: Dead Creators
-----------------------------
=> Ye Olde Crammyboye Archives
=> Ye Olde Syberspunke Archives
-----------------------------
Serious Business
-----------------------------
===> Spore Discussions
Loading...