Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #25890 > unrolled thread
| Started by | "WJ" <w_a_x_man@yahoo.com> |
|---|---|
| First post | 2013-09-21 14:47 +0000 |
| Last post | 2013-09-21 13:32 -0700 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.lang.forth
Starting Forth 2. "WJ" <w_a_x_man@yahoo.com> - 2013-09-21 14:47 +0000
Re: Starting Forth 2. "WJ" <w_a_x_man@yahoo.com> - 2013-09-21 17:28 +0000
Re: Starting Forth 2. mhx@iae.nl - 2013-09-21 13:32 -0700
| From | "WJ" <w_a_x_man@yahoo.com> |
|---|---|
| Date | 2013-09-21 14:47 +0000 |
| Subject | Starting Forth 2. |
| Message-ID | <l1kbit$npa$1@dont-email.me> |
: QUADRATIC ( a b c x -- n )
>R SWAP ROT R@ * + R> * + ;
Indecipherable stack-juggling. Nobody with any sense
would pay anybody to write unmaintainable code like that.
Julia:
quadratic(a,b,c,x) = (a*x+b)x+c
quadratic(2,7,9,3)
48
[toc] | [next] | [standalone]
| From | "WJ" <w_a_x_man@yahoo.com> |
|---|---|
| Date | 2013-09-21 17:28 +0000 |
| Message-ID | <l1kkv5$evh$1@dont-email.me> |
| In reply to | #25890 |
WJ wrote: > > : QUADRATIC ( a b c x -- n ) > >R SWAP ROT R@ * + R> * + ; > > Indecipherable stack-juggling. Nobody with any sense > would pay anybody to write unmaintainable code like that. > > > Julia: > > quadratic(a,b,c,x) = (a*x+b)x+c > > quadratic(2,7,9,3) > 48 quadratic(1_987_654_321, 7,9, BigInt(999_987_654_321)) 1987605243418529845613568022098417
[toc] | [prev] | [next] | [standalone]
| From | mhx@iae.nl |
|---|---|
| Date | 2013-09-21 13:32 -0700 |
| Message-ID | <c38f6c2d-b97b-4805-a3ac-7c2ae1f1a8f3@googlegroups.com> |
| In reply to | #25895 |
On Saturday, September 21, 2013 7:28:07 PM UTC+2, WJ wrote: > WJ wrote: > > Julia: [..] > quadratic(1_987_654_321, 7,9, BigInt(999_987_654_321)) > 1987605243418529845613568022098417 FORTH> 1987654321 7 9 999987654321 FORTH> >S SWAP ROT S um* rot um+ S> 1 m*/ rot um+ cr d. 1987605243418529845613568022098417 ok
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.forth
csiph-web