运行代码:
报错:
ComplexWarning: Casting complex values to real discards the imaginary part
(将复数转换为实数丢弃虚部)
原因:
a是int32,能表示的最大数是2**32-1,而10**10显然超出这个范围;
原文地址:
https://stackoverflow.com/questions/7559595/python-runtimewarning-overflow-encountered-in-long-scalars