Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > Why floating nu...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 2154 of 2317
Post > Topic >>

Why floating numbers dont subtract?

by di98mase <di98mase@[EMAIL PROTECTED] > Feb 7, 2008 at 12:23 PM

Hi,

I have created two floating numbers using sprintf.

when I print them I get the following output:
61800.0
61800.950000

When I try to subtract them I get:
0,000000

Why, I thougt that gawk "automatically" converts strings to numbers?

/di98
 




 5 Posts in Topic:
Why floating numbers dont subtract?
di98mase <di98mase@[EM  2008-02-07 12:23:39 
Re: Why floating numbers dont subtract?
Ed Morton <morton@[EMA  2008-02-07 14:26:30 
Re: Why floating numbers dont subtract?
di98mase <di98mase@[EM  2008-02-10 23:47:32 
Re: Why floating numbers dont subtract?
Ed Morton <morton@[EMA  2008-02-11 07:51:44 
Re: Why floating numbers dont subtract?
mjc <mjcohen@[EMAIL PR  2008-02-11 11:09:48 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 15:06:24 CDT 2008.