• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
summarize to floats
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

summarize to floats


  • Subject: summarize to floats
  • From: Jens Kohl <email@hidden>
  • Date: Sun, 24 Aug 2003 02:53:23 +0200

I'm learning cocoa at the moment. So I wrote a small application which reads two textfields into to floats. Than float1 + float2 and write it to a third textfield. Nothing wrong with that works. But I realize a strange behaviour:

0.5 + 0.5 = 1
0.6 + 0.6 = 1.1929xxxx // or something like that; should be 1.2 in my opinion.

Can somebody explain that?

jens
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: summarize to floats
      • From: Glenn Andreas <email@hidden>
  • Prev by Date: Printing question (Problem!)
  • Next by Date: Re: summarize to floats
  • Previous by thread: Printing question (Problem!)
  • Next by thread: Re: summarize to floats
  • Index(es):
    • Date
    • Thread