Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #49257

Re: Jazelle?

From mm0fmf <none@invalid.com>
Newsgroups comp.sys.raspberry-pi, comp.lang.forth
Subject Re: Jazelle?
Date 2016-07-20 17:39 +0100
Organization A noiseless patient Spider
Message-ID <nmo9fg$flm$2@dont-email.me> (permalink)
References (3 earlier) <MPG.31f93e8b429c8383989804@172.16.0.1> <nmnge0$rri$1@dont-email.me> <2016Jul20.121415@mips.complang.tuwien.ac.at> <nmnvi0$e7s$1@dont-email.me> <2016Jul20.163523@mips.complang.tuwien.ac.at>

Cross-posted to 2 groups.

Show all headers | View raw


On 20/07/2016 15:35, Anton Ertl wrote:
> "gareth G4SDW GQRP #3339" <no.spam@thank.you.invalid> writes:
>> "Anton Ertl" <anton@mips.complang.tuwien.ac.at> wrote in message
>> news:2016Jul20.121415@mips.complang.tuwien.ac.at...
>>> "gareth G4SDW GQRP #3339" <no.spam@thank.you.invalid> writes:
>>>> Consider the solution of the quadratic equation expressed in
>>>> a HLL ...
>>>>
>>>> X = (-B + SQRT ( B**2 - 4*A*C))?2*A
>>>
>>> Which HLL uses "?" as division operator that has lower priority than
>>> "*"; actually, which HLL has a division operator with lower priority
>>> than "*"?
>>
>> A minor typo caused by typing with the shift key held down
>>
>> And, yes, S/B (2*A) but neither critique answers the HLL versus assembler
>> criticism.
>
> "S/B (2*A)"?
>
> What "HLL vs. assembler criticism"?
>
> If your example was an attempt to show the superiority of the Fortran
> notation over the Forth notation, then the fact that you made two
> errors in this one line was not a good testimonial for the Fortran
> way.
>
>>> Anyway, this way of computing one of the solutions for a quadratic
>>> equation is bad because it introduces more numerical instability than
>>> is coming from the problem itself.  Read more about how to do it
>>> better in
>>
>> Not relevant to demonsrtating the ease of use and built in syntax checking
>> of a HLL compared to an assembler.
>
> So you want to demonstrate the superiority of the Fortran notation
> with an example that no competent Fortran programmer will write in
> that way?  And then you parenthesize it incorrectly, a mistake that
> will not be detected by "syntax checking".
>
> Interestingly, in <913374461.4045.0.nnrp-04.9e98250c@news.demon.co.uk>
> (from 1998) Gareth Alun Evans (any relation to you?) gave pretty much
> the same example (in BASIC syntax, though), and made the same
> parenthesis omission mistake.  Not a testimonial for the qualities of
> infix syntax.
>
> If you write the example in a numerically stable way, you get several
> smaller statements rather than a big one, more like most real
> programs, and the difference between infix and postfix becomes
> smaller.  I guess that's why you choose this example; apparently it's
> hard to come up with another huge formula that many people can relate
> to.  So even if the Fortran notation would be better for writing down
> one solution of a quadratic equation in a numerically unstable way
> (and the mistakes of you and Gareth Alun Evans are evidence against
> this thesis), that says little about the quality of that notation for
> real (and competently written) programs.
>
> Anyway, here's a way to compute the roots (if they are real) without
> the numeric instability (you still have bad condition when bb/4 and ac
> cancel each other out, so you may want to compute that part with higher
> precision).
>
> : compute-q { f: a f: b/2 f: c -- q }
>    b/2 b/2 f* a c f* f- fsqrt
>    b/2 f0< if fnegate then \ avoids cancelation by the F+ below
>    b/2 f+ ;
>
> : quadratic { f: a f: b f: c -- x1 x2 }
>    a b f2/ c compute-q { f: q }
>    q a f/ c q f/ ;
>
> - anton
>

