Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #73815
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Subject | Re: 1-0.95 |
| Date | 2014-07-02 00:00 +0100 |
| References | <1404249434.13291.YahooMailNeo@web140104.mail.bf1.yahoo.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.11389.1404255614.18130.python-list@python.org> (permalink) |
On 01/07/2014 22:17, Pedro Izecksohn wrote: > pedro@microboard:~$ /usr/bin/python3 > Python 3.3.2+ (default, Feb 28 2014, 00:52:16) > [GCC 4.8.1] on linux > Type "help", "copyright", "credits" or "license" for more information. >>>> 1-0.95 > 0.050000000000000044 >>>> > > How to get 0.05 as result? > > bc has scale=2 . Has Python some similar feature? > Asked and answered roughly one trillion times. Try searching for python floating point, not that this is specific to python. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: 1-0.95 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-02 00:00 +0100
csiph-web