iwana ahelp Programming Software Development by sara_2 … set functions should verify that length and width are each floatingpoint numbers larger than 0.0 and less than 20.0… Float accuracy Programming Software Development by Mouche … aware of the [URL="http://docs.python.org/tutorial/floatingpoint.html"]limitations of floating point arithmetic[/URL], but I… Re: Mod- unexpected result Programming by Gribouillis … have a look at [https://docs.python.org/3/tutorial/floatingpoint.html](https://docs.python.org/3/tutorial… Re: Division between two integers and float result Programming Software Development by vegaseat You could update to Python 3.1 where '/' is the floatingpoint division and '//' is the integer division. Actually, with Python2 versions, 4./5 would be simpler to type then 4.0/5 or float(4)/5 :) Re: Division between two integers and float result Programming Software Development by nunos [QUOTE=vegaseat;949687]You could update to Python 3.1 where '/' is the floatingpoint division and '//' is the integer division. Actually, with Python2 versions, 4./5 would be simpler to type then 4.0/5 or float(4)/5 :)[/QUOTE] Thanks for the two tips. I will keep that in mind. Cheers :icon_wink: Re: round function doesn't seem to be working for me Programming Software Development by Gribouillis Also, check [url=http://docs.python.org/tutorial/floatingpoint.html]this page[/url]. Re: Python modulo quick question Programming Software Development by Gribouillis …[/url] and also here [url]http://docs.python.org/tutorial/floatingpoint.html[/url] . Re: Problem with Decimal Floating Point Programming Software Development by Gribouillis Start with this documentation page [url]http://docs.python.org/tutorial/floatingpoint.html[/url]. A problem is that python's 0.1 is not the mathematical 0.1 because 0.1 can not be represented exactly as a machine binary number. Re: Problem with Decimal Floating Point Programming Software Development by woooee The limits of floating point numbers [url]http://www.lahey.com/float.htm[/url] [url]http://docs.python.org/tutorial/floatingpoint.html[/url] Use decimal for more precision. [CODE]from decimal import Decimal as dec # 0.1 + 0.1 + 0.1 - 0.3 = 0.0 x = dec("0.1") y = dec("0.3") print x + x + x - y [/CODE] Re: Turn "13.33" to 13.33 ? Programming Software Development by Gribouillis … base 2. Read this [url]http://docs.python.org/tutorial/floatingpoint.html?highlight=arithmetics[/url] . Re: iwana ahelp Programming Software Development by kvprajapati Welcome sara_2, We only give help to those who show effort. You might want to read the [URL="http://www.daniweb.com/forums/announcement58-2.html"]homework[/URL] policy and [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]member rules[/URL]. Re: Float accuracy Programming Software Development by griswolf Consider the [URL="http://docs.python.org/library/decimal.html"]decimal[/URL] module. Re: Float accuracy Programming Software Development by snippsat [QUOTE]but I would at least be able to choose how many digits it goes out to, and not have it end prematurely. Do you have any suggestions?[/QUOTE] There is no problem to control how many digits you want with decimal module use [ICODE]getcontext().prec[/ICODE] or python string formatting. [CODE]>>> from decimal import * >>> … Re: Float accuracy Programming Software Development by Mouche Thanks, I'll look into the Decimal module.