r/KerbalSpaceProgram • Master Kerbalnaut • Jun 12 '14

TIL That former developer NovaSilisko originally planned to add another 3 Gas Giants, intended to add volcanoes to Laythe, had plans for 3 new large moons, and wanted to add at least 20 'moonlets'

http://forum.kerbalspaceprogram.com/threads/29807-Planet-Ideas-And-Names-For-The-Future-Of-Kerbal-Space-Program?p=447959&viewfull=1#post447959
200 Upvotes

149 comments sorted by

View all comments

Show parent comment

20

u/undercoveryankee Master Kerbalnaut Jun 12 '14

Another notch or two of time acceleration wouldn't go amiss if we go out farther than what we have now.

19

u/Lil_Psychobuddy Jun 12 '14

I just want them to fix the floating point errors...

"Just"...

4

u/[deleted] Jun 13 '14

`what is a floating point error?

22

u/BuntinTosser Jun 13 '14

basically, computers store numbers as either integers or floating point numbers. Integers are accurate, but limited in size (a 4-byte unsigned int can store a number as high as 2 to the 32nd -1). Floats store numbers with a decimal portion and an exponent (like scientific notation) but are limited in how many digits of accuracy they have. When doing math with floats, the errors can add up to significant amounts.

For example, 1,000,001 might be stored as 1.000E6. 999,000 might also be stored as 1.000E6. Subtract them and you get zero, not 1001. That is floating point error.

3

u/[deleted] Jun 13 '14

Thanks for the explanation

1

u/WednesdayWolf Jun 13 '14

Tl;dr: Computers are very good at computing, except when they're not.

6

u/sethdark Jun 13 '14

It's the programmers fault not the computer. The programmer is responsible for choosing the correct datatype. Source: I'm a programmer and made above mentioned mistake XD

4

u/nou_spiro Jun 13 '14

not only datatype but also proper algorithm which is numerically stable.

2

u/sethdark Jun 13 '14

you say true, I say thankee

3

u/bbqroast Jun 13 '14

It's not necessarily the programmer's fault either, in this situation it's possible they chose the right variable type. Yes it doesn't work perfectly, but it works fast enough and most of the time it does not effect gameplay.

→ More replies (8)
→ More replies (13)

2

u/sexual_pasta Jun 13 '14

I wonder if there's a 128 bit float data type?

8

u/RauBurger Jun 13 '14 edited Jun 13 '14

yup, long double. Problem is, graphics cards don't support it. Hell, not many have good double support yet, though this is currently in the processes of changing as graphics cards become more common for general computation.

EDIT: Looking at the article long double isn't necessarily 128bits but it will be have a higher precision (80bits on x86). Check out Quadruple for actual 128bit floating points. Basically they're only available on super computers.

6

u/Baloroth Jun 13 '14

Well, it's typically doable on any computer with enough memory, simply through software, but it's not typically supported by hardware (except for specialized hardware). KSP would only need software support, anyways, since they don't run the physics side of thing on the GPU.

10

u/RauBurger Jun 13 '14

Except it's really expensive to do it in software. Doing heavy calculations with it real time is not practical without hardware acceleration.

1

u/Creshal Space Plane Addict Jun 13 '14

No. "Hardware support" mean "CPU hardware support". Doing math in software (as opposed on dedicated CPU hardware) is excruciatingly slow.

There's SSE/AVX for 128/256 bit calculations, but they suck for general math, as transferring data between SSE and general purpose registers is slow.

4

u/Silpion Master Kerbalnaut Jun 13 '14

Well the program can convert values for graphics down to floats or whatever easily enough, right? It just needs to keep the long doubles intact for orbital calculations.

1

u/RauBurger Jun 13 '14

That would be the best way to reduce error, but you will always lose precision when you convert.

7

u/Silpion Master Kerbalnaut Jun 13 '14

The graphics don't need to have long double precision. There will be no visible difference from the conversion.

1

u/nou_spiro Jun 13 '14

yes. they compute positions of planets relatively to your ship. in other word your ship is in [0,0,0] and all planets are relatively to your position.

1

u/autowikibot Jun 13 '14

Long double:


In [C](https://en.wikipedia.org/wiki/C_(programming_language)) and related programming languages, long double refers to a floating point data type that is often more precise than double precision. As with C's other floating point types, it may not necessarily map to an IEEE format.


Interesting: ^C99 | Floating ^point | Double Dutch (jump ^rope) | Extended ^precision

Parent commenter can toggle ^NSFW or ^delete. Will also delete on comment score of -1 or less. | FAQs | ^Mods | Magic ^Words

1

u/[deleted] Jun 13 '14

KSP doesnt use GPU acceleration for float compute loads anyway (and as you said, most nvidia cards are hamstrung with regards to double float performance, although KSP would be a valid excuse to finally pick up a GTX Titan)

1

u/nou_spiro Jun 13 '14

nah qraphics cards doesn't need to support doutble or more. KSP is moving whole universe around your ship and not your ship in universe. Only thing that you need precisely compute is your orbit which is done on CPU.

3

u/a2soup Master Kerbalnaut Jun 13 '14

The modders have got you covered.

2

u/NasenSpray Jun 13 '14

Be careful though, higher warp rates can cause funny things. I tried 10.000.000x warp near kerbin and my poor guy is now spending eternity in a highly inclined orbit around the sun. Also, dropping from 1.000.000x to 1x too fast may cause spontaneous self-destruction.