| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10
Comments:
<0> waitaminute <1> Vraid: otherwise you will have to deal with errors due to RAND_MAX not being a multiple of your square size <0> it's Vraide question <0> how come MarkT wrote the code ? <2> that wasn't my code <0> are you cooperate to confuse us ? <3> mish: because I'm familiar with the concept. <0> MarkT: but that useless <0> you don't know what ind of bug his code has <1> with a 1000x1000 square you can expect about 3.1420 <1> with a 1000x1000 square you can expect about 3.1421 <2> different values, eh? <3> I used a 1x1 square and got improved accuracy with each additional sample... there was no particular tendency to estimate high or low. <1> due to resampling error <4> I'm still trying to understand WHY you're evaluating pi like that.
<5> I'm still trying to understand why you're evaluating pi at all <5> it's an exercise in uselessness <5> we already have 6 billion digits or more <3> No... not uselessness, it's educational. <2> hah... why would you even bother to go to school when the teachers have already learned the stuff? <3> huh? <2> was ment for CompHobby <1> CompHobby: get out <5> it's far more interesting to code other stuff, really <3> ultimately a program to evaluate pi, regardless of how it does it, isn't going to be very useful for anybody but the person who wrote it, who will, hopefully come away from the experience with an understanding of why it works the way it does. <5> |bob: sorry if I offended you <0> CompHobby: btw, do you know of publicly availb database of pi number in billions >? <5> Mish_: I found one about a year ago, but I've forgotten the URL... let me see if I can find it again <0> s/pi number/pi digits/ <1> people should only write stuff that has never been written before <1> like irc clients <1> and mud libs <1> and TCP stacks <3> bob: then nobody would ever write anything because nobody would learn anything. <0> it takes several hours to calculate 12m of pi digits with totally unoptimized code on my code <3> You can't learn how to program without doing things that other people have already done before you. <0> but it's nonlinear and i never got beyond 12m digits <6> gah. <0> now that i have 2g ram, i can try more <4> Mish, how do you know which digits are correct? <1> MarkT-: I'm not quite sure how you can miss the sarcasm <2> and everything doesn't have open sourcecode <6> lies <0> |bob: if soeone answered, doesn't mean he missed the sarcasm <1> what <0> the mistake MarkT also made <0> KidArt: if it were incorrect, it would be cpu fault, not mine ... <2> anyway, using the radius 1 and (rand()) / RAND_MAX worked <2> thanks <3> you'll need to cast RAND_MAX to double... <1> actually the estimate for 1000x1000 will be a little lower than I said because the excess area does peek outside the circle a little. <2> what? <0> KidArt: it was independently calculated many times by different people, that's how <1> but why bother calculating more precisely <0> KidArt: and using different algorithms, i suppose <4> Mish, that's no proof. <4> Mish, I'm talking about YOUR calculation. <0> if i bothered about mistakes, i'd compare it about result published by someone else <4> But you never did, did you? <4> Hah. <0> i didnt bother about mistakes, that's correct <3> if you are dividing rand() by RAND_MAX, then the result will almost always be 0 unless you cast RAND_MAX to double. <0> that's because i wanted to get more digits <0> first <2> x = 1.*(rand()) / RAND_MAX; <3> oh... <0> but the program was very simple <3> I'd just do rand()/(double)RAND_MAX <2> well, i didn't know that :P <3> that way I don't have to worry about whether the division or the cast happens first because I can never remember all the precedences. <1> remembering all the precedence rules is for compiler writers and losers <0> i have precedence table on the wall near the monitor <0> at work, and at home <0> this way, i dont need to remmber it, still it's always at hand <2> or you could mess up your code with parenthesises
<3> bob: that's why I'd just cast RAND_MAX to double, so I don't have to worry about it... the division would _have_ to be a floating point division in that case. <0> Actually, once you *have* precedence table at hand, you start finding is useful <0> The numbers were developed in India by the Hindus around 400 BCE. However, because it was Arabs who relayed this system to the West after the Hindu numerical system found its way to Persia, the numeral system became mis-identified as "Arabic" in the eyes of the Europeans. Arabs themselves call the Eastern Arabic numerals "Indian numerals," #1B'E GF/J), (arqam hindiyyah) and use a different set of Arabic symbols as numerals. <7> its a question of a memory leak or something, when a function clarely returns what it should, but not all of it is in the variable that the function returned it to? <0> that doesn't parse <0> Caligo: you need to paste the code <0> calc paste <8> Please paste your code (or a complete example that demonstrates your problem) here: http://rafb.net/paste/ <0> MarkT: it bleeds <3> what bleeds? <0> your scratches <3> huh? <1> what? <0> it would be painful to order home theater off the net and then discover it renders the music ****ty <1> Caligo: don't return the address of a locally declared variable <0> cause i'm going to use it primarily for music <0> what do i do <0> ah, i need reviews <0> yamaha is sort of expensive <0> i can buy very cheap lg <0> i need to find the quality brand <0> but not sony <0> no, not lg <9> Hello world. <10> Syntax error. <5> syntax error: expected ';' <11> seg fault <10> warning: conversion lacks type at end of format <0> morning shift is here <5> it's nearly 2300 <0> not here <10> its 22:39 here <10> and if you arent her eyou arent cool <10> :/ <12> hey <13> if im using labe like, test: to use with goto test; <13> is there a way to make it global? <5> you probably shouldn't be using goto... it is frowned upon <14> I don't believe kthx^ was being serious <5> and making it global is even worse <13> why is it bad? <5> oh, my sarcasm detector must have failed then <13> its quick and easy and it works fine? <5> it also results in spaghetti code of unimaginable scale <13> ? <14> your code will indicate that you ****s as a programmer <13> why? <14> comon <13> ugh... <13> it so much easier though <13> =[ <5> if you have to resort to goto, it probably means there is something wrong with your code structure <14> what are you trying to do, if anything real <13> if i didnt use goto id have to split one fucntion into like 3 functions <5> the only place it's really allowed is in kernel code, and that's only for performance reasons really <13> its the parse function on an ircd and im writing flood control code segments for join/nick/pm etc <14> so split it into 3 functions <13> ... <5> agreed <13> omg <5> what <5> umm <5> if you don't like it get out <13> lol dont want any irc drama <5> we're telling you not to write horrible unmaintainable spaghetti code <5> well why did you start it then? <13> what makes it unmaintainable? <14> omg hang on a sec, let me write down never to use your ircd if you release it <5> yeah, same here <13> lol it works quite nice atm
Return to
#c or Go to some related
logs:
#gentoo #solaris #cisco #computers tcl expect plink
#flash tetris DS tcpdump #windows #windows #visualbasic
|
|