Python Forum
Parsing Large Numbers Question
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parsing Large Numbers Question
#6
Hi DeaD_EyE.
You wrote: Do you know the biggest differences to Decimal which is in the stdlib of Python? What I know, up to now, is shown in next applied example:

# -------- tempo4.py ---------------
from astropy.time import Time 
from decimal import Decimal;  # up to 40 significant figures
t = Time('2006-01-15 21:24:37.5', format='iso', scale='utc', precision=6)
#
print (t.ut1.iso, t.ut1.mjd) 
print(Decimal(t.ut1.mjd))
#
print (t.ut1.jd1, t.ut1.jd2)
print (t.tt.iso, t.tt.mjd) 
print (t.tt.jd1, t.tt.jd2) 
#---------- OUTPUT ----------
# 2006-01-15 21:24:37.834136 53750.89210456175
#                            53750.8921045617535128258168697357177734375
# 2453751.0 0.3921045617535457
# 2006-01-15 21:25:42.684000 53750.89285513889
# 2453751.0 0.3928551388888888
With reference to your statement I did not know this library, but I never needed this high precision let me say why I'm familiar with the multiprecision subject. Several years ago I uploaded the following Python webpages [written in italian, because I'm italian as well as some followers] http://precismultipla.altervista.org/index.htm One of the most appreciated has been the item: Python: Numeri di Fibonacci.

Thanks, and cheers
Reply


Messages In This Thread
Parsing Large Numbers Question - by amyvaulhausen - Mar-23-2019, 06:50 PM
RE: Parsing Large Numbers Question - by samsonite - Mar-23-2019, 09:00 PM
RE: Parsing Large Numbers Question - by samsonite - Mar-24-2019, 07:03 AM
RE: Parsing Large Numbers Question - by DeaD_EyE - Mar-24-2019, 07:36 AM
RE: Parsing Large Numbers Question - by samsonite - Mar-24-2019, 08:46 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Parsing large JSON josvink66 5 673 Jan-10-2024, 05:46 PM
Last Post: snippsat
  parsing question ridgerunnersjw 7 5,087 Oct-10-2020, 09:04 PM
Last Post: ridgerunnersjw
  parsing question ridgerunnersjw 3 1,998 Oct-06-2020, 02:06 AM
Last Post: micseydel
  string parsing question ( I think) diggee17 4 3,025 Jul-24-2019, 02:37 PM
Last Post: diggee17
  Print Numbers starting at 1 vertically with separator for output numbers Pleiades 3 3,755 May-09-2019, 12:19 PM
Last Post: Pleiades
  Perfect Number formula in Python Question an Mersenne Numbers Pleiades 5 6,071 May-16-2018, 04:56 PM
Last Post: Pleiades
  I'm dividing large numbers of about 25 million digits I need to retain decimal format Pleiades 2 3,187 Apr-26-2018, 07:50 AM
Last Post: Pleiades
  dividing large numbers charlemayn 7 9,572 Feb-13-2018, 06:03 PM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020