Oh dear, you'll be on Gareth's enemy list now.

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Jazelle? "gareth G4SDW GQRP #3339" <no.spam@thank.you.invalid> - 2016-07-20 10:31 +0100
  Re: Jazelle? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-07-20 10:14 +0000
    Re: Jazelle? Chris Curl <ccurl609@gmail.com> - 2016-07-20 05:37 -0700
      Re: Jazelle? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-07-20 13:36 +0000
    Re: Jazelle? "WJ" <w_a_x_man@yahoo.com> - 2016-07-20 13:06 +0000
    Re: Jazelle? "gareth G4SDW GQRP #3339" <no.spam@thank.you.invalid> - 2016-07-20 14:49 +0100
      Re: Jazelle? hughaguilar96@gmail.com - 2016-07-20 08:48 -0700
      Re: Jazelle? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-07-20 14:35 +0000
        Re: Jazelle? mm0fmf <none@invalid.com> - 2016-07-20 17:39 +0100
        Re: Jazelle? "gareth G4SDW GQRP #3339" <no.spam@thank.you.invalid> - 2016-07-20 20:30 +0100
          Re: Jazelle? rickman <gnuarm@gmail.com> - 2016-07-20 15:35 -0400
            Re: Jazelle? mhx@iae.nl - 2016-07-20 13:27 -0700
              Re: Jazelle? "WJ" <w_a_x_man@yahoo.com> - 2016-07-21 09:41 +0000
            Re: Jazelle? hughaguilar96@gmail.com - 2016-07-21 17:24 -0700
        Re: Jazelle? "WJ" <w_a_x_man@yahoo.com> - 2016-07-21 10:43 +0000
          Re: Jazelle? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-07-21 12:44 +0000
            Re: Jazelle? "gareth G4SDW GQRP #3339" <no.spam@thank.you.invalid> - 2016-07-21 22:59 +0100
              Re: Jazelle? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-07-22 06:42 +0000
                Re: Jazelle? "gareth G4SDW GQRP #3339" <no.spam@thank.you.invalid> - 2016-07-22 12:03 +0100
                Re: Jazelle? rickman <gnuarm@gmail.com> - 2016-07-22 09:05 -0400
                Re: Jazelle? Cecil Bayona <cbayona@cbayona.com> - 2016-07-22 10:09 -0500
                Re: Jazelle? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2016-07-22 19:20 +0300
                Re: Jazelle? Brad Eckert <hwfwguy@gmail.com> - 2016-07-22 09:35 -0700
          Re: Jazelle? "WJ" <w_a_x_man@yahoo.com> - 2016-07-25 10:43 +0000
            Re: Jazelle? "gareth G4SDW GQRP #3339" <no.spam@thank.you.invalid> - 2016-07-26 11:41 +0100
              Re: Jazelle? Julian Fondren <julian.fondren@gmail.com> - 2016-07-26 04:26 -0700
                Re: Jazelle? rickman <gnuarm@gmail.com> - 2016-07-26 11:20 -0400
  Re: Jazelle? Doug Hoffman <glidedog@gmail.com> - 2016-07-20 06:44 -0400
    Re: Jazelle? "gareth G4SDW GQRP #3339" <no.spam@thank.you.invalid> - 2016-07-20 14:52 +0100
      Re: Jazelle? "WJ" <w_a_x_man@yahoo.com> - 2016-07-20 14:33 +0000
      Re: Jazelle? rickman <gnuarm@gmail.com> - 2016-07-20 10:52 -0400
        Re: Jazelle? alister <alister.ware@ntlworld.com> - 2016-07-20 15:40 +0000
          Re: Jazelle? rickman <gnuarm@gmail.com> - 2016-07-20 11:46 -0400
          Re: Jazelle? hughaguilar96@gmail.com - 2016-07-20 09:25 -0700
    Re: Jazelle? hughaguilar96@gmail.com - 2016-07-20 09:22 -0700
      Re: Jazelle? rickman <gnuarm@gmail.com> - 2016-07-20 13:14 -0400
        Re: Jazelle? hughaguilar96@gmail.com - 2016-07-20 21:44 -0700
          Re: Jazelle? rickman <gnuarm@gmail.com> - 2016-07-21 01:32 -0400
            Re: Jazelle? Cecil Bayona <cbayona@cbayona.com> - 2016-07-21 02:21 -0500
          Re: Jazelle? Brad Eckert <hwfwguy@gmail.com> - 2016-07-21 17:13 -0700
            Re: Jazelle? hughaguilar96@gmail.com - 2016-07-21 17:42 -0700
            Re: Jazelle? humptydumpty <ouatubi@gmail.com> - 2016-07-23 10:08 -0700
              Re: Jazelle? hughaguilar96@gmail.com - 2016-07-23 13:55 -0700
                Re: Jazelle? humptydumpty <ouatubi@gmail.com> - 2016-07-24 02:22 -0700
  Re: Jazelle? rickman <gnuarm@gmail.com> - 2016-07-20 10:56 -0400
  Re: Jazelle? Brad Eckert <hwfwguy@gmail.com> - 2016-07-20 10:54 -0700
    Re: Jazelle? Cecil Bayona <cbayona@cbayona.com> - 2016-07-20 13:33 -0500
      Re: Jazelle? rickman <gnuarm@gmail.com> - 2016-07-20 16:51 -0400
        Re: Jazelle? Cecil Bayona <cbayona@cbayona.com> - 2016-07-20 17:09 -0500
          Re: Jazelle? rickman <gnuarm@gmail.com> - 2016-07-20 18:12 -0400
            Re: Jazelle? Cecil Bayona <cbayona@cbayona.com> - 2016-07-20 18:41 -0500
              Re: Jazelle? rickman <gnuarm@gmail.com> - 2016-07-20 21:01 -0400

csiph-web