Ask Your Question
0

precision when using numpy

asked 2013-10-25 15:37:07 +0100

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'> ) ???

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-10-25 16:10:06 +0100

vdelecroix gravatar image

updated 2013-10-25 22:44:41 +0100

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
edit flag offensive delete link more

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: 2013-10-25 15:37:07 +0100

Seen: 333 times

Last updated: Oct 25 '13