Perl 6 - the future is here, just unevenly distributed

IRC log for #rosettacode, 2012-07-11

| Channels | #rosettacode index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:22 mwn3d_phone joined #rosettacode
02:51 mwn3d_phone joined #rosettacode
02:54 ttmrichter joined #rosettacode
03:21 mwn3d_phone1 joined #rosettacode
03:42 mwn3d_phone joined #rosettacode
05:13 fedaykin joined #rosettacode
06:28 GlitchMr joined #rosettacode
09:21 FireFly joined #rosettacode
10:34 sirdancealot2 joined #rosettacode
10:37 GlitchMr joined #rosettacode
11:39 mischi joined #rosettacode
11:49 mwn3d_phone1 joined #rosettacode
13:06 GlitchMr42 joined #rosettacode
13:46 sirdancealot joined #rosettacode
14:30 GlitchMr42 joined #rosettacode
14:48 mwn3d_phone joined #rosettacode
15:00 mwn3d_phone1 joined #rosettacode
17:17 sirdancealot joined #rosettacode
17:21 mwn3d_phone1 joined #rosettacode
17:39 mwn3d_phone Interesting...a friend of mine at work is trying to do some LaTeX work...
17:40 mwn3d_phone He pronounced it "la-TEK"
17:40 mwn3d_phone I didn't know what he was talking about for a bit
17:40 mwn3d_phone I had always pronounced it like the word "latex"
17:41 mwn3d_phone Wikipedia has four options with la/lay for the first syllable and tek/tex for the second one
17:44 opticron i've only heard the *tex variants
17:55 kpreid it's about how the X is actually a Greek chi, and so on
19:08 sirdancealot joined #rosettacode
19:24 bearophile joined #rosettacode
19:25 bearophile Hello
19:25 bearophile The algorithm used by the Python entry here seems quite numerically unstable: http://rosettacode.org/wiki/Averages/Mean_angle
19:25 fedaykin "Averages/Mean angle - Rosetta Code"
19:26 bearophile If I replace doubles with reals (64 => 80 bit FP), for the second test case I get an almost random result of 14.0362 instead of 90 degrees
19:26 mikemol Interesting.
19:27 bearophile That Python code contains a sum()
19:27 mikemol That's a good thing to bring up on its talk page after marking it incorrect.
19:28 bearophile The result is  0+1.0842e-19i with doubles and     2.1684e-19+5.42101e-20i with real, according to an implementation of that python rect()
19:28 bearophile It's a matter of tiny numerical errors
19:28 bearophile It's not the Python code that is wrong
19:28 mikemol Hm
19:29 bearophile Because other implementations use the same algorithm
19:29 mikemol Do they run into the same precision errors?
19:29 bearophile I think it's the algorithm that's not stable
19:29 mikemol Seems likely.
19:30 bearophile I have not yet tested other things, I will do other experiments, maybe it's just the D implementation of expi() that has too much numerical error compared to the precision of real numbers
19:30 bearophile So I prefer to not mark the Python code as wrong, maybe it's just wrong the D standard library :-)
19:30 mikemol I notice that the Python code has pi/180 and 180/pi.
19:30 mikemol Does changing that to 180.0 help?
19:31 bearophile Isn't the Python version using  from math import radians, degrees
19:31 mikemol doh
19:32 mikemol I clicked on python in the TOC, and the Ruby example filled my attention mid-page.
19:32 bearophile Internally it uses a division :-)
19:32 bearophile But the numerical instability is not at the level of radians() and degrees(), I think
19:33 mikemol Yeah, I can see why the algorithm would be unstable. That sum in a for loop...
19:33 bearophile I think the rect() function is the critical one
19:33 bearophile In D it's std.math.expi() that does something similar.
19:34 bearophile I think this is enough for now, see you later.
21:44 nimdAHK joined #rosettacode
21:57 kpreid joined #rosettacode
22:23 mwn3d_phone1 joined #rosettacode
22:39 mwn3d_phone joined #rosettacode

| Channels | #rosettacode index | Today | | Search | Google Search | Plain-Text | summary