Archived from groups: rec.games.roguelike.nethack (More info?)
I've never noticed this behavior before, but I'm assuming it must be a
bug. Briefly:
I had a sack. I had about $1000 in my bag. I was Burdened.
Taking gold ($20) out of the sack made me unBurdened.
I blinked. I tried it again several times. Put gold in, Burdened.
Take gold out, unBurdened. When I YASD'd not many turns later, it
definitely was a sack, _not_ a cursed BoH.
Archived from groups: rec.games.roguelike.nethack (More info?)
godseyj@planetc.com wrote:
> I've never noticed this behavior before, but I'm assuming it must be a
> bug. Briefly:
>
> I had a sack. I had about $1000 in my bag. I was Burdened.
>
> Taking gold ($20) out of the sack made me unBurdened.
>
> I blinked. I tried it again several times. Put gold in, Burdened.
> Take gold out, unBurdened. When I YASD'd not many turns later, it
> definitely was a sack, _not_ a cursed BoH.
>
> What could possibly explain this?
It's an artifact of integer rounding. Gold weighs 0.01, but this is
rounded to the nearest integer. I tried this myself: with 110 gold I was
unburdened, but putting half this in a sack made me burdened. In the
first case, the gold's weight was rounded down to 1, in the second, both
the 55 gold stacks were rounded up to weight 1 (total weight 2).
Archived from groups: rec.games.roguelike.nethack (More info?)
"David Corbett" <dcorbett42@yahoo.co.nz> wrote:
> It's an artifact of integer rounding. Gold weighs 0.01, but
> this is rounded to the nearest integer. I tried this myself:
> with 110 gold I was unburdened, but putting half this in a
> sack made me burdened.
Interesting. Yes, I'd call it a bug, but it seems unlikely to be
fixed. Programmers are used to integer rounding, and refactoring large
parts of NetHack to store weights to a greater precision probably
isn't worth the effort.
Archived from groups: rec.games.roguelike.nethack (More info?)
Paul E Collins wrote:
> "David Corbett" <dcorbett42@yahoo.co.nz> wrote:
>
>>It's an artifact of integer rounding. Gold weighs 0.01, but
>>this is rounded to the nearest integer. I tried this myself:
>>with 110 gold I was unburdened, but putting half this in a
>>sack made me burdened.
>
> Interesting. Yes, I'd call it a bug, but it seems unlikely to be
> fixed. Programmers are used to integer rounding, and refactoring large
> parts of NetHack to store weights to a greater precision probably
> isn't worth the effort.
Why "unlikely to be fixed"? Why "refactoring *large* parts of Nethack"?
You don't need any greater precision, just add all coins in bags and
inventory before rounding.
(IMO, it would be even sufficient to change the rounding of the special
case for coins; i.e. this one line in hack.c:
Archived from groups: rec.games.roguelike.nethack (More info?)
Janis Papanagnou wrote:
> Paul E Collins wrote:
>
>> "David Corbett" <dcorbett42@yahoo.co.nz> wrote:
>>
>>> It's an artifact of integer rounding. Gold weighs 0.01, but
>>> this is rounded to the nearest integer. I tried this myself:
>>> with 110 gold I was unburdened, but putting half this in a
>>> sack made me burdened.
>>
>>
>> Interesting. Yes, I'd call it a bug, but it seems unlikely to be
>> fixed. Programmers are used to integer rounding, and refactoring large
>> parts of NetHack to store weights to a greater precision probably
>> isn't worth the effort.
>
>
> Why "unlikely to be fixed"? Why "refactoring *large* parts of Nethack"?
> You don't need any greater precision, just add all coins in bags and
> inventory before rounding.
And keeping track which amount is in blessed BoHs, which is in cursed
BoHs, which is in nested blessed BoHs etc. Too complicated.
Topi
--
"The whole problem with the world is that fools and fanatics are
always so certain of themselves, but wiser people so full of doubts."
- Bertrand Russell
"How come he didn't put 'I think' at the end of it?" - Anonymous
You are about to answer a thread that has been inactive for more than 6 months. If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.