Re: GWT-client math vs. java-math

2019-05-19 Thread Craig Mitchell
The biggest difference I saw when running shared code between Java and JavaScript, was that JavaScript doesn't support floats (they will be treated as doubles in JavaScript). -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from

Re: GWT-client math vs. java-math

2019-05-19 Thread Craig Mitchell
My testing has revealed that Math.sqrt does not yield the same results. I think GWT just converts Math.sqrt to the JavaScript Math.sqrt function. I noticed the JavaScript Math.sqrt function returns different results based on what browser, and what operating system you are using. I couldn't

Re: GWT-client math vs. java-math

2014-08-15 Thread Oskar Stangenberg
Im not sure but i doubt the radian/degree thing is in the specs. As for the RPC-serialization: I dont know it the long-bits-conversion is really necessary - its more of a feeling that Double.toString doesnt provide the necessary precision in gwt but its very well possible im wrong there. We

Re: GWT-client math vs. java-math

2014-08-14 Thread Oskar Stangenberg
Well, not every one of these things is easy to fix. Especially the trig-functions - GWT is probably using the js-internal ones - which are most likely pretty fast and good enough for client-only code. The server-impl of the trig-functions isn't even java-code - they are native functions. So

Re: GWT-client math vs. java-math

2014-08-14 Thread Colin Alworth
Thanks for posting about this Oskar. The radian/degree code can likely be changed (is that behavior specified as part of the Java spec?), though changing RPC serialization sounds like it would come with performance penalties - any comments there? What is your preferred method of resolving the

GWT-client math vs. java-math

2014-08-12 Thread Oskar Stangenberg
Hi guys, we are developing a GWT-project with a lot of shared files. We discovered a few discrepancies in the gwt-math and server-math and wanted to share them for anybody else having those issues: - First and foremost: all native double calculations are identical (+ - * / %) - All

Re: GWT-client math vs. java-math

2014-08-12 Thread Juan Pablo Gardella
Thanks for sharing. It will very useful track each problem to GWT issue tracker. 2014-08-12 13:09 GMT-03:00 Oskar Stangenberg crokok...@gmail.com: Hi guys, we are developing a GWT-project with a lot of shared files. We discovered a few discrepancies in the gwt-math and server-math and wanted