This is an issue with python (not jupyter) converting your number a/4 from floating point to integer, resulting in precision loss. See the table at https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex, and in particular footnote (2) and (3).
One way to get the answer is to use python 3 floor division: a//4 Thanks, Jason On Thu, Aug 27, 2020 at 10:02 PM Weiguang Hou <[email protected]> wrote: > 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/CAPDWZHwSDvD-0yJ8rZRVbW9DFPpy56TxzYmu6SLSb-NVov3qPQ%40mail.gmail.com.
