Steve Jackson Games - Site Navigation
Home General Info Follow Us Search Illuminator Store Forums What's New Other Games Ogre GURPS Munchkin Our Games: Home

Go Back   Steve Jackson Games Forums > Roleplaying > GURPS

Reply
 
Thread Tools Display Modes
Old 07-25-2007, 08:47 PM   #1
Agemegos
 
Agemegos's Avatar
 
Join Date: May 2005
Location: Oz
Default [Space] DIV/0 error in starsystem generation sequence

In the the starsystem generation sequence in GURPS Space it is possible for a star system to have an age of 0. Since the unit of measure is billions of years, and the table entries go to one decimal place (with a '5', sometimes, in the second decimal place), this is fair enough. Age = 0 represents systems younger than about 250 million years.

However, in the rules for generating the level of volcanic activity (Step 31, on p.119) you divide surface gravity by age. This can produce a divide-by-zero error.
__________________

Decay is inherent in all composite things.
Nod head. Get treat.

Last edited by Agemegos; 10-30-2010 at 08:43 PM.
Agemegos is offline   Reply With Quote
Old 07-25-2007, 08:58 PM   #2
MIB 1473
 
MIB 1473's Avatar
 
Join Date: Aug 2004
Location: Pittsburgh, PA
Default Re: [Space] DIV/0 error in starsystem generation sequence

Quote:
Originally Posted by Agemegos
G'day

In the the starsystem generation sequence in GURPS Space it is possible for a star system to have an age of 0. Since the unit of measure is billions of years, and the table entries go to one decimal place (with a '5', sometimes, in the second decimal place), this is fair enough. It represents systems younger than about 250 million years.

However, in the rules for generating the level of volcanic activity (Step 31, on p.119) you divide surface gravity by age. This can produce a divide-by-zero error.

Regards,


Brett
Perhaps substituting 0.25 (or 0.125, or a random value between 0 and 0.25) for 0 would solve your problem?
MIB 1473 is offline   Reply With Quote
Old 07-25-2007, 09:24 PM   #3
whswhs
 
Join Date: Jun 2005
Location: Lawrence, KS
Default Re: [Space] DIV/0 error in starsystem generation sequence

Quote:
Originally Posted by Agemegos
In the starsystem generation sequence in GURPS Space it is possible for a star system to have an age of 0. Since the unit of measure is billions of years, and the table entries go to one decimal place (with a '5', sometimes, in the second decimal place), this is fair enough. Age = 0 represents systems younger than about 250 million years.

However, in the rules for generating the level of volcanic activity (Step 31, on p.119) you divide surface gravity by age. This can produce a divide-by-zero error.
Mathematically that's an error, yes. In actual fact, though, those star systems don't have an age of zero; they have an age that rounds down to zero when you divide by 10^8—that is, anything less than 50 million years. The rounding produces problems for the specific case of figuring volcanic activity.

You could assume an arbitrary age of, say, 50 million years (0.05 billion). But I would suggest an even simpler approach. If the modified roll for volcanic activity is 71 or higher, you get extreme vulcanism. Infinity is greater than 71. So just treat it as "increases without limit" and as automatically greater than 71—that is, every world in such a system has extreme vulcanism. Save the dice roll entirely.

Bill Stoddard
whswhs is online now   Reply With Quote
Old 07-25-2007, 09:28 PM   #4
David Johnston
 
Join Date: Oct 2006
Default Re: [Space] DIV/0 error in starsystem generation sequence

Is this a problem with a spreadsheet? I don't find it to be a problem in in principle because an age 0 star would presumably not have any planets anyway, just coagulating clouds of dust.
David Johnston is offline   Reply With Quote
Old 07-25-2007, 11:35 PM   #5
Agemegos
 
Agemegos's Avatar
 
Join Date: May 2005
Location: Oz
Default Re: [Space] DIV/0 error in starsystem generation sequence

Quote:
Originally Posted by David Johnston
Is this a problem with a spreadsheet?
Not any more. I put in yet another exception trap to handle it. (Exception handling in spreadsheet programming is a lot of fun.)
__________________

