[issue35672] Error on divide
New submission from Jorge Teran : The following code produces an error in the diivision in python 3.5, 3.7 works in python 2.7 import math import sys x=int(1000112004278059472142857) y1=int(103) y2=int(133) y3=int(137) y4=int(139) print (int(y1y2y3y4)) print (x) #this product equals x Correct print (int(y2y3*y4)) n=int(x / y1) print (n) #n is an incorrect answer #works in pythoin 2.7 #Gives an incorrect answe in python 3.6.7, 3.7.1 -- components: Interpreter Core messages: 333107 nosy: Jorge Teran priority: normal severity: normal status: open title: Error on divide versions: Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue35672> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35672] Error on divide
Jorge Teran added the comment: Thanks El dom., 6 de ene. de 2019 08:53, Yash Aggarwal escribió: > > Yash Aggarwal added the comment: > > @Jorge Teran > The division operator was changed in python 3. Now, if you use '/' for > division between ints, the result would still be float. To get the same > effect as python 2.x, you will have to use '//', i.e. floor division > > -- > nosy: +FR4NKESTI3N > > ___ > Python tracker > <https://bugs.python.org/issue35672> > ___ > -- ___ Python tracker <https://bugs.python.org/issue35672> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com