Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 14 results for
floatingpoint
- Page 1
iwana ahelp
Programming
Software Development
15 Years Ago
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
13 Years Ago
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
8 Years Ago
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
15 Years Ago
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
15 Years Ago
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
15 Years Ago
by Gribouillis
Also, check [url=http://docs.python.org/tutorial/
floatingpoint
.html]this page[/url].
Re: Python modulo quick question
Programming
Software Development
15 Years Ago
by Gribouillis
…[/url] and also here [url]http://docs.python.org/tutorial/
floatingpoint
.html[/url] .
Re: Problem with Decimal Floating Point
Programming
Software Development
14 Years Ago
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
14 Years Ago
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
13 Years Ago
by Gribouillis
… base 2. Read this [url]http://docs.python.org/tutorial/
floatingpoint
.html?highlight=arithmetics[/url] .
Re: iwana ahelp
Programming
Software Development
15 Years Ago
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
13 Years Ago
by griswolf
Consider the [URL="http://docs.python.org/library/decimal.html"]decimal[/URL] module.
Re: Float accuracy
Programming
Software Development
13 Years Ago
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
13 Years Ago
by Mouche
Thanks, I'll look into the Decimal module.
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
Backlink Auditor
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC