Welcome, Guest

Author Topic: Decimal places...  (Read 6157 times)

AndyShell

  • *
  • Posts: 8
Decimal places...
« on: July 01, 2011, 01:57:03 PM »

How many decimal places do we have to play with when entering values for an object's mass?   

Thanks

-

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Decimal places...
« Reply #1 on: July 01, 2011, 02:20:12 PM »
Any amount. None if you don't want any, or 9001 if it will let you type that many.

AndyShell

  • *
  • Posts: 8
Re: Decimal places...
« Reply #2 on: July 01, 2011, 03:46:15 PM »
OK.  Thanks.

-

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Decimal places...
« Reply #3 on: July 01, 2011, 11:14:48 PM »
When you type a number like 1.00005 into a text box, it may looks as if it's rounded it to 1.00, but internally it's being stored as 1.00005.

Most of the numbers in Universe Sandbox are stored as 64 bit double precision floating point values. So while you can use incredibly huge numbers, you do begin to loose precision.

http://en.wikipedia.org/wiki/Double_precision

AndyShell

  • *
  • Posts: 8
Re: Decimal places...
« Reply #4 on: July 02, 2011, 01:38:38 PM »
Right, I see.  Thanks for the clarification Dan. 

I've been playing around with "The figure 8", increasing the mass of  STAR A, and it seems to make very little difference weather you add 0.001 or 0.00000000000000000000000001, the system breaks down within half a dozen cycles regardless.  I'm quite surprised at this, and must admit that I expected to see a much more gradual decay.   I suppose that's what I get for living in a chaotic universe.  :)

-



sleepcircle

  • *
  • Posts: 4
Re: Decimal places...
« Reply #5 on: April 04, 2014, 03:15:51 PM »
Hey, I don't want to unnecessarily resurrect a topic but on the other hand this seems like as good a way as any to keep the answers relating to it in the same places.

Universe Sandbox--it's great to hear btw--has floating point decimal numbers, but I am danged if i know how to get them out of this puzzlebox. I would like to, if i can, access the numbers that the program works with, so that I can use them in other calculations of my own. I know that there's only a certain amount of use precision can be of after a certain number of decimal places, but if I can't access numbers any more specific than 2 digits down the line I'm not sure if I can make use of them. I might try and root around in the save file for the specific numbers, if it turns out that I can't get them through the program interface itself.


By the way, since this is my first post, I would like to say that I think this program is absolutely fantastic, and It's been a tremendous help to me so far. Gosh, I can't even begin to explain how. Thanks a lot for making it, and I really look forward to version 2/3.

(hey there you go. instead of calling it 'version 3' or 'version 2', call it 'version two thirds' and pretend you are an anime)


EDIT: I should be clear, I don't mean like, the calculations you use, I mean things like the orbital elements and velocity and things of certain objects.



OTHER EDIT: Oh wait I totally figured it out! I can get them out of unpacked UBOX files. Awesome. Well I guess this is a reference for everyone else, now!
« Last Edit: April 04, 2014, 09:40:22 PM by sleepcircle »

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Decimal places...
« Reply #6 on: May 01, 2014, 02:46:30 PM »
In short... without another update, there's no way to get the full value out of a text box while the program is running...

But yeah, you can get them from the UBOX files (which are zip files that contain xml files with all the save data).

And so glad you like Universe Sandbox...