Re: WOWS or Cocoa bug?
Re: WOWS or Cocoa bug?
- Subject: Re: WOWS or Cocoa bug?
- From: Paul Lynch <email@hidden>
- Date: Sun, 5 Nov 2006 16:27:29 +0000
On 5 Nov 2006, at 13:46, Ricardo Strausz wrote:
I am using doubles in both sides: the server and the client...
Shall I blame them?
You should. float and double are both floating point primitives in
java; double offers more precision (the number of significant digits)
than float. But, as pointed out, any type of float is inherently
precise.
If you want to create a calculator object, it is a good idea to use
BigDecimal. Java was originally designed as a PDA/set top box
language, and its roots often show. Treat this as an opportunity to
demonstrate the benefits of encapsulation in an object oriented
design :-).
Paul
On Nov 5, 2006, at 3:47 AM, Paul Lynch wrote:
On 5 Nov 2006, at 01:35, Ricardo Strausz wrote:
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?
At a guess - blame floats.
_______________________________________________
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