Re: [julia-users] [OT] v8 team implements trig functions in JS, ships, later implements them correctly

2014-08-29 Thread Simon Byrne
That was an interesting exchange. I agree that there's probably no immediate benefit from translating the libm into julia, but as an exercise it might have some indirect benefits: * It could provide a sort of gold standard of julia numeric code for people who are interested in poking around and

Re: [julia-users] [OT] v8 team implements trig functions in JS, ships, later implements them correctly

2014-08-29 Thread Stefan Karpinski
Very nice, Simon. That's super cool. Would love to have some of these gems in Base Julia. With good documentation of how they can be used would be a really valuable combination that's actually quite hard to find anywhere. These kinds of tricks and the expertise to use them tend to be scattered all

Re: [julia-users] [OT] v8 team implements trig functions in JS, ships, later implements them correctly

2014-08-29 Thread Stefan Karpinski
That's a very slick JavaScript app. The interactive plotting is really very nice. The mathy input widget is great too. JavaScript certainly has the performance these days to make this stuff work – and as long as you stick to 64-bit floats, things are probably all good, unless someone decides to

[julia-users] [OT] v8 team implements trig functions in JS, ships, later implements them correctly

2014-08-28 Thread Jason Merrill
If you love the details of floating point math, may I humbly recommend reading https://code.google.com/p/v8/issues/detail?id=3006 This isn't so Julia related, per se, but I find it fascinating, and can't think of a better place to find other people who might also. Here's my TLDR: 1. Someone

Re: [julia-users] [OT] v8 team implements trig functions in JS, ships, later implements them correctly

2014-08-28 Thread Stefan Karpinski
Interesting. I'm not sure how bad the function call overhead in JavaScript is (or why it would be bad), but for us it's the same as one C function calling another C function. The main advantages of reimplementing things in pure Julia are: (a) generalization – same algorithm can apply to many

Re: [julia-users] [OT] v8 team implements trig functions in JS, ships, later implements them correctly

2014-08-28 Thread Elliot Saba
Interesting. On my chrome (37.0) at least, I can go up a few orders of magnitude to Math.sin(-1e16) still getting zero back. -E

Re: [julia-users] [OT] v8 team implements trig functions in JS, ships, later implements them correctly

2014-08-28 Thread Stefan Karpinski
Someone once asked me about using JavaScript for numerical computing. On Aug 28, 2014, at 6:54 PM, Elliot Saba staticfl...@gmail.com wrote: Interesting. On my chrome (37.0) at least, I can go up a few orders of magnitude to Math.sin(-1e16) still getting zero back. -E

Re: [julia-users] [OT] v8 team implements trig functions in JS, ships, later implements them correctly

2014-08-28 Thread Jason Merrill
On Thursday, August 28, 2014 4:46:24 PM UTC-7, Stefan Karpinski wrote: Someone once asked me about using JavaScript for numerical computing. Numerical computing with javascript is my day job: https://www.desmos.com/. I got interested in this whole saga because our unit tests started failing.