Python Forum
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Large Number Math
#1
Hi all,

I'm trying to write a calculator to help me with some research that I am doing. I only need the following basic math functions (multiply, divide, add, subtract, square root) but I need exact precision. Also, I am only looking for precise integers, any results with a decimal value are discarded. I have tried utilizing the decimal library but I am running into errors with it, it seems that unless I know the exact level of decimal precision required for each calculation the decimal functions have a tendency to return inaccurate numbers.

Is there a better way to do this? Speed of processing is not so much a factor as accuracy is.
Reply


Messages In This Thread
Large Number Math - by fibonacci - Nov-20-2018, 07:15 PM
RE: Large Number Math - by nilamo - Nov-20-2018, 07:23 PM
RE: Large Number Math - by Gribouillis - Nov-20-2018, 08:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  math.log versus math.log10 stevendaprano 10 2,425 May-23-2022, 08:59 PM
Last Post: jefsummers
  Why getting ValueError : Math domain error in trig. function, math.asin() ? jahuja73 3 3,781 Feb-24-2021, 05:09 PM
Last Post: bowlofred

Forum Jump:

User Panel Messages

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