mirror of https://github.com/nirenjan/dotfiles.git
				
				
				
			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.vimbundler
							parent
							
								
									489813cdc8
								
							
						
					
					
						commit
						66f3164bda
					
				|  | @ -12,5 +12,5 @@ t = time.time() | |||
| jd = (t / 86400.0 + 40587.5) | ||||
| 
 | ||||
| # Use the idea that 10 Julian days is equal to 1 stardate | ||||
| print ("%05.3f" % jd)[:-1] | ||||
| print ("%05.9f" % jd)[:-7] | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue