Re: possible emulation bug: sinh
On 25 sep, 06:53, rjcarr [EMAIL PROTECTED] wrote: Looking at GWT Math.java, I see: public static native double sinh(double x) /*-{ return Math.sinh(x); }-*/; But according to the mozilla javascript reference (which I'm sure is the same for any reference you find): http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_... There is no sinh() function available. So that makes me pretty sure this is an emulation bug. Right, it should probably read (with a potential loss in precision): public static double sinh(double x) { return (exp(x) - exp(-x)) / 2; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: possible emulation bug: sinh
I'd create an issue and toss that one-liner in there too, after checking that there isn't one already there, of course. google lucky gwt issue tracker. On Sep 25, 11:27 am, Thomas Broyer [EMAIL PROTECTED] wrote: On 25 sep, 06:53, rjcarr [EMAIL PROTECTED] wrote: Looking at GWT Math.java, I see: public static native double sinh(double x) /*-{ return Math.sinh(x); }-*/; But according to the mozilla javascript reference (which I'm sure is the same for any reference you find): http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_... There is no sinh() function available. So that makes me pretty sure this is an emulation bug. Right, it should probably read (with a potential loss in precision): public static double sinh(double x) { return (exp(x) - exp(-x)) / 2; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
possible emulation bug: sinh
Using GWT 1.5.2 and the JRE emulation page says Math.sinh() is available. I use it and in hosted mode (on a mac) it works fine. Then I compile and test in Firefox 3 and get this error: Error: Math.sinh is not a function So, it seems it actually isn't emulated? I remember it working for me at some point before, but maybe not? What is stranger, is as I said, it works in hosted mode, and on a mac this uses Safari (as far as I know). However, if I open it up in Safari I get the same sinh error. I just wrote my own sinh() function based on exp() and everything works fine. So what's up with the emulated sinh() function? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---