Ask Your Question
0

precision when using numpy

asked 2013-10-25 08:37:07 -0500

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 09:10:06 -0500

updated 2013-10-25 15:44:41 -0500

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 08:37:07 -0500

Seen: 100 times

Last updated: Oct 25 '13