Hi Wei, This is caused by the precision of float-point number. You can fix it with `//`. e.g: a = 7871572981212338496 b = a//4
Thanks, Kerwin Weiguang Hou <[email protected]> 于2020年8月28日周五 下午1:02写道: > The following calculation result does not match the value calculated by a > calculator! > a= 7871572981212338496 > b=int(a/4) > print(b) > 1967893245303084*544* > The result calculated by a calculator is 1,967,893,245,303,084,*624* > Something is wrong! > Any one has any idea? > Thanks, > Wei > > -- > You received this message because you are subscribed to the Google Groups > "Project Jupyter" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jupyter/37ec1ff7-79d9-46c1-bb3a-549ae819783cn%40googlegroups.com > <https://groups.google.com/d/msgid/jupyter/37ec1ff7-79d9-46c1-bb3a-549ae819783cn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAKcTMPqBV9%3D6MSTTTTO%2Butd8me3WOL24wLvDEJK6_-kThWArbQ%40mail.gmail.com.
