﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20648	Template variable and loss of precision	maciag.artur@…	nobody	"I use BigIntegerField in model. When i try  use it as template variable I get different value.  It's becouse all values are initially resolved as float (django/template/base.py:700) and then back to int if float not detected. Based on [http://en.wikipedia.org/w/index.php?title=Floating_point&oldid=376101741#IEEE_754%3a_floating_point_in_modern_computers IEEE 754] it will work only for any integer with absolute value less than or equal to 2^53:

{{{
from django.template import Variable

Variable(str(2**53)).resolve(None) == 2**53
}}}

but not for greater than 2^53:

{{{
Variable(str(2**53+1)).resolve(None) == 2**53+1
}}}

"	Bug	closed	Template system	dev	Normal	duplicate		bmispelon@…	Accepted	0	0	0	0	0	0
