• 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
Re: WOWS or Cocoa bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOWS or Cocoa bug?


  • Subject: Re: WOWS or Cocoa bug?
  • From: Ricardo Strausz <email@hidden>
  • Date: Sun, 5 Nov 2006 08:31:22 -0600

Jesus, Maria & Josef!

On Nov 5, 2006, at 8:13 AM, Ken Anderson wrote:

Ricardo,

Doubles are inherently imprecise because of the way they store floating point numbers. This is useful reading:

http://en.wikipedia.org/wiki/Floating_point

BigDecimal stores numbers in a non-lossy (albeit larger) format. I would suggest avoiding doubles if you need high precision, or just round the result if you don't.

One fun exercise, if you have an Apple ][ handy - is to type:

print 7*7

at the BASIC prompt.  The answer?

49.000000000001

:)

Ken

On Nov 5, 2006, at 9:02 AM, Ricardo Strausz wrote:

Hola Kieran!

Do you mean java.math.BigDecimal?
If so, does this means that java cannot add two double numbers without a math library?


wired!

My first guess was to blame the tranport (SOAP or XML-RPC)... but I do not have experience with these...

How does precision have to do with my PPC?
Does someone know the differences between the precision in Objective-C and in Java?


Any how, I will rewrite it with BigDecimals and let you know...

Dino

On Nov 5, 2006, at 6:47 AM, Kieran Kelleher wrote:

The Calculator.java _example_ uses double ..... why not revise it to use BigDecimal instead?

Kieran

On Nov 4, 2006, at 8:35 PM, Ricardo Strausz wrote:

Hola!

Playing with WOWS and Cocoa I found that even a simple sum, is buggy...

I'd published the Calculator.java example from WO and consume it with WebServicesCore.framework in a very straight-forward way (the details are in http://strausz.blogspot.com/2006/11/ consuming-calculatorjava-ws.html ); while adding 3.4 to 6.6, instead of 10.0 I did get 9.999998099999999 ... close, but not correct =:+(

To whom I shall blame?

Dino
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anderhome.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >WOWS or Cocoa bug? (From: Ricardo Strausz <email@hidden>)
 >Re: WOWS or Cocoa bug? (From: Kieran Kelleher <email@hidden>)
 >Re: WOWS or Cocoa bug? (From: Ricardo Strausz <email@hidden>)
 >Re: WOWS or Cocoa bug? (From: Ken Anderson <email@hidden>)

  • Prev by Date: Re: WOWS or Cocoa bug?
  • Next by Date: Re: WOWS or Cocoa bug?
  • Previous by thread: Re: WOWS or Cocoa bug?
  • Next by thread: Somewhere a short howto for using JasperReports with WO?
  • Index(es):
    • Date
    • Thread