1

I am looking to do some basic math in python. However, I am dealing with numbers such as 0.0000000001 and -0.00000000001

Are there any variables that can hold 10 decimal places with negative and positive numbers?

If not, I could multiply by 100000000000 and make it one, what is the best variable to hold numbers between -100000000000 and 100000000000?

Thanks :)

0

1 Answer 1

4

You probably want the decimal module:

from decimal import Decimal x = Decimal('0.0000000001') y = Decimal('-0.00000000001') 
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Haidro, knew it would be something simple.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.