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


Groups > comp.lang.forth > #49238

Re: Jazelle?

Path csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From "WJ" <w_a_x_man@yahoo.com>
Newsgroups comp.lang.forth
Subject Re: Jazelle?
Date Wed, 20 Jul 2016 13:06:34 -0000 (UTC)
Organization A noiseless patient Spider
Lines 69
Message-ID <nmnt0o$5pr$1@dont-email.me> (permalink)
References <nmi8on$34p$1@dont-email.me> <nmmged$bm8$2@dont-email.me> <nmn4gf$p1o$2@news.albasani.net> <MPG.31f93e8b429c8383989804@172.16.0.1> <nmnge0$rri$1@dont-email.me> <2016Jul20.121415@mips.complang.tuwien.ac.at>
Injection-Date Wed, 20 Jul 2016 13:06:34 -0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="1c777f7c6505ac4150b7c7640dbb4f89"; logging-data="5947"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19QGldTEq8pOWUYZH+UL9OS"
User-Agent XanaNews/1.18.1.6
Cancel-Lock sha1:5Gp/HjhAUoN8vAH8aJDPr4MQ2tQ=
Xref csiph.com comp.lang.forth:49238

Show key headers only | View raw


Anton Ertl wrote:

> "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 "*"?
> 
> 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
> 
> <http://home.pipeline.com/~hbaker1/sigplannotices/sigcol05.pdf>
> <http://home.pipeline.com/~hbaker1/sigplannotices/sigcol06.pdf>
> 
> > ... then consider what you have to do in Forth to achieve the same end.
> > of pushing variables onto the stack and manipulating that stack to
> > realise that Forth is, indeed, assembly language!
> 
> Yes.  Forth has the benefits of assembly language (stability,
> performance) as well as some of the benefits of higher-level languages
> (in particular, portability), mitigating the drawbacks of assembly
> language (non-portability) and higher-level languages (instability for
> C, low performance for, e.g., Python).

OCaml has neither the drawback of instability nor of low performance.

Note that he didn't post a solution in Forth.

It would have been too difficult to write the solution,
and, once written, the solution would have been too
difficult to read.

OCaml:

let quad a b c = (sqrt(b *. b -. 4. *. a *. c) -. b) /. (2. *. a) ;;

quad 1. 2. (-8.) ;;
 ===>
2.

quad 3. (-10.) 5. ;;
 ===>
2.7207592200561268



Julia:

quad(a,b,c) = (sqrt(b*b - 4a*c) - b)/2a

quad(1,2,-8)
 ===>
2.0

quad(3,-10,5)
 ===>
2.720759220056127

-- 
Amazon bans book.  After nearly a month on the site, all traces of the book and
its 80 reviews have been removed.
http://jamesfetzer.blogspot.com/2015/11/debunking-sandy-hook-debunkers-5.html
https://www.youtube.com/watch?v=EEl_1HWFRfo

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