07-14-2015, 08:26 AM | #1 |
Join Date: Aug 2004
Location: Hamilton, Ont. CANADA
|
FWIW: A Significant Formula for GURPS Spreadsheets
It is traditional in GURPS to round the final value of most calculations to 2 significant digits. While I have not been able to find a built-in function to do this in the (OpenOffice) spreadsheets I use, the following formula works fine to display values to that precision.
Code:
=ROUND(J8;IF(J8=0;0;INT(2-LOG10(ABS(J8))))) Dalton “who prefers 3 digits himself, but I'm not the Secret Masters” Spence
|
07-14-2015, 10:26 PM | #2 |
Banned
Join Date: Oct 2007
Location: Europe
|
Re: FWIW: A Significant Formula for GURPS Spreadsheets
Odd. I'd be very surprised if Libre Office (a fork off Open Office, that's apparently preferred by many, for reasons I no longer remember, but which I've switched over to myself) can't round to significant digits.
|
07-15-2015, 09:48 AM | #3 |
Join Date: Jun 2006
Location: On the road again...
|
Re: FWIW: A Significant Formula for GURPS Spreadsheets
Mine can, but what I think the formula does is handle the case that "23,530" needs to round to "24,000" while "2.353" needs to round to "2.4" in the same cell for calculations. Manually adjusting the "X" in "=ROUND(blah;X)" every time can get tedious, since the -2 in =ROUND(23530;-2) is just offsetting from the decimal.
__________________
"Life ... is an Oreo cookie." - J'onn J'onzz, 1991 "But mom, I don't wanna go back in the dungeon!" The GURPS Marvel Universe Reboot Project A-G, H-R, and S-Z, and its not-a-wiki-really web adaptation. Ranoc, a Muskets-and-Magery Renaissance Fantasy Setting |
07-15-2015, 12:17 PM | #4 | |
Join Date: Oct 2008
|
Re: FWIW: A Significant Formula for GURPS Spreadsheets
Quote:
|
|
07-15-2015, 03:33 PM | #5 |
Join Date: Aug 2008
|
Re: FWIW: A Significant Formula for GURPS Spreadsheets
Yeah, I usually use ROUND(VALUE,SIGFIG-LEN(INT(VALUE))), myself. IIRC, someties you need an IF to sort out VALUEs less than 1, but otherwise its pretty simple.
__________________
Buy My Stuff! Free Stuff: Dungeon Action! Totem Spirits My Blog: Above the Flatline. |
Tags |
gurps, spreadsheet |
|
|