Improve precision on stardate script

There is a possibility that for every 0.1 stardates (8640 seconds),
the final 0.05 stardate would get rounded up (432 seconds). This kind
of inaccuracy is unacceptable by Starfleet standards, so I've reduced
the inaccuracy to 5e-10 stardates or 43.2 microseconds.
master
nirenjan 2013-05-03 22:26:43 -07:00
parent 372a2e13e0
commit cbb52a3db2
1 changed files with 1 additions and 1 deletions

2
sdate
View File

@ -12,5 +12,5 @@ t = time.time()
jd = (t / 86400.0 + 40587.5) jd = (t / 86400.0 + 40587.5)
# Use the idea that 10 Julian days is equal to 1 stardate # Use the idea that 10 Julian days is equal to 1 stardate
print ("%05.3f" % jd)[:-1] print ("%05.9f" % jd)[:-7]