Re: [EGN] Numerical Accuracy

From: Corey Murtagh (emonk_at_slingshot.no.uce)
Date: 09/10/04


Date: Sat, 11 Sep 2004 07:29:08 +1200

Edward G. Nilges wrote:

> EMonk <emonk@slingshot.no.uce> wrote in message news:<1094772630.871740@ftpsrv1>...
>
>>Edward G. Nilges wrote:
>>
>><snip>
>>
>>>int intProbabilities[10];
>>>#define PRECISION 2
>>>.
>>>.
>>>.
>>>for ( intIndex1 = 0; intIndex1 < 10; intIndex++ )
>>> fltSum += (float)(intProbabilities[intIndex1]) / (10 **
>>>PRECISION);
>>>assert(fltSum == 100);
>>>
>>>(Oh, dear me. The above extempore code contains an invariant operation
>>>in the loop and may not even compile. Of course, it is not meant for
>>>trolls).
>>
>>The 'loop invariant' eddie refers to is a constant expression that will
>>be reduced by virtually all modern compilers - with or without
>>optimization - to a constant value.
>>
>>Well, it /would/ if the expression (10 ** PRECISION) actually compiled.
>> It's just a typo however... I suspect eddie threw it in there to
>>provoke response.
>
> You don't understand the concept of a formal language because the
> meaning is clear, and, you don't even correct the typo because you are
> AFRAID of making a mistake.

Huh? Why would I be afraid?

Why do you keep talking about fear, cowardice and so on eddie? I'm no
more afraid of mistakes than I am afraid of you... and as I've said, I
have no fear of you. Could it be that your own self-loathing for making
such obvious mistakes in pretty much every bit of code you've ever
posted is causing you to lash out, redirecting your own shame into a
much more acceptable (to yourself) denigration of others?

That's just a guess of course.

> Most younger programmers are confused on the notation of a formal
> language and for this reason are deathly afraid of posting code that
> some twisted head case may use against them in a systematic campaign
> of character and professional assassination. As a rare emotional grown
> up, I am unafraid of these campaigns.

Yeah, sure, whatever. I've posted code in the past, accepted critiques
in the spirit in which they were given, and moved on. I haven't done my
level best to destroy any and every person who disagrees with me.

> A FORMAL language is one with definite rules but unlike a PROGRAMMING
> language, those rules are under the control of the user and not
> alienated in a separable compiler written "somewhere else".
>
> Therefore in my formal variant of C, the ** obviously means raise to a
> power because I did not have the time to waste in compiling the code,
> and, the code wasn't meant for trolls like you.

If your intent was clear enough I would have corrected it. It seemed to
me that you'd used it as a power operator, which is not part of C or C++
but /is/ used in some languages. But it could just as easily have been
typo, and I treated it as such. Correcting the typo would create a
near-compilable fragment, but at the expense of correctness... which
after the horrible bugs you've had in your various code, both in fine
and large, I was basically expecting.

However, the point is that your redefinition of the C language is not
useful in any context. The language has formal definitions of its own,
and you do /not/ mention anywhere that you are importing an operator
from another language out of laziness. Therefore the appearance of a **
operator is invalid, and read by those who understand the rules of the
language as being either a typo or an outright error.

You love to redefine languages to suit yourself, but programming
requires that you follow the rules of the language you're using. You
can't just arbitrarily define new operators in C and expect people to
"know" what you mean.

> Indeed, although many trolls are themselves deathly afraid of being
> labeled an incompetent programmer (although why competence in a
> trivial skill is so celebrated is beyond me), people who are
> comfortable with formality can read past departures from "absolute"
> (alienated) formality and understand meaning.

You challenged me, I answered.

> Therefore in future, troll, refer to substantive errors and be so good
> as to suggest alternatives, taking the risk in turn of being "wrong"
> like a man and not a troll.

I run the risk of being wrong every single time I post. I accept that,
and always have.

You however have never accepted that your ideas as posted here are
anything but gospel. You demand that others accept being wrong, when it
is one of the things you refuse outright to accept about yourself.

> The question at issue, troll, is when and where to use floating point
> when the set of numbers needs to sum to unity. An alternative of
> course is to define a minimum acceptable number as an epsilon or
> difference.

Ah, so you read my post elsethread then. I presume that you did, since
I spent some time on epsilons in it. Note the timestamps as well before
you claim that you gave me the idea.

> Otherwise be so good, troll, as to leave the room.

I agree... trolls should leave. Don't let the door hit you in the arse
as you go.

-- 
Corey Murtagh
The Electric Monk
"Quidquid latine dictum sit, altum viditur!"


Relevant Pages

  • Re: Indefinite Extensibility and Computationalism
    ... for a language does not require first specifying a theory in that ... Textbooks deviate among one another, ... It's OBVIOUS that I made a typo of omission. ...
    (sci.logic)
  • Re: happy way.......
    ... how good is your flemish or french? ... There's no such language as Flemish and I can get by in French, ... I wasn't referring to the typo, I wanted to know why the insult. ...
    (soc.genealogy.britain)
  • Re: The Python standard library and PEP8
    ... What kind of OO language allows you to do this: ... def square: ... running the code snippet? ... The code as posted had a typo: 'x' instead of the instended 'i'. ...
    (comp.lang.python)
  • Re: London micro-con
    ... >Seems like a corrolary of Coren's Law. ... Ah, but I didn't criticise anyone's language, ... spelling, punctuation, grammar etc. pp. in the post that contained the ... language proficiency and you will make a typo or commit a grammatical error." ...
    (soc.motss)
  • Re: what does "serialization" mean?
    ... Sorry eddie, but you're dead wrong there as usual. ... >>How about ASCII character 0xB0, ... > Totalitarians and Fascists are often self-appointed language police. ...
    (comp.programming)

Loading