Decay is inherent in all composite things.
Nod head. Get treat.
Agemegos is offline   Reply With Quote
Old 07-25-2007, 11:38 PM   #6
Agemegos
 
Agemegos's Avatar
 
Join Date: May 2005
Location: Oz
Default Re: [Space] DIV/0 error in starsystem generation sequence

Quote:
Originally Posted by whswhs
Mathematically that's an error, yes. In actual fact, though, those star systems don't have an age of zero; they have an age that rounds down to zero when you divide by 10^8—that is, anything less than 50 million years. The rounding produces problems for the specific case of figuring volcanic activity.
Just so. There is no fundamental problem that is not easily sidestepped with a bit of understanding and circumspection. It is only when you attempt to apply the rules in a mechanical way that you encounter the problem. As for instance when you are coding the algorithm for a computer to execute.

Quote:
You could assume an arbitrary age of, say, 50 million years (0.05 billion). But I would suggest an even simpler approach. If the modified roll for volcanic activity is 71 or higher, you get extreme vulcanism. Infinity is greater than 71. So just treat it as "increases without limit" and as automatically greater than 71—that is, every world in such a system has extreme vulcanism. Save the dice roll entirely.
Indeed. Programming conventionally that means that before you execute the division statement you test the exception and force a result of at least 71. Programming on a spreadsheet is equivalent, but done slightly differently.

Exception testing before any division is routine for professional programmers. But I didn't think that it was a bad idea not to give the many amateurs who are having a go at this project a 'heads up' about a potential run-time error.
__________________

Decay is inherent in all composite things.
Nod head. Get treat.

Last edited by Agemegos; 07-25-2007 at 11:43 PM.
Agemegos is offline   Reply With Quote
Old 07-25-2007, 11:47 PM   #7
Agemegos
 
Agemegos's Avatar
 
Join Date: May 2005
Location: Oz
Default Re: [Space] DIV/0 error in starsystem generation sequence

Quote:
Originally Posted by David Johnston
Is this a problem with a spreadsheet? I don't find it to be a problem in in principle because an age 0 star would presumably not have any planets anyway, just coagulating clouds of dust.
As whswhs emphasised, they aren't really age zero. Age has been rounded to the nearest whole multiple of 0.05 billion years. 'Age 0' represents anything up to 25 million years.
__________________

Decay is inherent in all composite things.
Nod head. Get treat.
Agemegos is offline   Reply With Quote
Old 07-26-2007, 05:24 AM   #8
Rupert
 
Rupert's Avatar
 
Join Date: Aug 2004
Location: Wellington, NZ
Default Re: [Space] DIV/0 error in starsystem generation sequence

Quote:
Originally Posted by Agemegos
ot any more. I put in yet another exception trap to handle it. (Exception handling in spreadsheet programming is a lot of fun.)
If your sheets are like mine, they'll end up full of cells that are cluttered with nested IF(.....) statements, none of which make any sense the next morning.
__________________
Rupert Boleyn

"A pessimist is an optimist with a sense of history."
Rupert is offline   Reply With Quote
Old 07-26-2007, 06:39 AM   #9
Agemegos
 
Agemegos's Avatar
 
Join Date: May 2005
Location: Oz
Default Re: [Space] DIV/0 error in starsystem generation sequence

Quote:
Originally Posted by Rupert
If your sheets are like mine, they'll end up full of cells that are cluttered with nested IF(.....) statements, none of which make any sense the next morning.
It goes in waves. Sometimes there are carefully-named columns full of condition flags.
__________________

Decay is inherent in all composite things.
Nod head. Get treat.
Agemegos is offline   Reply With Quote
Old 07-26-2007, 09:04 AM   #10
David Johnston
 
Join Date: Oct 2006
Default Re: [Space] DIV/0 error in starsystem generation sequence

Quote:
Originally Posted by Agemegos
As whswhs emphasised, they aren't really age zero.
Didn't think they were, but I'd still class them as "too young to have planets".
David Johnston is offline   Reply With Quote
Reply

Tags
space, system generation

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Fnords are Off
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 06:51 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.