First time here? Check out the FAQ!

Ask Your Question
0

precision when using numpy

asked 11 years ago

Mohamed Gaafar gravatar image

when using numpy, do i have to take care of the ranges for integers, floats, ..etc. and what if the number exceeds the limits for int64 or float64, what shall i do then ? and does this problem exist als for the normal integer data type in sage ('sage.rings.integer.Integer'> ) ???

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 11 years ago

vdelecroix gravatar image

updated 11 years ago

Numpy integer are limited precision but not Sage integers:

sage: two = numpy.int64(2)
sage: two ** 125
-9223372036854775808

sage: two = 2
sage: two ** 125
42535295865117307932921825928971026432
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 11 years ago

Seen: 336 times

Last updated: Oct 25 '13