Well, there are good reasons behind that limitations. However there is a
float(x) function.
So:
x =2
y =5
float(x)/float(y)
0.4
So any input by the user you can convert to float.
On Sun, 1 Sep 2002, Russell Hires wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello...
>
> There doesn't seem to be anything that references this that I can find. I
> want to produce a floating point result from the division of two integers,
> but in order to get that result, I have to enter the input as floats as well.
> In other words, 2/5 = 0, but 2.0/5 = .4. There's got to be a way around this
> limitation. I shouldn't have to force the user to enter a decimal point when
> they are inputting numbers.
>
> Anybody have any ideas?
>
> Russell
> - --
> Linux -- the OS for the Renaissance Man
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE9cZHvAqKGrvVshJQRApD4AKDG9adPV6YGQYjLTMlROkk2PAphMwCfdZHU
> 0A6YGwyooc60MKvwjo75Akk=
> =6Fk6
> -----END PGP SIGNATURE-----
>
This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:29:58 EDT